Membership ephemeral entry and initial leader election
Also:
- env.sh to load what's needed for dev
- refactored main
- async consul client instead of blocking
diff --git a/compose/docker-compose-system-test.yml b/compose/docker-compose-system-test.yml
index d06aea3..3f7fb0f 100644
--- a/compose/docker-compose-system-test.yml
+++ b/compose/docker-compose-system-test.yml
@@ -10,9 +10,9 @@
- "8300:8300"
- "8400:8400"
- "8500:8500"
- - "8600:53/udp"
+ - "8600:8600/udp"
environment:
- SERVICE_53_IGNORE: "yes"
+ #SERVICE_53_IGNORE: "yes"
SERVICE_8300_IGNORE: "yes"
SERVICE_8400_IGNORE: "yes"
SERVICE_8500_NAME: "consul-rest"
@@ -21,7 +21,12 @@
#
registrator:
image: gliderlabs/registrator:latest
- command: -ip=10.0.2.15 -retry-attempts 100 -internal consul://consul:8500
+ command: [
+ "-ip=${DOCKER_HOST_IP}",
+ "-retry-attempts", "100",
+ # "-internal",
+ "consul://consul:8500"
+ ]
links:
- consul
volumes:
@@ -35,6 +40,8 @@
- "24224:24224"
volumes:
- "/tmp/fluentd:/fluentd/log"
+ environment:
+ SERVICE_24224_NAME: "fluentd-intake"
#
# Single-node voltha
#
@@ -45,7 +52,9 @@
"-v",
"--consul=consul:8500",
"--fluentd=fluentd:24224",
- "--rest-port=8880"
+ "--rest-port=8880",
+ "--instance-id-is-container-name",
+ "-v"
]
ports:
- 8880
@@ -59,17 +68,20 @@
SERVICE_8880_CHECK_HTTP: "/health"
SERVICE_8880_CHECK_INTERVAL: "5s"
SERVICE_8880_CHECK_TIMEOUT: "1s"
+ IMAGE_NAME: "{{DCOKER_IMAGE_NAME}}"
+ volumes:
+ - "/var/run/docker.sock:/tmp/docker.sock"
#
# Test container to see services available
#
- test:
- image: busybox
- command: tail -F /dev/null
- depends_on:
- - consul
- - voltha
- links:
- - consul
- - registrator
- - fluentd
- - voltha
+# test:
+# image: busybox
+# command: tail -F /dev/null
+# depends_on:
+# - consul
+# - voltha
+# links:
+# - consul
+# - registrator
+# - fluentd
+# - voltha