Skip to content

Commit 364111f

Browse files
committed
etcd_docker 5: Incorporate docker based etcd approach into docker integration tests.
PR 5 for #4144 This PR makes the docker integration tests use containerized etcd. Previously, these relied on M3DB running an embbeded etcd server. There's no inherent need for this, and it opens us up to dependency issues as described in the linked github issue. Note: there are a handful that require multiple servers; these are currently "skipped" (commented). I intend to bring those back at a later date.. commit-id:e67a5172
1 parent 16b5b60 commit 364111f

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

+384
-181
lines changed

scripts/docker-integration-tests/aggregator/docker-compose.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
version: "3.5"
22
services:
3+
etcd:
4+
image: docker.io/bitnami/etcd:3.5
5+
expose:
6+
- "2379-2380"
7+
ports:
8+
- "0.0.0.0:2379-2380:2379-2380"
9+
environment:
10+
- ALLOW_NONE_AUTHENTICATION=yes
11+
networks:
12+
- backend
313
dbnode01:
414
expose:
515
- "9000-9004"
6-
- "2379-2380"
716
- "7201"
817
ports:
918
- "0.0.0.0:9000-9004:9000-9004"
10-
- "0.0.0.0:2379-2380:2379-2380"
1119
- "0.0.0.0:7201:7201"
1220
networks:
1321
- backend
1422
image: "m3dbnode_integration:${REVISION}"
23+
depends_on:
24+
- etcd
1525
m3coordinator01:
1626
expose:
1727
- "7202"
@@ -26,6 +36,8 @@ services:
2636
image: "m3coordinator_integration:${REVISION}"
2737
volumes:
2838
- "./m3coordinator.yml:/etc/m3coordinator/m3coordinator.yml"
39+
depends_on:
40+
- etcd
2941
m3aggregator01:
3042
expose:
3143
- "6001"
@@ -38,6 +50,8 @@ services:
3850
image: "m3aggregator_integration:${REVISION}"
3951
volumes:
4052
- "./m3aggregator.yml:/etc/m3aggregator/m3aggregator.yml"
53+
depends_on:
54+
- etcd
4155
m3aggregator02:
4256
networks:
4357
- backend
@@ -46,5 +60,7 @@ services:
4660
image: "m3aggregator_integration:${REVISION}"
4761
volumes:
4862
- "./m3aggregator.yml:/etc/m3aggregator/m3aggregator.yml"
63+
depends_on:
64+
- etcd
4965
networks:
50-
backend:
66+
backend: null

scripts/docker-integration-tests/aggregator/m3aggregator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ kvClient:
3838
autoSyncInterval: 10m
3939
dialTimeout: 1m
4040
endpoints:
41-
- dbnode01:2379
41+
- etcd:2379
4242

4343
runtimeOptions:
4444
kvConfig:

scripts/docker-integration-tests/aggregator/m3coordinator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ clusters:
2424
autoSyncInterval: 10m
2525
dialTimeout: 1m
2626
endpoints:
27-
- dbnode01:2379
27+
- etcd:2379
2828

2929
downsample:
3030
rules:

scripts/docker-integration-tests/aggregator/test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ echo "Pull containers required for test"
1414
docker pull $PROMREMOTECLI_IMAGE
1515
docker pull $JQ_IMAGE
1616

17+
docker-compose -f ${COMPOSE_FILE} up -d etcd
18+
1719
echo "Run m3dbnode"
1820
docker-compose -f ${COMPOSE_FILE} up -d dbnode01
1921

scripts/docker-integration-tests/aggregator_legacy/docker-compose.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
version: "3.5"
22
services:
3+
etcd:
4+
image: docker.io/bitnami/etcd:3.5
5+
environment:
6+
- ALLOW_NONE_AUTHENTICATION=yes
7+
networks:
8+
- backend
39
dbnode01:
410
expose:
511
- "9000-9004"
6-
- "2379-2380"
712
- "7201"
813
ports:
914
- "0.0.0.0:9000-9004:9000-9004"
10-
- "0.0.0.0:2379-2380:2379-2380"
1115
- "0.0.0.0:7201:7201"
1216
networks:
1317
- backend
1418
image: "m3dbnode_integration:${REVISION}"
19+
depends_on:
20+
- etcd
1521
m3coordinator01:
1622
expose:
1723
- "7202"
@@ -26,6 +32,8 @@ services:
2632
image: "m3coordinator_integration:${REVISION}"
2733
volumes:
2834
- "./m3coordinator.yml:/etc/m3coordinator/m3coordinator.yml"
35+
depends_on:
36+
- etcd
2937
m3aggregator01:
3038
expose:
3139
- "6001"
@@ -38,6 +46,8 @@ services:
3846
image: "m3aggregator_integration:${REVISION}"
3947
volumes:
4048
- "./m3aggregator.yml:/etc/m3aggregator/m3aggregator.yml"
49+
depends_on:
50+
- etcd
4151
m3aggregator02:
4252
networks:
4353
- backend
@@ -46,5 +56,7 @@ services:
4656
image: "m3aggregator_integration:${REVISION}"
4757
volumes:
4858
- "./m3aggregator.yml:/etc/m3aggregator/m3aggregator.yml"
59+
depends_on:
60+
- etcd
4961
networks:
50-
backend:
62+
backend: null

scripts/docker-integration-tests/aggregator_legacy/m3aggregator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ kvClient:
5757
etcdClusters:
5858
- zone: embedded
5959
endpoints:
60-
- dbnode01:2379
60+
- etcd:2379
6161

6262
runtimeOptions:
6363
kvConfig:

scripts/docker-integration-tests/aggregator_legacy/m3coordinator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ clusters:
2222
etcdClusters:
2323
- zone: embedded
2424
endpoints:
25-
- dbnode01:2379
25+
- etcd:2379
2626

2727
downsample:
2828
remoteAggregator:

scripts/docker-integration-tests/aggregator_legacy/test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ REVISION=$(git rev-parse HEAD)
77
COMPOSE_FILE="$M3_PATH"/scripts/docker-integration-tests/aggregator_legacy/docker-compose.yml
88
export REVISION
99

10+
echo "Run etcd"
11+
docker-compose -f ${COMPOSE_FILE} up -d etcd
12+
1013
echo "Run m3dbnode"
1114
docker-compose -f ${COMPOSE_FILE} up -d dbnode01
1215

scripts/docker-integration-tests/carbon/docker-compose.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
11
version: "3.5"
22
services:
3+
etcd:
4+
image: docker.io/bitnami/etcd:3.5
5+
expose:
6+
- "2379-2380"
7+
ports:
8+
- "0.0.0.0:2379-2380:2379-2380"
9+
environment:
10+
- ALLOW_NONE_AUTHENTICATION=yes
11+
networks:
12+
- backend
313
dbnode01:
414
expose:
515
- "9000-9004"
6-
- "2379-2380"
716
ports:
817
- "0.0.0.0:9000-9004:9000-9004"
9-
- "0.0.0.0:2379-2380:2379-2380"
1018
networks:
1119
- backend
1220
image: "m3dbnode_integration:${REVISION}"
21+
depends_on:
22+
- etcd
1323
coordinator01:
1424
expose:
1525
- "7201"
@@ -24,5 +34,7 @@ services:
2434
image: "m3coordinator_integration:${REVISION}"
2535
volumes:
2636
- "./:/etc/m3coordinator/"
37+
depends_on:
38+
- etcd
2739
networks:
28-
backend:
40+
backend: null

scripts/docker-integration-tests/carbon/m3coordinator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ clusters:
99
etcdClusters:
1010
- zone: embedded
1111
endpoints:
12-
- dbnode01:2379
12+
- etcd:2379
1313

1414
carbon:
1515
findResultsIncludeBothExpandableAndLeaf: true

0 commit comments

Comments
 (0)