Skip to content

Commit b5a283c

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 4e40e13 commit b5a283c

Some content is hidden

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

41 files changed

+314
-189
lines changed

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

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
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+
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
12+
networks:
13+
- backend
314
dbnode01:
415
expose:
516
- "9000-9004"
6-
- "2379-2380"
717
- "7201"
818
ports:
919
- "0.0.0.0:9000-9004:9000-9004"
10-
- "0.0.0.0:2379-2380:2379-2380"
1120
- "0.0.0.0:7201:7201"
1221
networks:
1322
- backend
1423
image: "m3dbnode_integration:${REVISION}"
24+
depends_on:
25+
- etcd
1526
m3coordinator01:
1627
expose:
1728
- "7202"
@@ -26,6 +37,8 @@ services:
2637
image: "m3coordinator_integration:${REVISION}"
2738
volumes:
2839
- "./m3coordinator.yml:/etc/m3coordinator/m3coordinator.yml"
40+
depends_on:
41+
- etcd
2942
m3aggregator01:
3043
expose:
3144
- "6001"
@@ -38,6 +51,8 @@ services:
3851
image: "m3aggregator_integration:${REVISION}"
3952
volumes:
4053
- "./m3aggregator.yml:/etc/m3aggregator/m3aggregator.yml"
54+
depends_on:
55+
- etcd
4156
m3aggregator02:
4257
networks:
4358
- backend
@@ -46,5 +61,7 @@ services:
4661
image: "m3aggregator_integration:${REVISION}"
4762
volumes:
4863
- "./m3aggregator.yml:/etc/m3aggregator/m3aggregator.yml"
64+
depends_on:
65+
- etcd
4966
networks:
50-
backend:
67+
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: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
version: "3.5"
22
services:
3+
etcd:
4+
image: docker.io/bitnami/etcd:3.5
5+
environment:
6+
- ALLOW_NONE_AUTHENTICATION=yes
7+
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
8+
networks:
9+
- backend
310
dbnode01:
411
expose:
512
- "9000-9004"
6-
- "2379-2380"
713
- "7201"
814
ports:
915
- "0.0.0.0:9000-9004:9000-9004"
10-
- "0.0.0.0:2379-2380:2379-2380"
1116
- "0.0.0.0:7201:7201"
1217
networks:
1318
- backend
1419
image: "m3dbnode_integration:${REVISION}"
20+
depends_on:
21+
- etcd
1522
m3coordinator01:
1623
expose:
1724
- "7202"
@@ -26,6 +33,8 @@ services:
2633
image: "m3coordinator_integration:${REVISION}"
2734
volumes:
2835
- "./m3coordinator.yml:/etc/m3coordinator/m3coordinator.yml"
36+
depends_on:
37+
- etcd
2938
m3aggregator01:
3039
expose:
3140
- "6001"
@@ -38,6 +47,8 @@ services:
3847
image: "m3aggregator_integration:${REVISION}"
3948
volumes:
4049
- "./m3aggregator.yml:/etc/m3aggregator/m3aggregator.yml"
50+
depends_on:
51+
- etcd
4152
m3aggregator02:
4253
networks:
4354
- backend
@@ -46,5 +57,7 @@ services:
4657
image: "m3aggregator_integration:${REVISION}"
4758
volumes:
4859
- "./m3aggregator.yml:/etc/m3aggregator/m3aggregator.yml"
60+
depends_on:
61+
- etcd
4962
networks:
50-
backend:
63+
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: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
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+
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
12+
networks:
13+
- backend
314
dbnode01:
415
expose:
516
- "9000-9004"
6-
- "2379-2380"
717
ports:
818
- "0.0.0.0:9000-9004:9000-9004"
9-
- "0.0.0.0:2379-2380:2379-2380"
1019
networks:
1120
- backend
1221
image: "m3dbnode_integration:${REVISION}"
22+
depends_on:
23+
- etcd
1324
coordinator01:
1425
expose:
1526
- "7201"
@@ -24,5 +35,7 @@ services:
2435
image: "m3coordinator_integration:${REVISION}"
2536
volumes:
2637
- "./:/etc/m3coordinator/"
38+
depends_on:
39+
- etcd
2740
networks:
28-
backend:
41+
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)