VOL-595 - container image name consistency and general cleanup

Change-Id: Iccac1ccba61537cefa046118df139196e9e87713
diff --git a/compose/docker-compose-consul-cluster.yml b/compose/docker-compose-consul-cluster.yml
index 5bd37b9..16a4a45 100644
--- a/compose/docker-compose-consul-cluster.yml
+++ b/compose/docker-compose-consul-cluster.yml
@@ -1,4 +1,17 @@
+# Copyright 2017 the original author or authors.
 #
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
 # This stackfile deploys a Consul cluster to a docker swarm.
 #
 # The Consul cluster depends on:
@@ -9,13 +22,12 @@
 #     docker stack deploy -c docker-compose-consul-cluster.yml consul
 #
 # This command will create overlay network 'consul_net'.
-#
 
 version: "3"
 services:
 
   consul:
-    image: consul:0.9.2
+    image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
     logging:
       driver: "json-file"
       options:
@@ -30,18 +42,15 @@
           - node.role == manager
       restart_policy:
         condition: on-failure
-    environment:
-      CONSUL_LOCAL_CONFIG: "{disable_update_check: true}"
-      CONSUL_BIND_INTERFACE: eth0
     entrypoint:
       - consul
       - agent
       - -server
-      - -bootstrap-expect=3
+      - -bootstrap-expect=${SWARM_MANAGER_COUNT:-3}
       - -config-dir=/consul/config
       - -data-dir=/consul/data              # mandatory property
-      - -bind={{ GetInterfaceIP "eth0" }}
       - -client=0.0.0.0
+      - -advertise={{ GetAllInterfaces | include "network" "172.29.20.0/29" | sort "size,address" | attr "address" }}
       - -ui
       - -raft-protocol=3
       - -rejoin
@@ -60,8 +69,8 @@
       - "8500:8500"
       - "8600:8600/udp"
     volumes:
-      - /cord/incubator/voltha/consul/data:/consul/data
-      - /cord/incubator/voltha/consul/config:/consul/config
+      - ${CONSUL_ROOT:-/cord/incubator/voltha/consul}/data:/consul/data
+      - ${CONSUL_ROOT:-/cord/incubator/voltha/consul}/config:/consul/config
 
 networks:
   net: