Skip to content

Commit be8234d

Browse files
committed
Change the testing infra to test against docker
1 parent 8be51b7 commit be8234d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+5410
-72
lines changed

.github/workflows/test-against-docker.yml renamed to .github/workflows/test-on-docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- "7.4.1"
3535
- "7.2.6"
3636
- "6.2.16"
37+
- "8.0-M01"
3738
go_version:
3839
- "1.19.x"
3940
- "1.20.x"

docker-compose.yml

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
3+
services:
4+
5+
redis:
6+
image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:8.0-M01}
7+
container_name: redis-standalone
8+
environment:
9+
- TLS_ENABLED=yes
10+
- REDIS_CLUSTER=no
11+
- PORT=6379
12+
- TLS_PORT=6666
13+
command: ${REDIS_EXTRA_ARGS:---enable-debug-command yes --enable-module-command yes --tls-auth-clients optional --save ""}
14+
ports:
15+
- 6379:6379
16+
- 9123:6379 # Sentinel port
17+
- 6666:6666 # TLS port
18+
volumes:
19+
- "./dockers/standalone:/redis/work"
20+
profiles:
21+
- standalone
22+
- sentinel
23+
- replica
24+
- all-stack
25+
- all
26+
27+
replica:
28+
image: ${REDIS_IMAGE:-redis:8.0-M01}
29+
container_name: redis-replica
30+
depends_on:
31+
- redis
32+
command: redis-server --replicaof redis 6379 --protected-mode no --save ""
33+
ports:
34+
- 6380:6379
35+
profiles:
36+
- replica
37+
- all-stack
38+
- all
39+
40+
cluster:
41+
image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:8.0-M01}
42+
container_name: redis-cluster
43+
environment:
44+
- REDIS_CLUSTER=yes
45+
- NODES=6
46+
- REPLICAS=1
47+
- TLS_ENABLED=yes
48+
- PORT=16379
49+
- TLS_PORT=27379
50+
command: ${REDIS_EXTRA_ARGS:---enable-debug-command yes --enable-module-command yes --save ""}
51+
ports:
52+
- "16379-16381:16379-16381"
53+
volumes:
54+
- "./dockers/cluster:/redis/work"
55+
profiles:
56+
- cluster
57+
- all-stack
58+
- all
59+
60+
sentinel:
61+
image: ${REDIS_IMAGE:-redis:8.0-M01}
62+
container_name: redis-sentinel1
63+
depends_on:
64+
- redis
65+
entrypoint: "redis-sentinel /redis.conf --port 9123"
66+
ports:
67+
- 9126:9126
68+
volumes:
69+
- "./dockers/sentinel.conf:/redis.conf"
70+
profiles:
71+
- sentinel
72+
- all-stack
73+
- all
74+
75+
sentinel2:
76+
image: ${REDIS_IMAGE:-redis:8.0-M01}
77+
container_name: redis-sentinel2
78+
depends_on:
79+
- redis
80+
entrypoint: "redis-sentinel /redis.conf --port 9124"
81+
ports:
82+
- 9127:9127
83+
volumes:
84+
- "./dockers/sentinel.conf:/redis.conf"
85+
profiles:
86+
- sentinel
87+
- all-stack
88+
- all
89+
90+
sentinel3:
91+
image: ${REDIS_IMAGE:-redis:8.0-M01}
92+
container_name: redis-sentinel3
93+
depends_on:
94+
- redis
95+
entrypoint: "redis-sentinel /redis.conf --port 26381"
96+
ports:
97+
- 9128:9128
98+
volumes:
99+
- "./dockers/sentinel.conf:/redis.conf"
100+
profiles:
101+
- sentinel
102+
- all-stack
103+
- all
104+
105+
sentinel-slave1:
106+
image: ${REDIS_IMAGE:-redis:8.0-M01}
107+
container_name: redis-sentinel1-slave
108+
depends_on:
109+
- redis
110+
command: redis-server --slaveof redis 9123 --protected-mode no --save ""
111+
ports:
112+
- 9124:9123
113+
profiles:
114+
- sentinel
115+
- all-stack
116+
- all
117+
118+
sentinel-slave2:
119+
image: ${REDIS_IMAGE:-redis:8.0-M01}
120+
container_name: redis-sentinel2-slave
121+
depends_on:
122+
- redis
123+
command: redis-server --slaveof redis 9123 --protected-mode no --save ""
124+
ports:
125+
- 9125:9123
126+
profiles:
127+
- sentinel
128+
- all-stack
129+
- all
130+
131+
redis-stack:
132+
image: ${REDIS_STACK_IMAGE:-redis/redis-stack-server:edge}
133+
container_name: redis-stack
134+
ports:
135+
- 6349:6379
136+
environment:
137+
- "REDIS_ARGS=${REDIS_STACK_EXTRA_ARGS:---enable-debug-command yes --enable-module-command yes --save ''}"
138+
profiles:
139+
- standalone
140+
- all-stack

dockers/cluster/cluster-nodes.info

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node-0 node-1 node-2 node-3 node-4 node-5

dockers/cluster/node-0/nodes.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
16151e686272aa1dd2d15d4af407b6be45c9eca1 127.0.0.1:16384@26384,,tls-port=27384,shard-id=78410864729d91b91858e4f921bcd314095cfcc6 slave 3a1250b30cc37fca6db12b82fdefcbf615dec08f 1734269951169 1734269951128 1 connected
2+
a0970bd542e1e5b7512bfc61deac5244e4478c58 127.0.0.1:16382@26382,,tls-port=27382,shard-id=8ee145d9d4fab776f3f51de69974dc0377adb434 slave 17003be25313b117da88e1dfefdb9ddb6bf68c90 0 1734269951203 2 connected
3+
3a1250b30cc37fca6db12b82fdefcbf615dec08f 127.0.0.1:16379@26379,,tls-port=27379,shard-id=78410864729d91b91858e4f921bcd314095cfcc6 myself,master - 0 0 1 connected 0-5460
4+
0287949c6e8aa2fb3f26d81820cc54b82bfd551f 127.0.0.1:16383@26383,,tls-port=27383,shard-id=4554bc07be3de979d00342a6de84369994bb059c slave 4759591cd1762d973a5691128c97200deb57762f 1734269951169 1734269951128 3 connected
5+
4759591cd1762d973a5691128c97200deb57762f 127.0.0.1:16381@26381,,tls-port=27381,shard-id=4554bc07be3de979d00342a6de84369994bb059c master - 0 1734269951169 3 connected 10923-16383
6+
17003be25313b117da88e1dfefdb9ddb6bf68c90 127.0.0.1:16380@26380,,tls-port=27380,shard-id=8ee145d9d4fab776f3f51de69974dc0377adb434 master - 0 1734269951169 2 connected 5461-10922
7+
vars currentEpoch 6 lastVoteEpoch 0

dockers/cluster/node-0/redis.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
port 16379
3+
4+
tls-port 27379
5+
6+
include /redis/work/tls/redis-tls.conf
7+
8+
cluster-enabled yes
9+
10+
cluster-config-file nodes.conf
11+
12+
protected-mode no

0 commit comments

Comments
 (0)