-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathdocker-compose.migration-e2e.yml
More file actions
186 lines (173 loc) · 5.52 KB
/
docker-compose.migration-e2e.yml
File metadata and controls
186 lines (173 loc) · 5.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Self-contained topology for migration e2e tests.
# 2 standalone Valkey instances + 2 clusters (3 masters each, no replicas).
# All services use host networking so cluster nodes advertise 127.0.0.1.
#
# Usage:
# docker compose -p migration-e2e -f docker-compose.migration-e2e.yml up -d
# docker compose -p migration-e2e -f docker-compose.migration-e2e.yml down -v
services:
# ── Standalone instances ──────────────────────────────────────────
source-standalone:
image: valkey/valkey:8-alpine
container_name: mig-source-standalone
network_mode: host
command: valkey-server --port 6990 --save "" --appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "6990", "ping"]
interval: 2s
timeout: 3s
retries: 15
restart: "no"
target-standalone:
image: valkey/valkey:8-alpine
container_name: mig-target-standalone
network_mode: host
command: valkey-server --port 6991 --save "" --appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "6991", "ping"]
interval: 2s
timeout: 3s
retries: 15
restart: "no"
# ── Source cluster (3 masters, no replicas) ───────────────────────
src-node-1:
image: valkey/valkey:8-alpine
container_name: mig-src-node-1
network_mode: host
command: >
valkey-server --port 7301
--cluster-enabled yes
--cluster-config-file /data/nodes.conf
--cluster-node-timeout 5000
--cluster-announce-ip 127.0.0.1
--cluster-announce-port 7301
--cluster-announce-bus-port 17301
--save "" --appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "7301", "ping"]
interval: 2s
timeout: 3s
retries: 15
restart: "no"
src-node-2:
image: valkey/valkey:8-alpine
container_name: mig-src-node-2
network_mode: host
command: >
valkey-server --port 7302
--cluster-enabled yes
--cluster-config-file /data/nodes.conf
--cluster-node-timeout 5000
--cluster-announce-ip 127.0.0.1
--cluster-announce-port 7302
--cluster-announce-bus-port 17302
--save "" --appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "7302", "ping"]
interval: 2s
timeout: 3s
retries: 15
restart: "no"
src-node-3:
image: valkey/valkey:8-alpine
container_name: mig-src-node-3
network_mode: host
command: >
valkey-server --port 7303
--cluster-enabled yes
--cluster-config-file /data/nodes.conf
--cluster-node-timeout 5000
--cluster-announce-ip 127.0.0.1
--cluster-announce-port 7303
--cluster-announce-bus-port 17303
--save "" --appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "7303", "ping"]
interval: 2s
timeout: 3s
retries: 15
restart: "no"
src-cluster-init:
image: valkey/valkey:8-alpine
container_name: mig-src-cluster-init
network_mode: host
depends_on:
src-node-1: { condition: service_healthy }
src-node-2: { condition: service_healthy }
src-node-3: { condition: service_healthy }
command: >
sh -c "valkey-cli --cluster create
127.0.0.1:7301 127.0.0.1:7302 127.0.0.1:7303
--cluster-replicas 0 --cluster-yes"
restart: "no"
# ── Target cluster (3 masters, no replicas) ───────────────────────
tgt-node-1:
image: valkey/valkey:8-alpine
container_name: mig-tgt-node-1
network_mode: host
command: >
valkey-server --port 7401
--cluster-enabled yes
--cluster-config-file /data/nodes.conf
--cluster-node-timeout 5000
--cluster-announce-ip 127.0.0.1
--cluster-announce-port 7401
--cluster-announce-bus-port 17401
--save "" --appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "7401", "ping"]
interval: 2s
timeout: 3s
retries: 15
restart: "no"
tgt-node-2:
image: valkey/valkey:8-alpine
container_name: mig-tgt-node-2
network_mode: host
command: >
valkey-server --port 7402
--cluster-enabled yes
--cluster-config-file /data/nodes.conf
--cluster-node-timeout 5000
--cluster-announce-ip 127.0.0.1
--cluster-announce-port 7402
--cluster-announce-bus-port 17402
--save "" --appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "7402", "ping"]
interval: 2s
timeout: 3s
retries: 15
restart: "no"
tgt-node-3:
image: valkey/valkey:8-alpine
container_name: mig-tgt-node-3
network_mode: host
command: >
valkey-server --port 7403
--cluster-enabled yes
--cluster-config-file /data/nodes.conf
--cluster-node-timeout 5000
--cluster-announce-ip 127.0.0.1
--cluster-announce-port 7403
--cluster-announce-bus-port 17403
--save "" --appendonly no
healthcheck:
test: ["CMD", "valkey-cli", "-p", "7403", "ping"]
interval: 2s
timeout: 3s
retries: 15
restart: "no"
tgt-cluster-init:
image: valkey/valkey:8-alpine
container_name: mig-tgt-cluster-init
network_mode: host
depends_on:
tgt-node-1: { condition: service_healthy }
tgt-node-2: { condition: service_healthy }
tgt-node-3: { condition: service_healthy }
command: >
sh -c "valkey-cli --cluster create
127.0.0.1:7401 127.0.0.1:7402 127.0.0.1:7403
--cluster-replicas 0 --cluster-yes"
restart: "no"