VOL-282: Integrate demo components (e.g. dashd, shovel) with the clustered consul service
This submission migrates the dashd service to Docker swarm mode. The dashd implementation
did not use the '@' character to distinguish between a Consul service and a Docker service.
This submission adds support for both service types and a v3 compose file for a 'stats'
service stack. The shovel service will be added to this stackfile in a future submission.
Change-Id: Iad4695641d489666ed27a78b0a79539357a8e2be
diff --git a/compose/docker-compose-stats-swarm.yml b/compose/docker-compose-stats-swarm.yml
new file mode 100644
index 0000000..19a7d00
--- /dev/null
+++ b/compose/docker-compose-stats-swarm.yml
@@ -0,0 +1,35 @@
+#
+# This stackfile deploys dashd to a docker swarm.
+#
+# Dashd depends on:
+# - consul (service)
+# - kafka (service)
+# - grafana (service)
+# - voltha_net (overlay network)
+#
+# To deploy the stack, issue the command:
+#
+# docker stack deploy -c docker-compose-stats-swarm.yml stats
+#
+
+version: "3"
+services:
+ dashd:
+ image: cord/dashd
+ deploy:
+ replicas: 1
+ entrypoint:
+ - /dashd/dashd/main.py
+ - --kafka=kafka
+ - --consul=consul:8500
+ - --grafana_url=http://admin:admin@grafana:80/api
+ - --topic=voltha.kpis
+ - --docker_host=${DOCKER_HOST_IP}
+ networks:
+ - voltha-net
+
+networks:
+ voltha-net:
+ external:
+ name: voltha_net
+