VOL-595 - container image name consistency and general cleanup

Change-Id: Iccac1ccba61537cefa046118df139196e9e87713
diff --git a/.gitignore b/.gitignore
index c33f26f..0ae61cc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -84,3 +84,6 @@
 docs/manuals/user/_book
 docs/manual/user/*.pdf
 docs/manuals/user/node_modules/
+.coverage
+coverage.xml
+nosetests.xml
diff --git a/BUILD.md b/BUILD.md
index 33a5172..04cdf23 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -38,7 +38,7 @@
 make build
 ```
 
-The above has generated a new Docker image '''cord/voltha''' inside the VM. To see it, run:
+The above has generated a new Docker image '''voltha/voltha''' inside the VM. To see it, run:
 
 ```
 docker images
@@ -49,7 +49,7 @@
 The simplest way to run the image (in the foreground):
 
 ```
-docker run -ti --rm cord/voltha
+docker run -ti --rm voltha/voltha
 ```
 
 Unless you happen to have a consul agent running on your local system, you shall see that voltha is trying to connect to a consul agent, without success.
@@ -87,7 +87,7 @@
 With the IP address in hand, you can now start Voltha manually as:
 
 ```
-docker run -ti --rm --net=compose_default cord/voltha /voltha/voltha/main.py --consul=$CONSUL_IP:8500
+docker run -ti --rm --net=compose_default voltha/voltha /voltha/voltha/main.py --consul=$CONSUL_IP:8500
 ```
 
 This time it should successfully connect to consul and actually register itself.
@@ -372,7 +372,7 @@
 Then you shall be able to see the created image and run the container:
 
 ```
-docker run -ti cord/voltha
+docker run -ti voltha/voltha
 ```
 
 After this, much or all of the things you can do inside the Vagrant box should also work natively on the Mac.
diff --git a/Makefile b/Makefile
index a699518..170bbd9 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,10 @@
 $(error To get started, please source the env.sh file)
 endif
 
+ifeq ($(TAG),)
+TAG := latest
+endif
+
 include setup.mk
 
 ifneq ($(http_proxy)$(https_proxy),)
@@ -32,11 +36,11 @@
        --build-arg FTP_PROXY=$(FTP_PROXY) \
        --build-arg NO_PROXY=$(NO_PROXY)
 endif
-DOCKER_BUILD_ARGS = $(DOCKER_PROXY_ARGS) $(DOCKER_BUILD_EXTRA_ARGS)
+DOCKER_BUILD_ARGS = --build-arg TAG=$(TAG) $(DOCKER_PROXY_ARGS) $(DOCKER_CACHE_ARG) --rm --force-rm $(DOCKER_BUILD_EXTRA_ARGS)
 
 VENVDIR := venv-$(shell uname -s | tr '[:upper:]' '[:lower:]')
 
-.PHONY: $(DIRS) $(DIRS_CLEAN) $(DIRS_FLAKE8) flake8 docker-base voltha ofagent netconf shovel onos dashd vcli portainer grafana nginx consul envoy golang envoyd tools opennms logstash unum
+.PHONY: $(DIRS) $(DIRS_CLEAN) $(DIRS_FLAKE8) flake8 docker-base voltha ofagent netconf shovel onos dashd cli portainer grafana nginx consul envoy golang envoyd tools opennms logstash unum start stop
 
 # This should to be the first and default target in this Makefile
 help:
@@ -64,12 +68,15 @@
 	@echo "shovel       : Build the shovel docker container"
 	@echo "onos         : Build the onos docker container"
 	@echo "dashd        : Build the dashd docker container"
-	@echo "vcli         : Build the vcli docker container"
+	@echo "cli          : Build the cli docker container"
 	@echo "portainer    : Build the portainer docker container"
 	@echo "grafana      : Build the grafana docker container"
 	@echo "nginx        : Build the nginx docker container"
 	@echo "consul       : Build the consul docker container"
 	@echo "unum         : Build the unum docker container"
+	@echo "j2           : Build the Jinja2 template container"
+	@echo "start        : Start VOLTHA on the current system"
+	@echo "stop         : Stop VOLTHA on the current system"
 	@echo
 
 ## New directories can be added here
@@ -102,91 +109,104 @@
 	@echo "    FLAKE8 $(basename $@)"
 	-$(Q)$(MAKE) -C $(basename $@) flake8
 
-
 build: protos containers
 
 production: protos prod-containers
 
 jenkins : protos jenkins-containers
 
-jenkins-containers: docker-base voltha ofagent netconf consul unum
+jenkins-containers: docker-base voltha ofagent netconf consul unum j2
 
-prod-containers: docker-base voltha ofagent netconf shovel dashd vcli grafana consul tools golang envoyd envoy fluentd unum
+prod-containers: docker-base voltha ofagent netconf shovel dashd cli grafana consul tools golang envoyd envoy fluentd unum j2
 
-containers: docker-base voltha ofagent netconf shovel onos tester config-push dashd vcli portainer grafana nginx consul tools golang envoyd envoy fluentd unum
+containers: docker-base voltha ofagent netconf shovel onos tester config-push dashd cli portainer grafana nginx consul tools golang envoyd envoy fluentd unum j2
 
 docker-base:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/voltha-base -f docker/Dockerfile.base .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/voltha-base:$(TAG) -f docker/Dockerfile.base .
 
 voltha: voltha-adapters
-	docker build $(DOCKER_BUILD_ARGS) -t cord/voltha -f docker/Dockerfile.voltha .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/voltha:$(TAG) -f docker/Dockerfile.voltha .
 
 voltha-adapters:
 	make -C voltha/adapters/asfvolt16_olt
 
 ofagent:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/ofagent -f docker/Dockerfile.ofagent .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/ofagent:$(TAG) -f docker/Dockerfile.ofagent .
 
 tools:
-	docker build $(DOCKER_BUILD_ARGS) -t voltha/tools -f docker/Dockerfile.tools .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/tools:$(TAG) -f docker/Dockerfile.tools .
 
 fluentd:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/fluentd -f docker/Dockerfile.fluentd .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/fluentd:$(TAG) -f docker/Dockerfile.fluentd .
 
 envoy:
-	docker build $(DOCKER_BUILD_ARGS) -t voltha/envoy -f docker/Dockerfile.envoy .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/envoy:$(TAG) -f docker/Dockerfile.envoy .
 
 envoyd:
 	make -C envoy
 	make -C envoy/go/envoyd
 
 golang:
-	docker build $(DOCKER_BUILD_ARGS) -t go-builder -f envoy/go/golang-builder/Dockerfile ./envoy/go/golang-builder
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/go-builder:$(TAG) -f envoy/go/golang-builder/Dockerfile ./envoy/go/golang-builder
 
 netconf:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/netconf -f docker/Dockerfile.netconf .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/netconf:$(TAG) -f docker/Dockerfile.netconf .
 
 netopeer:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/netopeer -f docker/Dockerfile.netopeer .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/netopeer:$(TAG) -f docker/Dockerfile.netopeer .
 
 shovel:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/shovel -f docker/Dockerfile.shovel .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/shovel:$(TAG) -f docker/Dockerfile.shovel .
 
 dashd:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/dashd -f docker/Dockerfile.dashd .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/dashd:$(TAG) -f docker/Dockerfile.dashd .
 
-vcli:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/vcli -f docker/Dockerfile.cli .
+cli:
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/cli:$(TAG) -f docker/Dockerfile.cli .
 
 portainer:
 	portainer/buildPortainer.sh
 
 nginx:
-	docker build $(DOCKER_BUILD_ARGS) -t voltha/nginx -f docker/Dockerfile.nginx .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/nginx:$(TAG) -f docker/Dockerfile.nginx .
 
 consul:
-	docker build $(DOCKER_BUILD_ARGS) -t voltha/consul -f docker/Dockerfile.consul .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/consul:$(TAG) -f docker/Dockerfile.consul .
 
 grafana:
-	docker build $(DOCKER_BUILD_ARGS) -t voltha/grafana -f docker/Dockerfile.grafana .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/grafana:$(TAG) -f docker/Dockerfile.grafana .
 
 onos:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/onos -f docker/Dockerfile.onos docker
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/onos:$(TAG) -f docker/Dockerfile.onos docker
 
 unum:
-	docker build $(DOCKER_BUILD_ARGS) -t voltha/unum -f unum/Dockerfile ./unum
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/unum:$(TAG) -f unum/Dockerfile ./unum
 
 tester:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/tester -f docker/Dockerfile.tester docker
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/tester:$(TAG) -f docker/Dockerfile.tester docker
 
 config-push:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/config-push -f docker/Dockerfile.configpush docker
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/config-push:$(TAG) -f docker/Dockerfile.configpush docker
 
 opennms:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/opennms -f docker/Dockerfile.opennms .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/opennms:$(TAG) -f docker/Dockerfile.opennms .
 
 logstash:
-	docker build $(DOCKER_BUILD_ARGS) -t cord/logstash -f docker/Dockerfile.logstash .
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/logstash:$(TAG) -f docker/Dockerfile.logstash .
+
+j2:
+	docker build $(DOCKER_BUILD_ARGS) -t voltha/j2:$(TAG) -f docker/Dockerfile.j2 docker
+
+start:
+	bash -c 'echo $$VOLTHA_LOGS &&  TMP_STACK_FILE=$$(mktemp -u) && \
+		echo $$TMP_STACK_FILE && \
+		SWARM_MANAGER_COUNT=$$(docker node ls | grep Ready | egrep "(Leader)|(Reachable)" | wc -l | sed -e "s/ //g") && \
+	        cat ./compose/voltha-stack.yml.j2 2>&1 | docker run -e RADIUS_ROOT=$$RADIUS_ROOT -e CONSUL_ROOT=$$CONSUL_ROOT -e VOLTHA_LOGS=$$VOLTHA_LOGS -e SWARM_MANAGER_COUNT=$$SWARM_MANAGER_COUNT --rm -i voltha/j2 - 2>&1 > $$TMP_STACK_FILE && \
+	        docker stack deploy -c $$TMP_STACK_FILE voltha && \
+	        rm -f $$TMP_STACK_FILE'
+
+stop:
+	docker stack rm voltha
 
 protos:
 	make -C voltha/protos
@@ -280,7 +300,7 @@
 
 
 run-as-root-tests:
-	docker run -i --rm -v /cord/incubator/voltha:/voltha --privileged cord/voltha-base env PYTHONPATH=/voltha python /voltha/tests/itests/run_as_root/test_frameio.py
+	docker run -i --rm -v /cord/incubator/voltha:/voltha --privileged voltha/voltha-base env PYTHONPATH=/voltha python /voltha/tests/itests/run_as_root/test_frameio.py
 
 flake8: $(DIRS_FLAKE8)
 
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index dbe3ac5..0000000
--- a/build.gradle
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2016 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.
- */
-
-allprojects {
-    apply plugin: 'base'
-}
-
-ext {
-   // Deployment target config file (yaml format); this can be overwritten from the command line
-    // using the -PdeployConfig=<file-path> syntax.
-    deployConfig = project.hasProperty('deployConfig') ? project.getProperty('deployConfig') : './config/default.yml'
-
-    println "Using deployment config: $deployConfig"
-    File configFile = new File(deployConfig)
-    def yaml = new Yaml()
-    config = yaml.load(configFile.newReader())
-
-    // Upstream registry to simplify filling out the comps table below
-    upstreamReg = project.hasProperty('upstreamReg') ? project.getProperty('upstreamReg') : 'docker.io'
-
-    // Target registry to be used to publish docker images needed for deployment
-    targetReg = project.hasProperty('targetReg')
-        ? project.getProperty('targetReg')
-        : config.docker && config.docker.registry
-            ? config.docker.registry
-            : config.seedServer.ip
-                ? config.seedServer.ip + ":5000"
-                : 'localhost:5000'
-
-    // The tag used to tag the docker images push to the target registry
-    targetTag = project.hasProperty('targetTag')
-        ? project.getProperty('targetTag')
-        : config.docker && config.docker.imageVersion
-            ? config.docker.imageVersion
-            : 'candidate'
-}
-
-// ~~~~~~~~~~~~~~~~~~~ Global tasks ~~~~~~~~~~~~~~~~~~~~~~~
-
-// To be used to fetch upstream binaries, clone repos, etc.
-task fetch(type: Exec) {
-    commandLine ".", "env.sh", "&&", "make", "fetch"
-}
-
-// To be used to generate all needed binaries that need to be present on the target
-// as docker images in the local docker runner.
-task buildImages(type: Exec) {
-    commandLine ".", "env.sh", "&&", "make"
-}
-
-task tagImage(type: Exec) {
-   dependsOn buildImages
-   commandLine "docker", 'tag', 'cord/voltha', "$targetReg/cord/voltha:$targetTag"
-}
-
-// Publish image(s) built during the build step into targetReg registry using the targetTag
-// tag. See maas subproject for examples on how to do this.
-task publishImages(type: Exec) {
-    dependsOn tagImage
-    commandLine "docker", 'push', "$targetReg/cord/voltha:$targetTag"
-}
-
-task publish {
-    dependsOn publishImages
-}
diff --git a/compose/docker-compose-all.yml.j2 b/compose/docker-compose-all.yml.j2
new file mode 100755
index 0000000..f358573
--- /dev/null
+++ b/compose/docker-compose-all.yml.j2
@@ -0,0 +1,291 @@
+# 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.
+version: "3"
+services:
+
+  # The Fluentd container is part of the data collection
+  # infrastructure.
+  fluentd:
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      mode: replicated
+      replicas: {{ SWARM_MANAGER_COUNT | default(2) }}
+      restart_policy:
+        condition: any
+    environment:
+        SERVICE_24224_NAME: "fluentd-intake"
+        FLUENTD_CONF: fluent.conf
+        WAIT_FOR: "fluentdactv:24224 fluentdstby:24224"
+        WAIT_FOR_TIMEOUT: 0
+    networks:
+      - voltha-net
+    ports:
+      - "24224"
+
+  # Free RADIUS can be used to test VOLTHA's authentication 
+  # sequence, i.e., EAPOL from a device behind an OLT to 
+  # RADIUS authentication on the back end systems. By default
+  # no instances of Free RADIUS are deployed.
+  freeradius:
+    deploy:
+      replicas: 0
+    image: "${REGISTRY}marcelmaatkamp/freeradius:${RADIUS_TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    ports:
+      - "1812:1812/udp"
+      - "1813:1813"
+      - "18120:18120"
+    
+    # CONFIG: When deploying a Free RADIUS instance client and user
+    #      information will need to be configured for the service to
+    #      operate correctly.
+    #
+    #volumes:
+    #   - ${RADIUS_ROOT}/data/clients.conf:/etc/raddb/clients.conf
+    #   - ${RADIUS_ROOT}/data/users:/etc/raddb/users
+    networks:
+      - voltha-net
+
+  # The cluster manager container calculates and servers ONOS cluster
+  # meta data via HTTP so that ONOS instances can form an HA cluster.
+  # The cluster manager must run on a manager node so that it can 
+  # retrieve service information from manager nodes
+  onos_cluster_manager:
+    image: "${REGISTRY}voltha/unum:${TAG:-latest}"
+    deploy:
+      replicas: 1
+      placement:
+        constraints:
+          - node.role == manager
+    environment:
+      PERIOD: "10s"
+      LOG_LEVEL: "debug"
+      ORCHESTRATION: "swarm://"
+      LABELS: "org.voltha.onos.cluster:true"
+      NETWORK: "org.voltha.onos.cluster:true"
+    ports:
+      - 5411:5411
+    networks:
+      - voltha-net
+    volumes:
+      - /var/run/docker.sock:/var/run/docker.sock
+
+  # ONOS is the SDN controller for the solution and handles AAA,
+  # IGMP proxy, and L2 DHCP requests as well as manages flows
+  # down to the virtual devices (MCAST + OLT flows).
+  # Currently there is a single instance of ONOS as some of the
+  # applications running under ONOS do not support HA.
+  onos:
+    deploy:
+      replicas: 1
+      labels:
+        org.voltha.onos.cluster: "true"
+    image: "${REGISTRY}voltha/onos:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    ports:
+      - 8101:8101 # ssh
+      - 6653:6653 # OF
+      - 8181:8181 # UI
+    environment:
+      EXTRA_JAVA_OPTS: "-Donos.cluster.metadata.uri=http://onos_cluster_manager:5411/config/"
+    networks:
+      - voltha-net
+
+  # The VCORE container is the core capabilities of VOLTHA including
+  # interacting with device adapters
+  vcore:
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      replicas: {{ SWARM_MANAGER_COUNT | default(3) }}
+    entrypoint:
+      - voltha/voltha/main.py
+      - -v
+      - --consul=consul:8500
+      - --fluentd=fluentd:24224
+      - --kafka=kafka
+      - --rest-port=8880
+      - --grpc-port=50556
+      - --instance-id-is-container-name
+      - --backend=consul
+      - --inter-core-subnet=172.29.19.0/24
+      - --pon-subnet=172.29.19.0/24
+    networks:
+      - voltha-net
+    ports:
+      - "8880:8880"
+      - "18880:18880"
+      - "50556:50556"
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock
+
+  # The OpenFlow Agent support the OpenFlow protocol communication
+  # between ONOS and VOLTHA.
+  ofagent:
+    image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      replicas: 1
+    entrypoint:
+      - /ofagent/ofagent/main.py
+      - -v
+      - --consul=consul:8500
+      - --fluentd=fluentd:24224
+      - --controller=onos:6653
+      - --grpc-endpoint=vcore:50556
+      - --instance-id-is-container-name
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock
+    networks:
+      - voltha-net
+
+  # The VOLTHA container supports load balancing of request to
+  # the VOLTHA components as well as surfaces a REST API and maps
+  # the requests to GPRC
+  voltha:
+    image: "${REGISTRY}voltha/envoy:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      replicas: 1
+    entrypoint:
+      - /usr/local/bin/envoyd
+      - -envoy-cfg-template
+      - "/envoy/voltha-grpc-proxy.template.json"
+      - -envoy-config
+      - "/envoy/voltha-grpc-proxy.json"
+    networks:
+      - voltha-net
+    ports:
+      - "50555:50555"
+      - "8882:8882"
+      - "8443:8443"
+      - "8001:8001"
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock
+
+  # The CLI container provides an CLI to the VOLTHA capabilitiy 
+  # that can be accessed via SSH.
+  cli:
+    image: "${REGISTRY}voltha/cli:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      replicas: {{ SWARM_MANAGER_COUNT | default(2) }}
+    entrypoint:
+      - /cli/cli/setup.sh
+      - -C consul:8500
+      - -g voltha:50555
+      - -s voltha:18880
+      - -G
+    networks:
+      - voltha-net
+    ports:
+      - "5022:22"
+
+  # The Netconf container provides an NETCONF API to be used
+  # with VOLTHA and maps that to GRPC requests
+  netconf:
+    image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      mode: global
+    environment:
+      SERVICE_1830_NAME: "netconf-server"
+    entrypoint:
+      - /netconf/netconf/main.py
+      - -v
+      - --consul=consul:8500
+      - --fluentd=fluentd:24224
+      - --grpc-endpoint=voltha:50555
+      - --instance-id-is-container-name
+    networks:
+      - voltha-net
+    ports:
+      - "830:1830"
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock
+
+  # The tools container provides a bash command shell to which
+  # an operator can SSH that has the same network connectivity
+  # as other VOLTHA containers and is thus a convenient 
+  # troubleshooting tool
+  tools:
+    image: "${REGISTRY}voltha/tools:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      mode: replicated
+      replicas: 1
+      restart_policy:
+        condition: on-failure
+    ports:
+      - "4022:22"
+    networks:
+      - voltha-net
+      - kafka-net
+
+networks:
+  onos:
+    driver: overlay
+    driver_opts:
+      encrypted: "true"
+    ipam:
+      driver: default
+      config:
+        - subnet: 172.25.0.0/24
+    labels:
+      org.voltha.onos.cluster: "true"
+
+  voltha-net:
+    external:
+      name: voltha_net
+
+  kafka-net:
+    external:
+      name: kafka_net
diff --git a/compose/docker-compose-auth-test.yml b/compose/docker-compose-auth-test.yml
index c4d4fc7..f5d4b67 100644
--- a/compose/docker-compose-auth-test.yml
+++ b/compose/docker-compose-auth-test.yml
@@ -3,7 +3,7 @@
 services:
 
  freeradius:
-  image: "marcelmaatkamp/freeradius"
+   image: "${REGISTRY}marcelmaatkamp/freeradius:${RADIUS_TAG:-latest}"
   ports:
    - "1812:1812/udp"
    - "1813:1813"
@@ -16,7 +16,7 @@
     ipv4_address: 172.25.0.100
 
  onos:
-  image: "cord/onos"
+  image: "${REGISTRY}voltha/onos:${TAG:-latest}"
   ports:
    - "8101:8101" # ssh
    - "6653:6653" # OF
@@ -28,7 +28,7 @@
      ipv4_address: 172.25.0.200
 
 # onos_config_push:
-#  image: onos-config-push:phase2
+#  image: "${REGISTRY}onos-config-push:${TAG:-latest}"
 #  environment:
 #   ONOS_CONNECTION: 'onos:8181'
 #  volumes:
@@ -39,7 +39,7 @@
 #   - "onos:onos"
 
 # freeradius-test:
-#  image: "marcelmaatkamp/freeradius"
+#  image: "${REGISTRY}marcelmaatkamp/freeradius:${RADIUS_TAG:-latest}"
 #  command: "radtest user password freeradius 0 SECRET"
 #  networks:
 #   authnet:
diff --git a/compose/docker-compose-vcli.yml b/compose/docker-compose-cli.yml
similarity index 86%
rename from compose/docker-compose-vcli.yml
rename to compose/docker-compose-cli.yml
index 553fc14..e980f51 100644
--- a/compose/docker-compose-vcli.yml
+++ b/compose/docker-compose-cli.yml
@@ -4,13 +4,13 @@
 # The stackfile assumes that overlay network 'voltha_net' has already been
 # created. To deploy the stack, issue the command:
 #
-#     docker stack deploy -c docker-compose-vcli.yml cli
+#     docker stack deploy -c docker-compose-cli.yml cli
 #
 
 version: "3"
 services:
   cli:
-    image: cord/vcli:latest
+    image: "${REGISTRY}voltha/cli:${TAG:-latest}"
     logging:
       driver: "json-file"
       options:
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:
diff --git a/compose/docker-compose-dashd.yml b/compose/docker-compose-dashd.yml
index 752ad45..3b5080d 100755
--- a/compose/docker-compose-dashd.yml
+++ b/compose/docker-compose-dashd.yml
@@ -4,7 +4,7 @@
   # Dashboard daemon
   #
   dashd:
-    image: cord/dashd
+    image: "${REGISTRY}voltha/dashd:${TAG:-latest}"
     command: [
       "/dashd/dashd/main.py",
       "--kafka=@kafka",
@@ -23,17 +23,17 @@
   # Single-node kafka service
   #
   kafka:
-    image: wurstmeister/kafka
+    image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
 
   #
   # Single-node consul agent
   #
   consul:
-    image: consul:latest
+    image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
 
   #
   # Graphite-Grafana-statsd service instance
   # (demo place-holder for external KPI system)
   #
   grafana:
-    image: kamon/grafana_graphite
+    image: "${REGISTRY}kamon/grafana_graphite:${TAG:-latest}"
diff --git a/compose/docker-compose-docutests.yml b/compose/docker-compose-docutests.yml
index d53b1db..6a0db8c 100644
--- a/compose/docker-compose-docutests.yml
+++ b/compose/docker-compose-docutests.yml
@@ -4,7 +4,7 @@
   # Single-node zookeeper service
   #
   zookeeper:
-    image: wurstmeister/zookeeper
+    image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
     ports:
     - 2181
     environment:
@@ -13,7 +13,7 @@
   # Single-node kafka service
   #
   kafka:
-    image: wurstmeister/kafka
+    image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
     ports:
      - 9092
     environment:
@@ -30,7 +30,7 @@
   # Single-node consul agent
   #
   consul:
-    image: consul:latest
+    image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
     command: agent -server -bootstrap -client 0.0.0.0 -ui
     ports:
     - "8300:8300"
@@ -46,7 +46,7 @@
   # Registrator
   #
   registrator:
-    image: gliderlabs/registrator:latest
+    image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
     command: [
       "-ip=${DOCKER_HOST_IP}",
       "-retry-attempts", "100",
@@ -63,7 +63,7 @@
   # Fluentd log server
   #
   fluentd:
-    image: fluent/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     ports:
     - "24224:24224"
     volumes:
@@ -75,7 +75,7 @@
   # Voltha server instance(s)
   #
   voltha:
-    image: cord/voltha
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
     command: [
       "/voltha/voltha/main.py",
       "-v",
@@ -115,7 +115,7 @@
   # ofagent server instance
   #
   ofagent:
-    image: cord/ofagent
+    image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
     command: [
       "/ofagent/ofagent/main.py",
       "-v",
@@ -140,7 +140,7 @@
   # Netconf server instance(s)
   #
   netconf:
-    image: cord/netconf
+    image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
     privileged: true
     command: [
       "/netconf/netconf/main.py",
diff --git a/compose/docker-compose-elasticsearch.yml b/compose/docker-compose-elasticsearch.yml
index 0b190b2..97f6176 100644
--- a/compose/docker-compose-elasticsearch.yml
+++ b/compose/docker-compose-elasticsearch.yml
@@ -2,7 +2,7 @@
 
 services:
   elasticsearch:
-    image: docker.elastic.co/elasticsearch/elasticsearch:5.6.0
+    image: "${REGISTRY}docker.elastic.co/elasticsearch/elasticsearch:${ELASTIC_TAG:-5.6.0}"
     environment:
       - transport.host=localhost
       - transport.tcp.port=9300
diff --git a/compose/docker-compose-envoy-swarm.yml b/compose/docker-compose-envoy-swarm.yml
index b9e905d..fc299e9 100644
--- a/compose/docker-compose-envoy-swarm.yml
+++ b/compose/docker-compose-envoy-swarm.yml
@@ -10,7 +10,7 @@
 version: "3"
 services:
   voltha:
-    image: voltha/envoy:latest
+    image: "${REGISTRY}voltha/envoy:${TAG:-latest}"
     logging:
       driver: "json-file"
       options:
diff --git a/compose/docker-compose-fixed-port.yml b/compose/docker-compose-fixed-port.yml
index 5fb8749..d3b1c85 100644
--- a/compose/docker-compose-fixed-port.yml
+++ b/compose/docker-compose-fixed-port.yml
@@ -4,7 +4,7 @@
   # Single-node zookeeper service
   #
   zookeeper:
-    image: wurstmeister/zookeeper
+    image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
     ports:
      - "2181:2181"
     environment:
@@ -13,7 +13,7 @@
   # Single-node kafka service
   #
   kafka:
-    image: wurstmeister/kafka
+    image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
     ports:
      - "9092:9092"
     environment:
@@ -30,7 +30,7 @@
   # Single-node consul agent
   #
   consul:
-    image: consul:latest
+    image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
     command: agent -server -bootstrap -client 0.0.0.0 -ui
     ports:
     - "8300:8300"
@@ -46,7 +46,7 @@
   # Registrator
   #
   registrator:
-    image: gliderlabs/registrator:latest
+    image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
     command: [
       "-ip=${DOCKER_HOST_IP}",
       "-retry-attempts", "100",
@@ -62,7 +62,7 @@
   # Fluentd log server
   #
   fluentd:
-    image: fluent/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     ports:
     - "24224:24224"
     volumes:
@@ -75,7 +75,7 @@
   # (demo place-holder for external KPI system)
   #
   grafana:
-    image: kamon/grafana_graphite
+    image: "${REGISTRY}kamon/grafana_graphite:${GRAPHITE_TAG:-latest}"
     ports:
     - "8882:80"
     - "2003:2003"
@@ -93,7 +93,7 @@
   # Shovel (Kafka-graphite-gateway)
   #
   shovel:
-    image: cord/shovel
+    image: "${REGISTRY}voltha/shovel:${TAG:-latest}"
     command: [
       "/shovel/shovel/main.py",
       "--kafka=@kafka",
@@ -111,7 +111,7 @@
   # Voltha server instance(s)
   #
   voltha:
-    image: cord/voltha
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
     command: [
       "/voltha/voltha/main.py",
       "-v",
@@ -154,7 +154,7 @@
   # ofagent server instance
   #
   ofagent:
-    image: cord/ofagent
+    image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
     command: [
       "/ofagent/ofagent/main.py",
       "-v",
@@ -179,7 +179,7 @@
   # Netconf server instance(s)
   #
   netconf:
-    image: cord/netconf
+    image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
     privileged: true
     command: [
       "/netconf/netconf/main.py",
@@ -207,7 +207,7 @@
   # Dashboard daemon
   #
   dashd:
-    image: cord/dashd
+    image: "${REGISTRY}voltha/dashd:${TAG:-latest}"
     command: [
       "/dashd/dashd/main.py",
       "--kafka=@kafka",
diff --git a/compose/docker-compose-fluentd-agg-cluster.yml b/compose/docker-compose-fluentd-agg-cluster.yml
index 9f82fa4..fceb6cf 100644
--- a/compose/docker-compose-fluentd-agg-cluster.yml
+++ b/compose/docker-compose-fluentd-agg-cluster.yml
@@ -13,7 +13,7 @@
 #
 
   fluentdactv:
-    image: cord/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     logging:
       driver: "json-file"
       options:
@@ -30,10 +30,10 @@
     ports:
       - "24224"
     volumes:
-      - "/var/log/voltha/logging_volume:/fluentd/log"
+      - ${VOLTHA_LOGS:-/var/log/voltha/logging_volume}:/fluentd/log
 
   fluentdstby:
-    image: cord/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     logging:
       driver: "json-file"
       options:
@@ -50,7 +50,7 @@
     ports:
       - "24224"
     volumes:
-      - "/var/log/voltha/logging_volume:/fluentd/log"
+      - ${VOLTHA_LOGS:-/var/log/voltha/logging_volume}:/fluentd/log
 
 networks:
   voltha-net:
diff --git a/compose/docker-compose-fluentd-cluster.yml b/compose/docker-compose-fluentd-cluster.yml
index dead717..18b9812 100644
--- a/compose/docker-compose-fluentd-cluster.yml
+++ b/compose/docker-compose-fluentd-cluster.yml
@@ -13,7 +13,7 @@
 #
 
   fluentd:
-    image: cord/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     logging:
       driver: "json-file"
       options:
diff --git a/compose/docker-compose-grafana-swarm.yml b/compose/docker-compose-grafana-swarm.yml
index 0ff00de..bf6bd76 100644
--- a/compose/docker-compose-grafana-swarm.yml
+++ b/compose/docker-compose-grafana-swarm.yml
@@ -12,7 +12,7 @@
 version: "3"
 services:
   grafana:
-    image: kamon/grafana_graphite
+    image: "${REGISTRY}kamon/grafana_graphite:${TAG:-latest}"
     logging:
       driver: "json-file"
       options:
diff --git a/compose/docker-compose-kafka-cluster.yml b/compose/docker-compose-kafka-cluster.yml
index 1c2dbb2..53fd141 100644
--- a/compose/docker-compose-kafka-cluster.yml
+++ b/compose/docker-compose-kafka-cluster.yml
@@ -16,7 +16,7 @@
 version: '3'
 services:
     zk1:
-        image: zookeeper
+        image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
         logging:
             driver: "json-file"
             options:
@@ -29,7 +29,7 @@
             ZOO_SERVERS: server.1=0.0.0.0:2888:3888 server.2=zk2:2888:3888 server.3=zk3:2888:3888
 
     zk2:
-        image: zookeeper
+        image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
         logging:
             driver: "json-file"
             options:
@@ -42,7 +42,7 @@
             ZOO_SERVERS: server.1=zk1:2888:3888 server.2=0.0.0.0:2888:3888 server.3=zk3:2888:3888
 
     zk3:
-        image: zookeeper
+        image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
         logging:
             driver: "json-file"
             options:
@@ -57,7 +57,7 @@
     kafka:
         deploy:
             mode: global
-        image: wurstmeister/kafka
+        image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
         logging:
             driver: "json-file"
             options:
diff --git a/compose/docker-compose-logstash-swarm.yml b/compose/docker-compose-logstash-swarm.yml
index 1f566ed..814ed9d 100644
--- a/compose/docker-compose-logstash-swarm.yml
+++ b/compose/docker-compose-logstash-swarm.yml
@@ -2,7 +2,7 @@
 
 services:
   logstash:
-    image: cord/logstash
+    image: "${REGISTRY}voltha/logstash:${TAG:-latest}"
     environment:
       - log.level=info
       - xpack.monitoring.enabled=false
diff --git a/compose/docker-compose-logstash.yml b/compose/docker-compose-logstash.yml
index 38a5881..53a875f 100644
--- a/compose/docker-compose-logstash.yml
+++ b/compose/docker-compose-logstash.yml
@@ -2,7 +2,7 @@
 
 services:
   logstash:
-    image: cord/logstash
+    image: "${REGISTRY}voltha/logstash:${TAG:-latest}"
     environment:
       - log.level=info
     command: logstash -f /etc/logstash/conf.d/
diff --git a/compose/docker-compose-netconf-swarm.yml b/compose/docker-compose-netconf-swarm.yml
index 3259c47..8df65ac 100644
--- a/compose/docker-compose-netconf-swarm.yml
+++ b/compose/docker-compose-netconf-swarm.yml
@@ -13,7 +13,7 @@
 version: "3"
 services:
   netconf:
-    image: cord/netconf:latest
+    image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
     logging:
       driver: "json-file"
       options:
diff --git a/compose/docker-compose-netopeer.yml b/compose/docker-compose-netopeer.yml
index 6ed9953..df00ec4 100755
--- a/compose/docker-compose-netopeer.yml
+++ b/compose/docker-compose-netopeer.yml
@@ -1,6 +1,6 @@
 version: '2'
 services:
   netopeer:
-    image: cord/netopeer
+    image: "${REGISTRY}voltha/netopeer:${TAG:-latest}"
     ports:
       - "1830:830"
diff --git a/compose/docker-compose-ofagent-swarm.yml b/compose/docker-compose-ofagent-swarm.yml
index d11ffcf..ef0be02 100644
--- a/compose/docker-compose-ofagent-swarm.yml
+++ b/compose/docker-compose-ofagent-swarm.yml
@@ -9,7 +9,7 @@
 version: "3.2"
 services:
     ofagent:
-        image: cord/ofagent
+        image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
         logging:
             driver: "json-file"
             options:
diff --git a/compose/docker-compose-ofagent-test.yml b/compose/docker-compose-ofagent-test.yml
index 20d20ca..d20a6a5 100644
--- a/compose/docker-compose-ofagent-test.yml
+++ b/compose/docker-compose-ofagent-test.yml
@@ -5,7 +5,7 @@
   # Single-node consul agent
   #
   consul:
-    image: consul:latest
+    image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
     command: agent -server -bootstrap -client 0.0.0.0 -ui
     ports:
     - "8300:8300"
@@ -21,7 +21,7 @@
   # Registrator
   #
   registrator:
-    image: gliderlabs/registrator:latest
+    image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
     command: [
       "-ip=${DOCKER_HOST_IP}",
       "-retry-attempts", "100",
@@ -38,7 +38,7 @@
   # Fluentd log server
   #
   fluentd:
-    image: fluent/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     ports:
     - "24224:24224"
     volumes:
@@ -50,7 +50,7 @@
   # Voltha server instance(s)
   #
   voltha:
-    image: cord/voltha
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
     command: [
       "/voltha/voltha/main.py",
       "-v",
@@ -88,7 +88,7 @@
     - ponmgmt
 
   envoy:
-    image: voltha/envoy
+    image: "${REGISTRY}voltha/envoy:${TAG:-latest}"
     entrypoint:
       - /usr/local/bin/envoyd
       - -envoy-cfg-template
@@ -112,8 +112,8 @@
   #
   # Voltha cli container
   #
-  vcli:
-    image: cord/vcli
+  cli:
+    image: "${REGISTRY}voltha/cli:${TAG:-latest}"
     command: [
       "/cli/cli/setup.sh",
       "-L",
@@ -130,7 +130,7 @@
   # onos-1
   #
   onos1:
-    image: cord/onos 
+    image: "${REGISTRY}voltha/onos:${TAG:-latest}"
     container_name: onos1
     ports:
     - 6633:6653
@@ -146,7 +146,7 @@
   # onos-2
   #
   onos2:
-    image: cord/onos
+    image: "${REGISTRY}voltha/onos:${TAG:-latest}"
     container_name: onos2
     ports:
     - 6644:6653
@@ -162,7 +162,7 @@
   # onos-3
   #
   onos3:
-    image: cord/onos
+    image: "${REGISTRY}voltha/onos:${TAG:-latest}"
     container_name: onos3
     ports:
     - 6655:6653
@@ -177,7 +177,7 @@
   # ofagent server instance
   #
   ofagent:
-    image: cord/ofagent
+    image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
     command: /ofagent/ofagent/main.py -v --consul=${DOCKER_HOST_IP}:8500 --fluentd=fluentd:24224 --controller ${DOCKER_HOST_IP}:6633 ${DOCKER_HOST_IP}:6644 ${DOCKER_HOST_IP}:6655 --grpc-endpoint=@voltha-grpc --instance-id-is-container-name --enable-tls --key-file=/ofagent/pki/voltha.key --cert-file=/ofagent/pki/voltha.crt
     depends_on:
     - consul
diff --git a/compose/docker-compose-onos-swarm.yml b/compose/docker-compose-onos-swarm.yml
index f4cc89b..d441cb0 100644
--- a/compose/docker-compose-onos-swarm.yml
+++ b/compose/docker-compose-onos-swarm.yml
@@ -11,7 +11,7 @@
     freeradius:
         deploy:
             replicas: 1
-        image: "marcelmaatkamp/freeradius"
+        image: "${REGISTRY}marcelmaatkamp/freeradius:${RADIUS_TAG:-latest}"
         logging:
             driver: "json-file"
             options:
@@ -29,7 +29,7 @@
             - voltha-net
 
     onos_cluster_manager:
-        image: "voltha/unum"
+        image: "${REGISTRY}voltha/unum:${TAG:-latest}"
         deploy:
             replicas: 1
             placement:
@@ -52,7 +52,7 @@
            replicas: 3
            labels:
                org.voltha.onos.cluster: "true"
-        image: "cord/onos"
+        image: "${REGISTRY}voltha/onos:${TAG:-latest}"
         logging:
             driver: "json-file"
             options:
diff --git a/compose/docker-compose-opennms.yml b/compose/docker-compose-opennms.yml
index d1dbcb6..fe9b349 100644
--- a/compose/docker-compose-opennms.yml
+++ b/compose/docker-compose-opennms.yml
@@ -1,12 +1,12 @@
 version: '2'
 services:
   database_data:
-    image: tianon/true
+    image: "${REGISTRY}tianon/true:${TRUE_TAG:-latest}"
     volumes:
         - /var/lib/postgresql/data
 
   database:
-    image: postgres:9.6.1
+    image: "${REGISTRY}postgres:${POSTGRES_TAG:-9.6.1}"
     env_file:
       - ./opennms/env/postgres.env
     ports:
@@ -17,14 +17,14 @@
       - database_data:rw
 
   opennms_data:
-    image: tianon/true
+    image: "${REGISTRY}tianon/true:${TRUE_TAG:-latest}"
     volumes:
       - /var/log/opennms
       - /var/opennms/rrd
       - /var/opennms/reports
 
   opennms:
-    image: cord/opennms
+    image: "${REGISTRY}voltha/opennms:${TAG:-latest}"
     env_file:
       - ./opennms/env/opennms.env
       - ./opennms/env/postgres.env
diff --git a/compose/docker-compose-registry.yml b/compose/docker-compose-registry.yml
index dc6bb91..cb44be9 100644
--- a/compose/docker-compose-registry.yml
+++ b/compose/docker-compose-registry.yml
@@ -8,7 +8,7 @@
 version: "3"
 services:
   registry:
-    image: registry:2
+    image: "${REGISTRY}registry:${REGISTRY_TAG:-2}"
     logging:
       driver: "json-file"
       options:
diff --git a/compose/docker-compose-stats-swarm.yml b/compose/docker-compose-stats-swarm.yml
index 447be5c..5120e8a 100644
--- a/compose/docker-compose-stats-swarm.yml
+++ b/compose/docker-compose-stats-swarm.yml
@@ -15,7 +15,7 @@
 version: "3"
 services:
   dashd:
-    image: cord/dashd
+    image: "${REGISTRY}voltha/dashd:${TAG:-latest}"
     logging:
       driver: "json-file"
       options:
@@ -34,7 +34,7 @@
       - voltha-net
 
   shovel:
-    image: cord/shovel
+    image: "${REGISTRY}voltha/shovel:${TAG:-latest}"
     logging:
       driver: "json-file"
       options:
diff --git a/compose/docker-compose-system-test-dispatcher.yml b/compose/docker-compose-system-test-dispatcher.yml
index 286ebbe..d88517a 100644
--- a/compose/docker-compose-system-test-dispatcher.yml
+++ b/compose/docker-compose-system-test-dispatcher.yml
@@ -4,7 +4,7 @@
   # Single-node zookeeper service
   #
   zookeeper:
-    image: wurstmeister/zookeeper
+    image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
     ports:
     - 2181
     environment:
@@ -13,7 +13,7 @@
   # Single-node kafka service
   #
   kafka:
-    image: wurstmeister/kafka
+    image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
     ports:
      - 9092
     environment:
@@ -30,7 +30,7 @@
   # Single-node consul agent
   #
   consul:
-    image: consul:latest
+    image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
     command: agent -server -bootstrap -client 0.0.0.0 -ui
     ports:
     - "8300:8300"
@@ -46,7 +46,7 @@
   # Registrator
   #
   registrator:
-    image: gliderlabs/registrator:latest
+    image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
     command: [
       "-ip=${DOCKER_HOST_IP}",
       "-retry-attempts", "100",
@@ -63,7 +63,7 @@
   # Fluentd log server
   #
   fluentd:
-    image: fluent/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     ports:
     - "24224:24224"
     volumes:
@@ -76,7 +76,7 @@
   # (demo place-holder for external KPI system)
   #
   grafana:
-    image: voltha/grafana
+    image: "${REGISTRY}voltha/grafana:${TAG:-latest}"
     ports:
     - "8883:80"
     - "2003:2003"
@@ -95,7 +95,7 @@
   # Shovel (Kafka-graphite-gateway)
   #
   shovel:
-    image: cord/shovel
+    image: "${REGISTRY}voltha/shovel:${TAG:-latest}"
     command: [
       "/shovel/shovel/main.py",
       "--kafka=@kafka",
@@ -113,7 +113,7 @@
   # Voltha server instance(s)
   #
   voltha:
-    image: cord/voltha
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
     command: [
       "/voltha/voltha/main.py",
       "-v",
@@ -151,7 +151,7 @@
     - ponmgmt
 
   envoy:
-    image: voltha/envoy
+    image: "${REGISTRY}voltha/envoy:${TAG:-latest}"
     entrypoint:
       - /usr/local/bin/envoyd
       - -envoy-cfg-template
@@ -175,8 +175,8 @@
   #
   # Voltha cli container
   #
-  vcli:
-    image: cord/vcli
+  cli:
+    image: "${REGISTRY}voltha/cli:${TAG:-latest}"
     command: [
       "/cli/cli/setup.sh",
       "-L",
@@ -197,7 +197,7 @@
   # ofagent server instance
   #
   ofagent:
-    image: cord/ofagent
+    image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
     command: [
       "/ofagent/ofagent/main.py",
       "-v",
@@ -222,7 +222,7 @@
   # Netconf server instance(s)
   #
   netconf:
-    image: cord/netconf
+    image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
     privileged: true
     command: [
       "/netconf/netconf/main.py",
diff --git a/compose/docker-compose-system-test-encrypted.yml b/compose/docker-compose-system-test-encrypted.yml
index 7973dd7..aff19ca 100644
--- a/compose/docker-compose-system-test-encrypted.yml
+++ b/compose/docker-compose-system-test-encrypted.yml
@@ -4,7 +4,7 @@
   # Single-node zookeeper service
   #
   zookeeper:
-    image: wurstmeister/zookeeper
+    image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
     ports:
     - 2181
     environment:
@@ -13,7 +13,7 @@
   # Single-node kafka service
   #
   kafka:
-    image: wurstmeister/kafka
+    image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
     ports:
      - 9092
     environment:
@@ -30,7 +30,7 @@
   # Single-node consul agent
   #
   consul:
-    image: voltha/consul
+    image: "${REGISTRY}voltha/consul:${CONSUL_TAG:-0.9.2}"
     command: agent -server -bootstrap -client 0.0.0.0 -ui
     ports:
     - "8300:8300"
@@ -46,7 +46,7 @@
   # Registrator
   #
   registrator:
-    image: voltha/registrator
+    image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
     command: [
       "-ip=${DOCKER_HOST_IP}",
       "-retry-attempts", "100",
@@ -66,7 +66,7 @@
   # Fluentd log server
   #
   fluentd:
-    image: fluent/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     ports:
     - "24224:24224"
     volumes:
@@ -79,7 +79,7 @@
   # (demo place-holder for external KPI system)
   #
   grafana:
-    image: voltha/grafana
+    image: "${REGISTRY}voltha/grafana:${TAG:-latest}"
     ports:
     - "8882:80"
     - "2003:2003"
@@ -98,7 +98,7 @@
   # Shovel (Kafka-graphite-gateway)
   #
   shovel:
-    image: cord/shovel
+    image: "${REGISTRY}voltha/shovel:${TAG:-latest}"
     command: [
       "/shovel/shovel/main.py",
       "--kafka=@kafka",
@@ -116,7 +116,7 @@
   # Voltha server instance(s)
   #
   voltha:
-    image: cord/voltha
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
     command: [
       "/voltha/voltha/main.py",
       "-v",
@@ -154,8 +154,8 @@
   #
   # Voltha cli container
   #
-  vcli:
-    image: cord/vcli
+  cli:
+    image: "${REGISTRY}voltha/cli:${TAG:-latest}"
     command: [
       "/cli/cli/setup.sh",
       "-L"
@@ -175,7 +175,7 @@
   # ofagent server instance
   #
   ofagent:
-    image: cord/ofagent
+    image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
     command: [
       "/ofagent/ofagent/main.py",
       "-v",
@@ -200,7 +200,7 @@
   # Netconf server instance(s)
   #
   netconf:
-    image: cord/netconf
+    image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
     privileged: true
     command: [
       "/netconf/netconf/main.py",
@@ -228,7 +228,7 @@
   # Dashboard daemon
   #
   dashd:
-    image: cord/dashd
+    image: "${REGISTRY}voltha/dashd:${TAG:-latest}"
     command: [
       "/dashd/dashd/main.py",
       "--kafka=@kafka",
@@ -247,7 +247,7 @@
   # Nginx service consolidation
   #
   nginx:
-    image: voltha/nginx
+    image: "${REGISTRY}voltha/nginx:${TAG:-latest}"
     ports:
     - "80:80"
     environment:
@@ -267,7 +267,7 @@
   # Docker ui
   #
   portainer:
-    image: voltha/portainer
+    image: "${REGISTRY}voltha/portainer:${TAG:-latest}"
     ports:
     - "9000:9000"
     environment:
diff --git a/compose/docker-compose-system-test-persistence.yml b/compose/docker-compose-system-test-persistence.yml
index ece46bf..963055c 100644
--- a/compose/docker-compose-system-test-persistence.yml
+++ b/compose/docker-compose-system-test-persistence.yml
@@ -4,7 +4,7 @@
   # Single-node zookeeper service
   #
   zookeeper:
-    image: wurstmeister/zookeeper
+    image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
     ports:
     - 2181
     environment:
@@ -13,7 +13,7 @@
   # Single-node kafka service
   #
   kafka:
-    image: wurstmeister/kafka
+    image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
     ports:
      - 9092
     environment:
@@ -30,7 +30,7 @@
   # Single-node consul agent
   #
   consul:
-    image: consul:latest
+    image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
     command: agent -server -bootstrap -client 0.0.0.0 -ui
     ports:
     - "8300:8300"
@@ -46,7 +46,7 @@
   # Registrator
   #
   registrator:
-    image: gliderlabs/registrator:latest
+    image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
     command: [
       "-ip=${DOCKER_HOST_IP}",
       "-retry-attempts", "100",
@@ -63,7 +63,7 @@
   # Fluentd log server
   #
   fluentd:
-    image: fluent/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     ports:
     - "24224:24224"
     volumes:
@@ -76,7 +76,7 @@
   # (demo place-holder for external KPI system)
   #
   grafana:
-    image: voltha/grafana
+    image: "${REGISTRY}voltha/grafana:${TAG:-latest}"
     ports:
     - "8883:80"
     - "2003:2003"
@@ -95,7 +95,7 @@
   # Shovel (Kafka-graphite-gateway)
   #
   shovel:
-    image: cord/shovel
+    image: "${REGISTRY}voltha/shovel:${TAG:-latest}"
     command: [
       "/shovel/shovel/main.py",
       "--kafka=@kafka",
@@ -113,7 +113,7 @@
   # Voltha server instance(s)
   #
   voltha:
-    image: cord/voltha
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
     command: [
       "/voltha/voltha/main.py",
       "-v",
@@ -151,7 +151,7 @@
     - ponmgmt
 
   envoy:
-    image: voltha/envoy
+    image: "${REGISTRY}voltha/envoy:${TAG:-latest}"
     entrypoint:
       - /usr/local/bin/envoyd
       - -envoy-cfg-template
@@ -175,8 +175,8 @@
   #
   # Voltha cli container
   #
-  vcli:
-    image: cord/vcli
+  cli:
+    image: "${REGISTRY}voltha/cli:${TAG:-latest}"
     command: [
       "/cli/cli/setup.sh",
       "-L",
@@ -197,7 +197,7 @@
   # ofagent server instance
   #
   ofagent:
-    image: cord/ofagent
+    image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
     command: [
       "/ofagent/ofagent/main.py",
       "-v",
@@ -222,7 +222,7 @@
   # Netconf server instance(s)
   #
   netconf:
-    image: cord/netconf
+    image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
     privileged: true
     command: [
       "/netconf/netconf/main.py",
diff --git a/compose/docker-compose-system-test-with-etcd.yml b/compose/docker-compose-system-test-with-etcd.yml
index a02a9cf..b35d7cb 100644
--- a/compose/docker-compose-system-test-with-etcd.yml
+++ b/compose/docker-compose-system-test-with-etcd.yml
@@ -4,7 +4,7 @@
   # Single-node zookeeper service
   #
   zookeeper:
-    image: wurstmeister/zookeeper
+    image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
     ports:
     - 2181
     environment:
@@ -13,7 +13,7 @@
   # Single-node kafka service
   #
   kafka:
-    image: wurstmeister/kafka
+    image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
     ports:
      - 9092
     environment:
@@ -30,7 +30,7 @@
   # Single-node consul agent
   #
   consul:
-    image: consul:latest
+    image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
     command: agent -server -bootstrap -client 0.0.0.0 -ui
     ports:
     - "8300:8300"
@@ -46,7 +46,7 @@
   # Single-node etcd server
   #
   etcd:
-    image: quay.io/coreos/etcd:v3.2.9
+    image: "${REGISTRY}quay.io/coreos/etcd:${ETCD_TAG:-v3.2.9}"
     command: [
       "etcd",
       "--name=etcd0",
@@ -66,7 +66,7 @@
   # Registrator
   #
   registrator:
-    image: gliderlabs/registrator:latest
+    image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
     command: [
       "-ip=${DOCKER_HOST_IP}",
       "-retry-attempts", "100",
@@ -83,7 +83,7 @@
   # Fluentd log server
   #
   fluentd:
-    image: fluent/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     ports:
     - "24224:24224"
     volumes:
@@ -96,7 +96,7 @@
   # (demo place-holder for external KPI system)
   #
   grafana:
-    image: voltha/grafana
+    image: "${REGISTRY}voltha/grafana:${TAG:-latest}"
     ports:
     - "8883:80"
     - "2003:2003"
@@ -115,7 +115,7 @@
   # Shovel (Kafka-graphite-gateway)
   #
   shovel:
-    image: cord/shovel
+    image: "${REGISTRY}voltha/shovel:${TAG:-latest}"
     command: [
       "/shovel/shovel/main.py",
       "--kafka=@kafka",
@@ -133,7 +133,7 @@
   # Voltha server instance(s)
   #
   voltha:
-    image: cord/voltha
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
     command: [
       "/voltha/voltha/main.py",
       "-v",
@@ -174,7 +174,7 @@
     - ponmgmt
 
   envoy:
-    image: voltha/envoy
+    image: "${REGISTRY}voltha/envoy:${TAG:-latest}"
     entrypoint:
       - /usr/local/bin/envoyd
       - -envoy-cfg-template
@@ -206,8 +206,8 @@
   #
   # Voltha cli container
   #
-  vcli:
-    image: cord/vcli
+  cli:
+    image: "${REGISTRY}voltha/cli:${TAG:-latest}"
     command: [
       "/cli/cli/setup.sh",
       "-L",
@@ -228,7 +228,7 @@
   # ofagent server instance
   #
   ofagent:
-    image: cord/ofagent
+    image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
     command: [
       "/ofagent/ofagent/main.py",
       "-v",
@@ -256,7 +256,7 @@
   # Netconf server instance(s)
   #
   netconf:
-    image: cord/netconf
+    image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
     privileged: true
     command: [
       "/netconf/netconf/main.py",
@@ -284,7 +284,7 @@
   # Dashboard daemon
   #
   dashd:
-    image: cord/dashd
+    image: "${REGISTRY}voltha/dashd:${TAG:-latest}"
     command: [
       "/dashd/dashd/main.py",
       "--kafka=@kafka",
@@ -303,7 +303,7 @@
   # Nginx service consolidation
   #
   nginx:
-    image: voltha/nginx
+    image: "${REGISTRY}voltha/nginx:${TAG:-latest}"
     ports:
     - "80:80"
     environment:
@@ -321,7 +321,7 @@
   # Docker ui
   #
   portainer:
-    image: voltha/portainer
+    image: "${REGISTRY}voltha/portainer:${TAG:-latest}"
     ports:
     - "9000:9000"
     environment:
diff --git a/compose/docker-compose-system-test.yml b/compose/docker-compose-system-test.yml
index 0ce7920..7231ed9 100644
--- a/compose/docker-compose-system-test.yml
+++ b/compose/docker-compose-system-test.yml
@@ -4,7 +4,7 @@
   # Single-node zookeeper service
   #
   zookeeper:
-    image: wurstmeister/zookeeper
+    image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
     ports:
     - 2181
     environment:
@@ -13,7 +13,7 @@
   # Single-node kafka service
   #
   kafka:
-    image: wurstmeister/kafka
+    image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
     ports:
      - 9092
     environment:
@@ -30,7 +30,7 @@
   # Single-node consul agent
   #
   consul:
-    image: consul:latest
+    image: "${REGISTRY}consul:${CONSUL_TAG:-0.9.2}"
     command: agent -server -bootstrap -client 0.0.0.0 -ui
     ports:
     - "8300:8300"
@@ -46,7 +46,7 @@
   # Registrator
   #
   registrator:
-    image: gliderlabs/registrator:latest
+    image: "${REGISTRY}gliderlabs/registrator:${REGISTRATOR_TAG:-latest}"
     command: [
       "-ip=${DOCKER_HOST_IP}",
       "-retry-attempts", "100",
@@ -63,7 +63,7 @@
   # Fluentd log server
   #
   fluentd:
-    image: fluent/fluentd
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
     ports:
     - "24224:24224"
     volumes:
@@ -76,7 +76,7 @@
   # (demo place-holder for external KPI system)
   #
   grafana:
-    image: voltha/grafana
+    image: "${REGISTRY}voltha/grafana:${TAG:-latest}"
     ports:
     - "8883:80"
     - "2003:2003"
@@ -95,7 +95,7 @@
   # Shovel (Kafka-graphite-gateway)
   #
   shovel:
-    image: cord/shovel
+    image: "${REGISTRY}voltha/shovel:${TAG:-latest}"
     command: [
       "/shovel/shovel/main.py",
       "--kafka=@kafka",
@@ -113,7 +113,7 @@
   # Voltha server instance(s)
   #
   voltha:
-    image: cord/voltha
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
     command: [
       "/voltha/voltha/main.py",
       "-v",
@@ -151,7 +151,7 @@
     - ponmgmt
 
   envoy:
-    image: voltha/envoy
+    image: "${REGISTRY}voltha/envoy:${TAG:-latest}"
     entrypoint:
       - /usr/local/bin/envoyd
       - -envoy-cfg-template
@@ -175,8 +175,8 @@
   #
   # Voltha cli container
   #
-  vcli:
-    image: cord/vcli
+  cli:
+    image: "${REGISTRY}voltha/cli:${TAG:-latest}"
     command: [
       "/cli/cli/setup.sh",
       "-L",
@@ -197,7 +197,7 @@
   # ofagent server instance
   #
   ofagent:
-    image: cord/ofagent
+    image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
     command: [
       "/ofagent/ofagent/main.py",
       "-v",
@@ -225,7 +225,7 @@
   # Netconf server instance(s)
   #
   netconf:
-    image: cord/netconf
+    image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
     privileged: true
     command: [
       "/netconf/netconf/main.py",
@@ -253,7 +253,7 @@
   # Dashboard daemon
   #
   dashd:
-    image: cord/dashd
+    image: "${REGISTRY}voltha/dashd:${TAG:-latest}"
     command: [
       "/dashd/dashd/main.py",
       "--kafka=@kafka",
@@ -272,7 +272,7 @@
   # Nginx service consolidation
   #
   nginx:
-    image: voltha/nginx
+    image: "${REGISTRY}voltha/nginx:${TAG:-latest}"
     ports:
     - "80:80"
     environment:
@@ -290,7 +290,7 @@
   # Docker ui
   #
   portainer:
-    image: voltha/portainer
+    image: "${REGISTRY}voltha/portainer:${TAG:-latest}"
     ports:
     - "9000:9000"
     environment:
diff --git a/compose/docker-compose-voltha-swarm.yml b/compose/docker-compose-voltha-swarm.yml
index bff9f90..cbbe319 100644
--- a/compose/docker-compose-voltha-swarm.yml
+++ b/compose/docker-compose-voltha-swarm.yml
@@ -1,7 +1,7 @@
 version: "3"
 services:
   vcore:
-    image: cord/voltha:latest
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
     logging:
       driver: "json-file"
       options:
diff --git a/compose/docker-compose-zk-kafka-test.yml b/compose/docker-compose-zk-kafka-test.yml
index 09c562b..748a9c2 100644
--- a/compose/docker-compose-zk-kafka-test.yml
+++ b/compose/docker-compose-zk-kafka-test.yml
@@ -4,7 +4,7 @@
   # Single-node zookeeper service
   #
   zookeeper:
-    image: wurstmeister/zookeeper
+    image: "${REGISTRY}wurstmeister/zookeeper:${ZK_TAG:-latest}"
     ports:
     - 2181:2181
     environment:
@@ -13,7 +13,7 @@
   # Single-node kafka service
   #
   kafka:
-    image: wurstmeister/kafka
+    image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-latest}"
     ports:
      - 9092:9092
     environment:
@@ -22,4 +22,4 @@
       KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
       SERVICE_9092_NAME: "kafka"
     volumes:
-      - /var/run/docker.sock:/var/run/docker.sock
\ No newline at end of file
+      - /var/run/docker.sock:/var/run/docker.sock
diff --git a/compose/voltha-stack.yml.j2 b/compose/voltha-stack.yml.j2
new file mode 100644
index 0000000..09033d4
--- /dev/null
+++ b/compose/voltha-stack.yml.j2
@@ -0,0 +1,484 @@
+# 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.
+#
+#
+# SWARM_MANAGER_COUNT - The number of managers in the swarm cluster. This is
+#               used to limit the number of instances of some of the 
+#               service instances for smaller clusters. 
+#               [ NOTE - currently this parameter is handled via a Jinga2
+#                 templating capability, because as of 17.09.0-ce Docker
+#                 cannot use and environment variable for the `replicas`
+#                 attribute on a container. ]
+# REGISTRY    - The docker registry from which images should be pulled.
+#               If specified if should end in a `/`. Defaults to empty.
+# TAG         - The tag that should be used when referencing VOLTHA docker
+#               images, defaults to `latest`.
+# CONSUL_ROOT - The local path on which the consul/data and consul/config
+#               directories should be created. Defaults to `/var/local`.
+# VOLTHA_LOGS - The location into which `fluentd` should writes logs.
+#               Defaults to `/var/log`.
+# RADIUS_ROOT - The location in which the `data/clients.conf` and 
+#               `data/users` configuration files can be found. Defaults
+#               to `/var/local`.
+# DOCKER_HOST_IP -
+# ZK_TAG      - The tag that should be used when referencing the ZooKeeper
+#               docker image. Defaults to `3.4.11`.
+# KAFKA_TAG   - The tag that should be used when referencing the Kafka
+#               docker image. Default to `1.0.0`.
+# CONSUL_TAG  - The tag that should be used when referencing the Consul
+#               docker image. Defaults to `0.9.2`.
+# RADIUS_TAG  - The tag that should be used when referencing the FreeRADIUS
+#               docker image. Defaults to `latest`.
+version: "3"
+
+services:
+  zk1:
+    image: "${REGISTRY}zookeeper:${ZK_TAG:-3.4.11}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    networks:
+      - kafka-net
+    environment:
+      ZOO_MY_ID: 1
+      ZOO_SERVERS: server.1=0.0.0.0:2888:3888 server.2=zk2:2888:3888 server.3=zk3:2888:3888
+
+  zk2:
+    image: "${REGISTRY}zookeeper:${ZK_TAG:-3.4.11}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    networks:
+      - kafka-net
+    environment:
+      ZOO_MY_ID: 2
+      ZOO_SERVERS: server.1=zk1:2888:3888 server.2=0.0.0.0:2888:3888 server.3=zk3:2888:3888
+
+  zk3:
+    image: "${REGISTRY}zookeeper:${ZK_TAG:-3.4.11}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    networks:
+      - kafka-net
+    environment:
+      ZOO_MY_ID: 3
+      ZOO_SERVERS: server.1=zk1:2888:3888 server.2=zk2:2888:3888 server.3=0.0.0.0:2888:3888
+
+  kafka:
+    deploy:
+      mode: global
+    image: "${REGISTRY}wurstmeister/kafka:${KAFKA_TAG:-1.0.0}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    environment:
+      KAFKA_ADVERTISED_PORT: 9092
+      KAFKA_ZOOKEEPER_CONNECT: zk1:2181,zk2:2181,zk3:2181
+      KAFKA_HEAP_OPTS: -Xmx256M -Xms128M
+    volumes:
+      - /var/run/docker.sock:/var/run/docker.sock
+    networks:
+      - kafka-net
+      - voltha-net
+    ports:
+      - 9092:9092
+
+  consul:
+    image: ${REGISTRY}consul:${CONSUL_TAG:-0.9.2}
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+
+    # Deploy to all docker manager nodes
+    deploy:
+      mode: global
+      placement:
+        constraints:
+          - node.role == manager
+      restart_policy:
+        condition: on-failure
+    entrypoint:
+      - consul
+      - agent
+      - -server
+      - -bootstrap-expect={{ SWARM_MANAGER_COUNT | default(1) }}
+      - -config-dir=/consul/config
+      - -data-dir=/consul/data              # mandatory property
+      - -client=0.0.0.0
+      - -advertise={{ '{{' }} GetAllInterfaces | include "network" "172.29.20.0/29" | sort "size,address" | attr "address" {{ '}}' }}
+      - -ui
+      - -raft-protocol=3
+      - -rejoin
+      - -retry-join=172.29.20.2
+      - -retry-join=172.29.20.3
+      - -retry-join=172.29.20.4
+      - -retry-join=172.29.20.5
+      - -retry-join=172.29.20.6
+      - -retry-join=172.29.20.7
+    networks:
+      - consul-net
+      - voltha-net
+    ports:
+      - "8300:8300"
+      - "8400:8400"
+      - "8500:8500"
+      - "8600:8600/udp"
+{%- if CONSUL_ROOT is defined and CONSUL_ROOT %}
+    volumes:
+      - {{ CONSUL_ROOT }}/data:/consul/data
+      - {{ CONSUL_ROOT }}/config:/consul/config
+{%- endif %}
+
+  fluentdactv:
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      replicas: 1
+      restart_policy:
+        condition: on-failure
+    environment:
+        FLUENTD_CONF: fluent-agg.conf
+    networks:
+      - voltha-net
+    ports:
+      - "24224"
+{%- if VOLTHA_LOGS is defined and VOLTHA_LOGS %}
+    volumes:
+      - "{{ VOLTHA_LOGS }}:/fluentd/log"
+{%- endif %}
+
+  fluentdstby:
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      replicas: 1
+      restart_policy:
+        condition: on-failure
+    environment:
+        FLUENTD_CONF: fluent-agg.conf
+    networks:
+      - voltha-net
+    ports:
+      - "24224"
+{%- if VOLTHA_LOGS is defined and VOLTHA_LOGS %}
+    volumes:
+      - "{{ VOLTHA_LOGS }}:/fluentd/log"
+{%- endif %}
+
+  # The Fluentd container is part of the data collection
+  # infrastructure.
+  fluentd:
+    image: "${REGISTRY}voltha/fluentd:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      mode: replicated
+      replicas: {{ SWARM_MANAGER_COUNT | default(1) }}
+      restart_policy:
+        condition: any
+    environment:
+        SERVICE_24224_NAME: "fluentd-intake"
+        FLUENTD_CONF: fluent.conf
+        WAIT_FOR: "fluentdactv:24224 fluentdstby:24224"
+        WAIT_FOR_TIMEOUT: 0
+    networks:
+      - voltha-net
+    ports:
+      - "24224"
+
+  # Free RADIUS can be used to test VOLTHA's authentication 
+  # sequence, i.e., EAPOL from a device behind an OLT to 
+  # RADIUS authentication on the back end systems. By default
+  # no instances of Free RADIUS are deployed.
+  freeradius:
+    deploy:
+      replicas: 0
+    image: "${REGISTRY}marcelmaatkamp/freeradius:${RADIUS_TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    ports:
+      - "1812:1812/udp"
+      - "1813:1813"
+      - "18120:18120"
+  
+{%- if RADIUS_ROOT is defined and RADIUS_ROOT %}  
+    # CONFIG: When deploying a Free RADIUS instance client and user
+    #      information will need to be configured for the service to
+    #      operate correctly.
+    #
+    volumes:
+      - {{ RADIUS_ROOT }}/data/clients.conf:/etc/raddb/clients.conf
+      - {{ RADIUS_ROOT }}/data/users:/etc/raddb/users
+{%- endif %}
+    networks:
+      - voltha-net
+
+  # The cluster manager container calculates and servers ONOS cluster
+  # meta data via HTTP so that ONOS instances can form an HA cluster.
+  # The cluster manager must run on a manager node so that it can 
+  # retrieve service information from manager nodes
+  onos_cluster_manager:
+    image: "${REGISTRY}voltha/unum:${TAG:-latest}"
+    deploy:
+      replicas: 1
+      placement:
+        constraints:
+          - node.role == manager
+    environment:
+      PERIOD: "10s"
+      LOG_LEVEL: "debug"
+      ORCHESTRATION: "swarm://"
+      LABELS: "org.voltha.onos.cluster:true"
+      NETWORK: "org.voltha.onos.cluster:true"
+    ports:
+      - 5411:5411
+    networks:
+      - voltha-net
+    volumes:
+      - /var/run/docker.sock:/var/run/docker.sock
+
+  # ONOS is the SDN controller for the solution and handles AAA,
+  # IGMP proxy, and L2 DHCP requests as well as manages flows
+  # down to the virtual devices (MCAST + OLT flows).
+  # Currently there is a single instance of ONOS as some of the
+  # applications running under ONOS do not support HA.
+  onos:
+    deploy:
+      replicas: 1
+      labels:
+        org.voltha.onos.cluster: "true"
+    image: "${REGISTRY}voltha/onos:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    ports:
+      - 8101:8101 # ssh
+      - 6653:6653 # OF
+      - 8181:8181 # UI
+    environment:
+      EXTRA_JAVA_OPTS: "-Donos.cluster.metadata.uri=http://onos_cluster_manager:5411/config/"
+    networks:
+      - voltha-net
+
+  # The VCORE container is the core capabilities of VOLTHA including
+  # interacting with device adapters
+  vcore:
+    image: "${REGISTRY}voltha/voltha:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      replicas: {{ SWARM_MANAGER_COUNT | default(1) }}
+    entrypoint:
+      - voltha/voltha/main.py
+      - -v
+      - --consul=consul:8500
+      - --fluentd=fluentd:24224
+      - --kafka=kafka
+      - --rest-port=8880
+      - --grpc-port=50556
+      - --instance-id-is-container-name
+      - --backend=consul
+      - --inter-core-subnet=172.29.19.0/24
+      - --pon-subnet=172.29.19.0/24
+    networks:
+      - voltha-net
+    ports:
+      - "8880:8880"
+      - "18880:18880"
+      - "50556:50556"
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock
+
+  # The OpenFlow Agent support the OpenFlow protocol communication
+  # between ONOS and VOLTHA.
+  ofagent:
+    image: "${REGISTRY}voltha/ofagent:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      replicas: 1
+    entrypoint:
+      - /ofagent/ofagent/main.py
+      - -v
+      - --consul=consul:8500
+      - --fluentd=fluentd:24224
+      - --controller=onos:6653
+      - --grpc-endpoint=vcore:50556
+      - --instance-id-is-container-name
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock
+    networks:
+      - voltha-net
+
+  # The VOLTHA container supports load balancing of request to
+  # the VOLTHA components as well as surfaces a REST API and maps
+  # the requests to GPRC
+  voltha:
+    image: "${REGISTRY}voltha/envoy:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      replicas: 1
+    #environment:
+    #  DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
+    entrypoint:
+      - /usr/local/bin/envoyd
+      - -envoy-cfg-template
+      - "/envoy/voltha-grpc-proxy.template.json"
+      - -envoy-config
+      - "/envoy/voltha-grpc-proxy.json"
+    networks:
+      - voltha-net
+    ports:
+      - "50555:50555"
+      - "8882:8882"
+      - "8443:8443"
+      - "8001:8001"
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock
+
+  # The CLI container provides an CLI to the VOLTHA capabilitiy 
+  # that can be accessed via SSH.
+  cli:
+    image: "${REGISTRY}voltha/cli:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      replicas: {{ SWARM_MANAGER_COUNT | default(1) }}
+    #environment:
+    #  DOCKER_HOST_IP: "${DOCKER_HOST_IP}"
+    entrypoint:
+      - /cli/cli/setup.sh
+      - -C consul:8500
+      - -g voltha:50555
+      - -s voltha:18880
+      - -G
+    networks:
+      - voltha-net
+    ports:
+      - "5022:22"
+
+  # The Netconf container provides an NETCONF API to be used
+  # with VOLTHA and maps that to GRPC requests
+  netconf:
+    image: "${REGISTRY}voltha/netconf:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      mode: global
+    environment:
+      SERVICE_1830_NAME: "netconf-server"
+    entrypoint:
+      - /netconf/netconf/main.py
+      - -v
+      - --consul=consul:8500
+      - --fluentd=fluentd:24224
+      - --grpc-endpoint=voltha:50555
+      - --instance-id-is-container-name
+    networks:
+      - voltha-net
+    ports:
+      - "830:1830"
+    volumes:
+      - /var/run/docker.sock:/tmp/docker.sock
+
+  # The tools container provides a bash command shell to which
+  # an operator can SSH that has the same network connectivity
+  # as other VOLTHA containers and is thus a convenient 
+  # troubleshooting tool
+  tools:
+    image: "${REGISTRY}voltha/tools:${TAG:-latest}"
+    logging:
+      driver: "json-file"
+      options:
+        max-size: "10m"
+        max-file: 3
+    deploy:
+      mode: replicated
+      replicas: 1
+      restart_policy:
+        condition: on-failure
+    ports:
+      - "4022:22"
+    networks:
+      - voltha-net
+      - kafka-net
+
+networks:
+  consul-net:
+    driver: overlay
+    driver_opts:
+      encrypted: "true"
+    ipam:
+      driver: default
+      config:
+        - subnet: 172.29.20.0/29
+
+  voltha-net:
+    driver: overlay
+    driver_opts:
+      encrypted: "true"
+    ipam:
+      driver: default
+      config:
+        - subnet: 172.29.19.0/24
+    labels:
+      org.voltha.onos.cluster: "true"
+
+  kafka-net:
+    driver: overlay
+    driver_opts:
+      encrypted: "true"
diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base
index 8e5c09b..e087e0f 100644
--- a/docker/Dockerfile.base
+++ b/docker/Dockerfile.base
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,7 +11,6 @@
 # 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.
-#
 
 FROM ubuntu:xenial
 
diff --git a/docker/Dockerfile.base.alpine b/docker/Dockerfile.base.alpine
index ac1d93c..8d04cb1 100644
--- a/docker/Dockerfile.base.alpine
+++ b/docker/Dockerfile.base.alpine
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +11,8 @@
 # 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.
-#
 
-FROM alpine:3.4
+FROM alpine:3.6
 
 MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
 MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
diff --git a/docker/Dockerfile.cli b/docker/Dockerfile.cli
index 95d5617..0c04759 100755
--- a/docker/Dockerfile.cli
+++ b/docker/Dockerfile.cli
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +11,9 @@
 # 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.
-#
+ARG TAG=latest
 
-FROM cord/voltha-base
+FROM voltha/voltha-base:${TAG}
 
 MAINTAINER Sergio Slobodrian <sslobodr@ciena.com>
 
diff --git a/docker/Dockerfile.configpush b/docker/Dockerfile.configpush
index 895e0ee..f096852 100644
--- a/docker/Dockerfile.configpush
+++ b/docker/Dockerfile.configpush
@@ -1,4 +1,18 @@
-FROM alpine:3.5
+# Copyright 2018 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.
+
+FROM alpine:3.6
 
 RUN apk --update add curl
 
diff --git a/docker/Dockerfile.consul b/docker/Dockerfile.consul
index 64f11b2..cd6d0b3 100644
--- a/docker/Dockerfile.consul
+++ b/docker/Dockerfile.consul
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,7 +11,6 @@
 # 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.
-#
 
 FROM consul:0.9.2
 
diff --git a/docker/Dockerfile.dashd b/docker/Dockerfile.dashd
index 74ef2f6..05cf57e 100755
--- a/docker/Dockerfile.dashd
+++ b/docker/Dockerfile.dashd
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +11,9 @@
 # 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.
-#
+ARG TAG=latest
 
-FROM cord/voltha-base
+FROM voltha/voltha-base:${TAG}
 
 MAINTAINER Sergio Slobodrian <sslobodr@ciena.com>
 
diff --git a/docker/Dockerfile.envoy b/docker/Dockerfile.envoy
index afe1977..6484f4b 100644
--- a/docker/Dockerfile.envoy
+++ b/docker/Dockerfile.envoy
@@ -1,3 +1,17 @@
+# Copyright 2018 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.
+
 FROM lyft/envoy:29361deae91575a1d46c7a21e913f19e75622ebe
 
 RUN apt-get update && apt-get -q install -y \
diff --git a/docker/Dockerfile.fluentd b/docker/Dockerfile.fluentd
index 4e04a2f..ed5417c 100644
--- a/docker/Dockerfile.fluentd
+++ b/docker/Dockerfile.fluentd
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +11,14 @@
 # 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.
-#
 
 #DockerFile to Create Fluentd Forwards inside cord-voltha
 FROM fluent/fluentd:v0.14.23.rc1
+MAINTAINER Voltha Community <info@opennetworking.org>
+
+RUN apk add --update bash
 COPY fluentd_config/fluent.conf /fluentd/etc/
 COPY fluentd_config/fluent-agg.conf /fluentd/etc/
+COPY docker/config/wait_for_it.sh /bin/wait_for_it.sh
+COPY fluentd_config/entrypoint.sh /bin/entrypoint.sh
+RUN chmod 755 /bin/wait_for_it.sh /bin/entrypoint.sh
diff --git a/docker/Dockerfile.golang b/docker/Dockerfile.golang
index 0b6648c..b23f9e6 100644
--- a/docker/Dockerfile.golang
+++ b/docker/Dockerfile.golang
@@ -1,3 +1,17 @@
+# Copyright 2018 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.
+
 FROM golang:1.9.2
 MAINTAINER Alex Peters <info@alexanderpeters.de>
 
diff --git a/docker/Dockerfile.grafana b/docker/Dockerfile.grafana
index d8b2cbf..a821747 100755
--- a/docker/Dockerfile.grafana
+++ b/docker/Dockerfile.grafana
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,7 +11,6 @@
 # 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.
-#
 
 FROM kamon/grafana_graphite:3.0
 
diff --git a/docker/Dockerfile.j2 b/docker/Dockerfile.j2
new file mode 100644
index 0000000..8e6566e
--- /dev/null
+++ b/docker/Dockerfile.j2
@@ -0,0 +1,22 @@
+# 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.
+
+FROM alpine:3.6
+MAINTAINER Voltha Community <info@opennetworking.org>
+
+RUN apk --update add python py-pip
+RUN pip install j2cli
+COPY config/j2_entry_point /j2_entry_point
+RUN chmod 755 /j2_entry_point
+ENTRYPOINT [ "/j2_entry_point" ]
diff --git a/docker/Dockerfile.logstash b/docker/Dockerfile.logstash
index a90ecb0..861b3c0 100644
--- a/docker/Dockerfile.logstash
+++ b/docker/Dockerfile.logstash
@@ -1,3 +1,17 @@
+# Copyright 2018 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.
+
 # Build from latest stable load
 FROM docker.elastic.co/logstash/logstash:5.6.0
 
diff --git a/docker/Dockerfile.netconf b/docker/Dockerfile.netconf
index b46a822..b740aae 100644
--- a/docker/Dockerfile.netconf
+++ b/docker/Dockerfile.netconf
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +11,9 @@
 # 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.
-#
+ARG TAG=latest
 
-FROM cord/voltha-base
+FROM voltha/voltha-base:${TAG}
 
 MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
 MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
diff --git a/docker/Dockerfile.netopeer b/docker/Dockerfile.netopeer
index 5dc0711..4b31e55 100644
--- a/docker/Dockerfile.netopeer
+++ b/docker/Dockerfile.netopeer
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2017 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,7 +11,6 @@
 # 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.
-#
 
 FROM centos:7
 
diff --git a/docker/Dockerfile.nginx b/docker/Dockerfile.nginx
index 000583a..33b8068 100755
--- a/docker/Dockerfile.nginx
+++ b/docker/Dockerfile.nginx
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +11,9 @@
 # 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.
-#
+ARG TAG=latest
 
-FROM cord/voltha-base
+FROM voltha/voltha-base:${TAG}
 
 MAINTAINER Sergio Slobodrian <sslobodr@ciena.com>
 
diff --git a/docker/Dockerfile.ofagent b/docker/Dockerfile.ofagent
index 20d97dc..733b9df 100644
--- a/docker/Dockerfile.ofagent
+++ b/docker/Dockerfile.ofagent
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +11,9 @@
 # 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.
-#
+ARG TAG=latest
 
-FROM cord/voltha-base
+FROM voltha/voltha-base:${TAG}
 
 MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
 MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
diff --git a/docker/Dockerfile.onos b/docker/Dockerfile.onos
index 528d90b..6d8ce41 100644
--- a/docker/Dockerfile.onos
+++ b/docker/Dockerfile.onos
@@ -1,3 +1,17 @@
+# Copyright 2018 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.
+
 FROM maven:3-jdk-8-alpine as download
 MAINTAINER Open Networking Foundation <info@opennetworking.org>
 
diff --git a/docker/Dockerfile.opennms b/docker/Dockerfile.opennms
index 31233ef..5a45fce 100644
--- a/docker/Dockerfile.opennms
+++ b/docker/Dockerfile.opennms
@@ -1,3 +1,17 @@
+# Copyright 2018 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.
+
 # Build from latest stable load
 FROM opennms/horizon-core-web:19.0.1-1
 
diff --git a/docker/Dockerfile.portainer b/docker/Dockerfile.portainer
index e3a894f..0e17188 100644
--- a/docker/Dockerfile.portainer
+++ b/docker/Dockerfile.portainer
@@ -1,3 +1,17 @@
+# Copyright 2018 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.
+
 FROM centurylink/ca-certs
 
 COPY tmp_portainer /
diff --git a/docker/Dockerfile.registrator b/docker/Dockerfile.registrator
index 219cc4d..940449e 100644
--- a/docker/Dockerfile.registrator
+++ b/docker/Dockerfile.registrator
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,7 +11,6 @@
 # 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.
-#
 
 FROM gliderlabs/registrator:v7
 
diff --git a/docker/Dockerfile.shovel b/docker/Dockerfile.shovel
index 7270e20..3a411fb 100644
--- a/docker/Dockerfile.shovel
+++ b/docker/Dockerfile.shovel
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +11,9 @@
 # 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.
-#
+ARG TAG=latest
 
-FROM cord/voltha-base
+FROM voltha/voltha-base:${TAG}
 
 MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
 MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
diff --git a/docker/Dockerfile.tester b/docker/Dockerfile.tester
index 617ef13..a9b1a10 100644
--- a/docker/Dockerfile.tester
+++ b/docker/Dockerfile.tester
@@ -1,4 +1,20 @@
-FROM cord/voltha-base
+# Copyright 2018 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.
+
+ARG TAG=latest
+
+FROM voltha/voltha-base:${TAG}
 
 MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
 MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
diff --git a/docker/Dockerfile.tools b/docker/Dockerfile.tools
index 5fd0510..168ffee 100755
--- a/docker/Dockerfile.tools
+++ b/docker/Dockerfile.tools
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +11,9 @@
 # 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.
-#
+ARG TAG=latest
 
-FROM cord/voltha-base
+FROM voltha/voltha-base:${TAG}
 
 MAINTAINER Sergio Slobodrian <sslobodr@ciena.com>
 
diff --git a/docker/Dockerfile.voltha b/docker/Dockerfile.voltha
index 6f6ce6f..ece248b 100644
--- a/docker/Dockerfile.voltha
+++ b/docker/Dockerfile.voltha
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
 # Copyright 2016 the original author or authors.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,9 +11,9 @@
 # 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.
-#
+ARG TAG=latest
 
-FROM cord/voltha-base
+FROM voltha/voltha-base:${TAG}
 
 MAINTAINER Zsolt Haraszti <zharaszt@ciena.com>
 MAINTAINER Ali Al-Shabibi <ali.al-shabibi@onlab.us>
diff --git a/docker/config/j2_entry_point b/docker/config/j2_entry_point
new file mode 100644
index 0000000..cb7de93
--- /dev/null
+++ b/docker/config/j2_entry_point
@@ -0,0 +1,24 @@
+#!/bin/ash
+# 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.
+
+# enable reading template from stdin
+if [ $1 == "-" ]; then
+    TEMPLATE=$(mktemp -u)
+    cat > $TEMPLATE
+    shift
+    exec j2 $TEMPLATE $*
+else
+    exec j2 $*
+fi
diff --git a/docker/config/wait_for_it.sh b/docker/config/wait_for_it.sh
new file mode 100755
index 0000000..bbe4043
--- /dev/null
+++ b/docker/config/wait_for_it.sh
@@ -0,0 +1,177 @@
+#!/usr/bin/env bash
+#   Use this script to test if a given TCP host/port are available
+
+cmdname=$(basename $0)
+
+echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }
+
+usage()
+{
+    cat << USAGE >&2
+Usage:
+    $cmdname host:port [-s] [-t timeout] [-- command args]
+    -h HOST | --host=HOST       Host or IP under test
+    -p PORT | --port=PORT       TCP port under test
+                                Alternatively, you specify the host and port as host:port
+    -s | --strict               Only execute subcommand if the test succeeds
+    -q | --quiet                Don't output any status messages
+    -t TIMEOUT | --timeout=TIMEOUT
+                                Timeout in seconds, zero for no timeout
+    -- COMMAND ARGS             Execute command with args after the test finishes
+USAGE
+    exit 1
+}
+
+wait_for()
+{
+    if [[ $TIMEOUT -gt 0 ]]; then
+        echoerr "$cmdname: waiting $TIMEOUT seconds for $HOST:$PORT"
+    else
+        echoerr "$cmdname: waiting for $HOST:$PORT without a timeout"
+    fi
+    start_ts=$(date +%s)
+    while :
+    do
+        if [[ $ISBUSY -eq 1 ]]; then
+            nc -z $HOST $PORT
+            result=$?
+        else
+            (echo > /dev/tcp/$HOST/$PORT) >/dev/null 2>&1
+            result=$?
+        fi
+        if [[ $result -eq 0 ]]; then
+            end_ts=$(date +%s)
+            echoerr "$cmdname: $HOST:$PORT is available after $((end_ts - start_ts)) seconds"
+            break
+        fi
+        sleep 1
+    done
+    return $result
+}
+
+wait_for_wrapper()
+{
+    # In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692
+    if [[ $QUIET -eq 1 ]]; then
+        timeout $BUSYTIMEFLAG $TIMEOUT $0 --quiet --child --host=$HOST --port=$PORT --timeout=$TIMEOUT &
+    else
+        timeout $BUSYTIMEFLAG $TIMEOUT $0 --child --host=$HOST --port=$PORT --timeout=$TIMEOUT &
+    fi
+    PID=$!
+    trap "kill -INT -$PID" INT
+    wait $PID
+    RESULT=$?
+    if [[ $RESULT -ne 0 ]]; then
+        echoerr "$cmdname: timeout occurred after waiting $TIMEOUT seconds for $HOST:$PORT"
+    fi
+    return $RESULT
+}
+
+# process arguments
+while [[ $# -gt 0 ]]
+do
+    case "$1" in
+        *:* )
+        hostport=(${1//:/ })
+        HOST=${hostport[0]}
+        PORT=${hostport[1]}
+        shift 1
+        ;;
+        --child)
+        CHILD=1
+        shift 1
+        ;;
+        -q | --quiet)
+        QUIET=1
+        shift 1
+        ;;
+        -s | --strict)
+        STRICT=1
+        shift 1
+        ;;
+        -h)
+        HOST="$2"
+        if [[ $HOST == "" ]]; then break; fi
+        shift 2
+        ;;
+        --host=*)
+        HOST="${1#*=}"
+        shift 1
+        ;;
+        -p)
+        PORT="$2"
+        if [[ $PORT == "" ]]; then break; fi
+        shift 2
+        ;;
+        --port=*)
+        PORT="${1#*=}"
+        shift 1
+        ;;
+        -t)
+        TIMEOUT="$2"
+        if [[ $TIMEOUT == "" ]]; then break; fi
+        shift 2
+        ;;
+        --timeout=*)
+        TIMEOUT="${1#*=}"
+        shift 1
+        ;;
+        --)
+        shift
+        CLI=("$@")
+        break
+        ;;
+        --help)
+        usage
+        ;;
+        *)
+        echoerr "Unknown argument: $1"
+        usage
+        ;;
+    esac
+done
+
+if [[ "$HOST" == "" || "$PORT" == "" ]]; then
+    echoerr "Error: you need to provide a host and port to test."
+    usage
+fi
+
+TIMEOUT=${TIMEOUT:-15}
+STRICT=${STRICT:-0}
+CHILD=${CHILD:-0}
+QUIET=${QUIET:-0}
+
+# check to see if timeout is from busybox?
+# check to see if timeout is from busybox?
+TIMEOUT_PATH=$(realpath $(which timeout))
+if [[ $TIMEOUT_PATH =~ "busybox" ]]; then
+        ISBUSY=1
+        BUSYTIMEFLAG="-t"
+else
+        ISBUSY=0
+        BUSYTIMEFLAG=""
+fi
+
+if [[ $CHILD -gt 0 ]]; then
+    wait_for
+    RESULT=$?
+    exit $RESULT
+else
+    if [[ $TIMEOUT -gt 0 ]]; then
+        wait_for_wrapper
+        RESULT=$?
+    else
+        wait_for
+        RESULT=$?
+    fi
+fi
+
+if [[ $CLI != "" ]]; then
+    if [[ $RESULT -ne 0 && $STRICT -eq 1 ]]; then
+        echoerr "$cmdname: strict mode, refusing to execute subprocess"
+        exit $RESULT
+    fi
+    exec "${CLI[@]}"
+else
+    exit $RESULT
+fi
diff --git a/docs/manuals/user/labtests/M01_maple_olt_tests_activate_olt.md b/docs/manuals/user/labtests/M01_maple_olt_tests_activate_olt.md
index 78ac807..5e5ec71 100644
--- a/docs/manuals/user/labtests/M01_maple_olt_tests_activate_olt.md
+++ b/docs/manuals/user/labtests/M01_maple_olt_tests_activate_olt.md
@@ -122,7 +122,7 @@
 To do this start our RG docker container.
 
 ```
-docker run --net=host --privileged --name RG -it cord/tester bash
+docker run --net=host --privileged --name RG -it voltha/tester bash
 ```
 
 this should land you in a command prompt that looks like
diff --git a/docs/manuals/user/labtests/M03_maple_olt_tests_eapol_auth.md b/docs/manuals/user/labtests/M03_maple_olt_tests_eapol_auth.md
index bf96149..a847a70 100644
--- a/docs/manuals/user/labtests/M03_maple_olt_tests_eapol_auth.md
+++ b/docs/manuals/user/labtests/M03_maple_olt_tests_eapol_auth.md
@@ -25,7 +25,7 @@
 docker container.
 
 ```
-docker run --net=host --privileged --name RG -it cord/tester bash
+docker run --net=host --privileged --name RG -it voltha/tester bash
 ```
 
 this should land you in a command prompt that looks like
diff --git a/docs/manuals/user/labtests/S01_ponsim_tests_launch_and_activate.md b/docs/manuals/user/labtests/S01_ponsim_tests_launch_and_activate.md
index 3c0f449..d7ec9b3 100644
--- a/docs/manuals/user/labtests/S01_ponsim_tests_launch_and_activate.md
+++ b/docs/manuals/user/labtests/S01_ponsim_tests_launch_and_activate.md
@@ -157,7 +157,7 @@
 
 
 ```
-docker run --net=host --privileged --name RG -it cord/tester bash
+docker run --net=host --privileged --name RG -it voltha/tester bash
 ```
 
 this should land you in a command prompt that looks like
diff --git a/docs/manuals/user/labtests/T01_tibit_olt_tests_activate_olt.md b/docs/manuals/user/labtests/T01_tibit_olt_tests_activate_olt.md
index 3e9e349..05ec86f 100644
--- a/docs/manuals/user/labtests/T01_tibit_olt_tests_activate_olt.md
+++ b/docs/manuals/user/labtests/T01_tibit_olt_tests_activate_olt.md
@@ -92,7 +92,7 @@
 our RG docker container.
 
 ```
-docker run --net=host --privileged --name RG -it cord/tester bash
+docker run --net=host --privileged --name RG -it voltha/tester bash
 ```
 
 this should land you in a command prompt that looks like
diff --git a/docs/manuals/user/labtests/T03_tibit_olt_eapol_auth.md b/docs/manuals/user/labtests/T03_tibit_olt_eapol_auth.md
index 64da5b9..9f0e218 100644
--- a/docs/manuals/user/labtests/T03_tibit_olt_eapol_auth.md
+++ b/docs/manuals/user/labtests/T03_tibit_olt_eapol_auth.md
@@ -25,7 +25,7 @@
 docker container.
 
 ```
-docker run --net=host --privileged --name RG -it cord/tester bash
+docker run --net=host --privileged --name RG -it voltha/tester bash
 ```
 
 this should land you in a command prompt that looks like
diff --git a/envoy/go/envoyd/build_binary.sh b/envoy/go/envoyd/build_binary.sh
index 037ebd8..5f8fc06 100755
--- a/envoy/go/envoyd/build_binary.sh
+++ b/envoy/go/envoyd/build_binary.sh
@@ -2,7 +2,7 @@
 
 rm -fr buildreport
 rm -f envoyd
-docker run -e "http_proxy=$http_proxy" -e "https_proxy=$https_proxy" -v $(pwd):/src go-builder
+docker run -e "http_proxy=$http_proxy" -e "https_proxy=$https_proxy" -v $(pwd):/src voltha/go-builder
 #/build.sh
 uid=`id -u`
 gid=`id -g`
diff --git a/fluentd_config/entrypoint.sh b/fluentd_config/entrypoint.sh
new file mode 100644
index 0000000..08f76e5
--- /dev/null
+++ b/fluentd_config/entrypoint.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/dumb-init /bin/sh
+# Copyright 2018 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.
+
+uid=${FLUENT_UID:-1000}
+
+# check if a old fluent user exists and delete it
+cat /etc/passwd | grep fluent
+if [ $? -eq 0 ]; then
+    deluser fluent
+fi
+
+# (re)add the fluent user with $FLUENT_UID
+adduser -D -g '' -u ${uid} -h /home/fluent fluent
+
+# chown home and data folder
+chown -R fluent /home/fluent
+chown -R fluent /fluentd
+
+echo "$WAIT_FOR"
+if [ ! -z "$WAIT_FOR" ]; then
+  for i in $WAIT_FOR; do
+      /bin/wait_for_it.sh -t ${WAIT_FOR_TIMEOUT:-30} $i
+  done
+fi
+
+exec su-exec fluent "$@"
+
diff --git a/gradle.properties b/gradle.properties
deleted file mode 100644
index 1a644c7..0000000
--- a/gradle.properties
+++ /dev/null
@@ -1 +0,0 @@
-org.gradle.daemon=true
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 2c6137b..0000000
--- a/gradle/wrapper/gradle-wrapper.jar
+++ /dev/null
Binary files differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 55651c9..0000000
--- a/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Thu Sep 08 13:51:52 PDT 2016
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.12-bin.zip
diff --git a/gradlew b/gradlew
deleted file mode 100755
index 9d82f78..0000000
--- a/gradlew
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env bash
-
-##############################################################################
-##
-##  Gradle start up script for UN*X
-##
-##############################################################################
-
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-
-# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
-
-warn ( ) {
-    echo "$*"
-}
-
-die ( ) {
-    echo
-    echo "$*"
-    echo
-    exit 1
-}
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
-    if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-    else
-        PRG=`dirname "$PRG"`"/$link"
-    fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
-
-# Determine the Java command to use to start the JVM.
-if [ -n "$JAVA_HOME" ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-        # IBM's JDK on AIX uses strange locations for the executables
-        JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-        JAVACMD="$JAVA_HOME/bin/java"
-    fi
-    if [ ! -x "$JAVACMD" ] ; then
-        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-    fi
-else
-    JAVACMD="java"
-    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-
-Please set the JAVA_HOME variable in your environment to match the
-location of your Java installation."
-fi
-
-# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
-    MAX_FD_LIMIT=`ulimit -H -n`
-    if [ $? -eq 0 ] ; then
-        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
-            MAX_FD="$MAX_FD_LIMIT"
-        fi
-        ulimit -n $MAX_FD
-        if [ $? -ne 0 ] ; then
-            warn "Could not set maximum file descriptor limit: $MAX_FD"
-        fi
-    else
-        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
-    fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
-    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-    JAVACMD=`cygpath --unix "$JAVACMD"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
-    JVM_OPTS=("$@")
-}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
-
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
diff --git a/gradlew.bat b/gradlew.bat
deleted file mode 100644
index 72d362d..0000000
--- a/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@if "%DEBUG%" == "" @echo off

-@rem ##########################################################################

-@rem

-@rem  Gradle startup script for Windows

-@rem

-@rem ##########################################################################

-

-@rem Set local scope for the variables with windows NT shell

-if "%OS%"=="Windows_NT" setlocal

-

-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.

-set DEFAULT_JVM_OPTS=

-

-set DIRNAME=%~dp0

-if "%DIRNAME%" == "" set DIRNAME=.

-set APP_BASE_NAME=%~n0

-set APP_HOME=%DIRNAME%

-

-@rem Find java.exe

-if defined JAVA_HOME goto findJavaFromJavaHome

-

-set JAVA_EXE=java.exe

-%JAVA_EXE% -version >NUL 2>&1

-if "%ERRORLEVEL%" == "0" goto init

-

-echo.

-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:findJavaFromJavaHome

-set JAVA_HOME=%JAVA_HOME:"=%

-set JAVA_EXE=%JAVA_HOME%/bin/java.exe

-

-if exist "%JAVA_EXE%" goto init

-

-echo.

-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%

-echo.

-echo Please set the JAVA_HOME variable in your environment to match the

-echo location of your Java installation.

-

-goto fail

-

-:init

-@rem Get command-line arguments, handling Windows variants

-

-if not "%OS%" == "Windows_NT" goto win9xME_args

-if "%@eval[2+2]" == "4" goto 4NT_args

-

-:win9xME_args

-@rem Slurp the command line arguments.

-set CMD_LINE_ARGS=

-set _SKIP=2

-

-:win9xME_args_slurp

-if "x%~1" == "x" goto execute

-

-set CMD_LINE_ARGS=%*

-goto execute

-

-:4NT_args

-@rem Get arguments from the 4NT Shell from JP Software

-set CMD_LINE_ARGS=%$

-

-:execute

-@rem Setup the command line

-

-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

-

-@rem Execute Gradle

-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

-

-:end

-@rem End local scope for the variables with windows NT shell

-if "%ERRORLEVEL%"=="0" goto mainEnd

-

-:fail

-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

-rem the _cmd.exe /c_ return code!

-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1

-exit /b 1

-

-:mainEnd

-if "%OS%"=="Windows_NT" endlocal

-

-:omega

diff --git a/install/voltha-swarm-start.sh b/install/voltha-swarm-start.sh
index ceb45b8..cbd69e3 100755
--- a/install/voltha-swarm-start.sh
+++ b/install/voltha-swarm-start.sh
@@ -1,48 +1,151 @@
 #!/bin/bash
 
-voltha_base_dir="/cord/incubator/voltha"
-hostName=`hostname`
+# 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.
 
-docker network create --driver overlay --subnet=172.29.19.0/24 voltha_net
-#docker network create --driver overlay --subnet=172.29.19.0/24 --opt encrypted=true voltha_net
-docker stack deploy -c ${voltha_base_dir}/compose/docker-compose-kafka-cluster.yml kafka
-docker stack deploy -c ${voltha_base_dir}/compose/docker-compose-consul-cluster.yml consul
-echo "Waiting for consul to start"
-while true
-do
-	cs=`docker service ls | grep consul_consul | awk '{print $4}'`
-	if [ "$cs" == "3/3" ]; then
-		break
-	fi
+PROG=$(basename $0)
+BASE_DIR=$(pwd)
+
+GREEN='\033[32;1m'
+RED='\033[0;31m'
+YELLOW='\033[0;33m'
+WHITE='\033[1;37m'
+NC='\033[0m' # No Color
+
+usage() {
+    echo >&2 "$PROG: [-d <dir>] [-l <log-dir>] [-h]"
+    echo >&2 "  -d <dir>        directory in which the 'compose file directory' is located, defaults to '$(pwd)'"
+    echo >&2 "  -l <log-dir>    directory into which fluentd logs will be written"
+    echo >&2 "  -c <consul-dir> directory into which consul data is written"
+    echo >&2 "  -e              ensure voltha_net is encrypted"
+    echo >&2 "  -h              this message"
+}
+
+wait_for_service() {
+  while true
+  do
+      COUNT=$(docker service ls | grep $1 | awk '{print $4}')
+      if [ ! -z "$COUNT" ]; then
+          HAVE=$(echo $COUNT | cut -d/ -f1)
+          WANT=$(echo $COUNT | cut -d/ -f2)
+          if [ $WANT == $HAVE ]; then
+            break
+          fi
+      fi
+      sleep 2
+  done
+}
+
+ENCRYPT_VNET=""
+
+OPTIND=1
+while getopts d:l:c:eh OPT; do
+    case "$OPT" in
+        d) BASE_DIR="$OPTARG";;
+        l) export VOLTHA_LOGS="$OPTARG";;
+        c) export CONSUL_ROOT="$OPTARG";;
+    	e) ENCRYPT_VNET="--opt encrypted=true";;
+        h) usage;
+           exit 1;;
+        esac
 done
 
-echo "Waiting for consul leader election"
+# If `REGISTRY` is set, but doesn't end in a `/`, then
+# add one
+test -z "$REGISTRY" -o "$(echo ${REGISTRY: -1})" == "/" || REGISTRY="$REGISTRY/"
+
+# Attempt to count Ready Docker Swarm managers
+export SWARM_MANAGER_COUNT=$(docker node ls | grep Ready | egrep '(Leader)|(Reachable)' | wc -l | sed -e 's/ //g')
+hostName=$(hostname)
+
+echo -n "[network] voltha-net ... "
+if [ $(docker network ls | grep voltha_net | wc -l) -eq 0 ]; then
+    OUT=$(docker network create --driver overlay \
+        --subnet="172.29.19.0/24" \
+        $ENCRYPT_VNET voltha_net 2>&1)
+    if [ $? -ne 0 ]; then
+        echo -e "${RED}ERROR: $OUT${NC}"
+    else
+        echo -e "${GREEN}created${NC}"
+    fi
+else
+    # Verify that the current encrypted state is the desired encrypted state
+    # and if not, tear down and recreate
+    CURRENT=$(docker network inspect --format '{{.Options.encrypted}}' voltha_net | grep -v "<no value>")
+    if [ "$ENCRYPT_VNET X" != " X" -a "$CURRENT" != "true" -o "$ENCRYPT_VNET X" == " X" -a "$CURRENT" == "true" ]; then
+        echo -en "${YELLOW}delete${NC} ... "
+        docker network rm voltha_net > /dev/null || exit 1
+        OUT=$(docker network create --driver overlay \
+            --subnet="172.29.19.0/24" \
+            $ENCRYPT_VNET voltha_net 2>&1)
+        if [ $? -ne 0 ]; then
+            echo -e "${RED}ERROR: $OUT${NC}"
+        else
+           echo -e "${GREEN}created${NC}"
+        fi
+    else
+        echo -e "${WHITE}already exists${NC}"
+    fi
+fi
+
+echo -n "[network] kafka_net ... "
+if [ $(docker network ls | grep kafka_net | wc -l) -eq 0 ]; then
+    OUT=$(docker network create --driver overlay --opt encrypted kafka_net 2>&1)
+    if [ $? -ne 0 ]; then
+        echo -e "${RED}ERROR: $OUT${NC}"
+    else
+        echo -e "${GREEN}created${NC}"
+    fi
+else
+    echo -e "${WHITE}already exists${NC}"
+fi
+
+docker stack deploy -c $BASE_DIR/compose/docker-compose-kafka-cluster.yml kafka
+docker stack deploy -c $BASE_DIR/compose/docker-compose-consul-cluster.yml consul
+echo -n "Waiting for consul to start ... "
+wait_for_service consul_consul
+echo -e "${GREEN}done${NC}"
+
+echo -n "Waiting for consul leader election ... "
 patience=10
 while true
 do
-	leader=`curl -v http://${hostName}:8500/v1/status/leader 2>/dev/null | sed -e 's/"//g'`
-	if [ ! -z "$leader" ] ; then
-		echo "Leader elected is on ${leader}"
-		break
-	fi
-	sleep 10
-	patience=`expr $patience - 1`
-	if [ $patience -eq 0 ]; then
-		echo "Consul leader election taking too long... aborting"
-		./voltha-swarm-stop.sh
-		exit 1
-	fi
+        leader=`curl -v http://${hostName}:8500/v1/status/leader 2>/dev/null | sed -e 's/"//g'`
+        if [ ! -z "$leader" ] ; then
+                echo -e "${GREEN}Leader elected is on ${leader}${NC}"
+                break
+        fi
+        sleep 10
+        patience=`expr $patience - 1`
+        if [ $patience -eq 0 ]; then
+                echo -e "${RED}Consul leader election taking too long... aborting${NC}"
+                echo "Stopping VOLTHA ... "
+                ./voltha-swarm-stop.sh
+                exit 1
+        fi
 done
 
+docker stack deploy -c $BASE_DIR/compose/docker-compose-fluentd-agg-cluster.yml fluentd
 
-docker stack deploy -c ${voltha_base_dir}/compose/docker-compose-fluentd-agg-cluster.yml fluentd
+echo -n "Waiting for fluentd aggregation services to start ... "
+wait_for_service fluentd_fluentdstby
+wait_for_service fluentd_fluentdactv
+echo -e "${GREEN}done${NC}"
 sleep 2
-docker stack deploy -c ${voltha_base_dir}/compose/docker-compose-fluentd-cluster.yml fluentd
-docker stack deploy -c ${voltha_base_dir}/compose/docker-compose-onos-swarm.yml onos
-docker stack deploy -c ${voltha_base_dir}/compose/docker-compose-voltha-swarm.yml vcore
-docker stack deploy -c ${voltha_base_dir}/compose/docker-compose-ofagent-swarm.yml ofagent
-docker stack deploy -c ${voltha_base_dir}/compose/docker-compose-envoy-swarm.yml voltha
-docker stack deploy -c ${voltha_base_dir}/compose/docker-compose-vcli.yml cli
-docker stack deploy -c ${voltha_base_dir}/compose/docker-compose-netconf-swarm.yml netconf
-docker service create -d --name tools --network voltha_net  --network kafka_net --publish "4022:22" voltha/tools
 
+
+TMP_STACK_FILE=$(mktemp -u)
+cat $BASE_DIR/compose/docker-compose-all.yml.j2 2>&1 | docker run -e SWARM_MANAGER_COUNT=$SWARM_MANAGER_COUNT --rm -i voltha/j2 - 2>&1 > $TMP_STACK_FILE
+docker stack deploy -c $TMP_STACK_FILE voltha
+rm -f $TMP_STACK_FILE
diff --git a/install/voltha-swarm-stop.sh b/install/voltha-swarm-stop.sh
index 8aca489..ebb4aea 100755
--- a/install/voltha-swarm-stop.sh
+++ b/install/voltha-swarm-stop.sh
@@ -1,13 +1,124 @@
 #!/bin/bash
 
-docker service rm netconf_netconf
-docker service rm cli_cli
-docker service rm voltha_voltha
-docker service rm ofagent_ofagent
-docker service rm vcore_vcore
-docker service rm tools
-docker stack rm consul
-docker stack rm kafka
-docker stack rm fluentd
-docker stack rm onos
-docker network rm voltha_net
+# 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.
+
+PROG=$(basename $0)
+BASE_DIR=$(pwd)
+
+GREEN='\033[32;1m'
+RED='\033[0;31m'
+WHITE='\033[1;37m'
+NC='\033[0m' # No Color
+
+SERVICES=""
+STACKS="consul kafka fluentd voltha"
+NETWORKS="voltha_net kafka_net"
+
+usage() {
+    echo >&2 "$PROG: [-d <dir>] [-l <log-dir>] [-h]"
+    echo >&2 "  -z              zero out the consul data"
+    echo >&2 "  -h              this message"
+}
+
+VOLUME_CLEANUP=0
+
+OPTIND=1
+while getopts d:l:c:zh OPT; do
+    case "$OPT" in
+        z) VOLUME_CLEANUP=1;;
+        c) export CONSUL_ROOT="$OPTARG";;
+        h) usage;
+           exit 1;;
+        esac
+done
+
+for s in $SERVICES; do
+    echo -n "[service] $s ... "
+    if [ $(docker service ls | grep $s | wc -l) -ne 0 ]; then
+        OUT=$(docker service rm $s 2>&1)
+        if [ $? -eq 0 ]; then
+            echo -e "${GREEN}removed${NC}"
+        else
+            echo -e "${RED}ERROR: $OUT${NC}"
+        fi
+    else
+        echo -e "${WHITE}not running${NC}"
+    fi
+done
+
+for s in $STACKS; do
+    echo -n "[stack] $s ... "
+    if [ $(docker stack ls | grep $s | wc -l) -ne 0 ]; then
+        OUT=$(docker stack rm $s 2>&1)
+        if [ $? -eq 0 ]; then
+            echo -e "${GREEN}removed${NC}"
+        else
+            echo -e "${RED}ERROR: $OUT${NC}"
+        fi
+    else
+        echo -e "${WHITE}not running${NC}"
+    fi
+done
+
+for n in $NETWORKS; do
+    echo -n "[network] $n ... "
+    if [ $(docker network ls | grep $n | wc -l) -ne 0 ]; then
+        OUT=$(docker network rm $n 2>&1)
+        if [ $? -eq 0 ]; then
+            echo -e "${GREEN}removed${NC}"
+        else
+            echo -e "${RED}ERROR: $OUT${NC}"
+        fi
+    else
+        echo -e "${WHITE}not running${NC}"
+    fi
+done
+
+# Attempt to count Ready Docker Swarm managers
+SWARM_MANAGER_COUNT=$(docker node ls | grep Ready | egrep '(Leader)|(Reachable)' | wc -l)
+echo -n "[volume] consul ... "
+if [ $VOLUME_CLEANUP -ne 0 ]; then
+    RUNNING=$(docker service ps volume_cleanup 2> /dev/null | wc -l)
+    if [ $RUNNING -ne 0 ]; then
+        docker service rm volume_cleanup > /dev/null
+    fi
+    docker service create --detach=true --restart-condition=none \
+    --mode=global --name=volume_cleanup \
+    --mount=type=bind,src=${CONSUL_ROOT:-/cord/incubator/voltha/consul}/data,dst=/consul/data \
+    --mount=type=bind,src=${CONSUL_ROOT:-/cord/incubator/voltha/consul}/config,dst=/consul/config \
+    alpine:latest \
+    ash -c 'rm -rf /consul/data/* /consul/config/*' > /dev/null
+
+    RETRY=10
+    while [ $RETRY -ge 0 ]; do
+        COMPLETE=$(docker service ps --filter 'desired-state=Shutdown' --format '{{.DesiredState}}' volume_cleanup | wc -l)
+        ERRORS=$(docker service ps --format '{{.Error}}' volume_cleanup  | grep -v "^$" | wc -l)
+        if [ $COMPLETE -eq $SWARM_MANAGER_COUNT ]; then
+           if [ $ERRORS -eq 0 ]; then
+               echo -e "${GREEN}data removed${NC}"
+               docker service rm volume_cleanup > /dev/null
+               break
+           else
+               echo -e "${RED}ERROR: $(docker service ps --format '{{.Error}}' volume_cleanup | awk '{printf("%s ", $0)}')${NC}"
+               exit 1
+           fi
+
+        fi
+        sleep 5
+        RETRY=$(expr $RETRY - 1)
+    done
+else
+   echo -e "${WHITE}skipped${NC}" 
+fi
diff --git a/settings.gradle b/settings.gradle
deleted file mode 100644
index 90a3b41..0000000
--- a/settings.gradle
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * This settings file was auto generated by the Gradle buildInit task
- * by 'zsolt' at '9/8/16 1:51 PM' with Gradle 2.12
- *
- * The settings file is used to specify which projects to include in your build.
- * In a single project build this file can be empty or even removed.
- *
- * Detailed information about configuring a multi-project build in Gradle can be found
- * in the user guide at https://docs.gradle.org/2.12/userguide/multi_project_builds.html
- */
-
-rootProject.name = 'voltha'
diff --git a/tests/itests/docutests/build_md_test.py b/tests/itests/docutests/build_md_test.py
index 133736e..57c273a 100644
--- a/tests/itests/docutests/build_md_test.py
+++ b/tests/itests/docutests/build_md_test.py
@@ -58,9 +58,9 @@
         DOCKER_COMPOSE_FILE),
     docker_stop_and_remove_all_containers="docker stop `docker ps -q` ; "
                                           "docker rm `docker ps -a -q`",
-    docker_start_voltha="docker run -ti --rm cord/voltha",
+    docker_start_voltha="docker run -ti --rm voltha/voltha",
     docker_start_voltha_with_consul_ip="docker run -ti --rm --net="
-                                       "compose_default cord/voltha "
+                                       "compose_default voltha/voltha "
                                        "/voltha/voltha/main.py --consul=",
     docker_get_consul_ip="docker inspect "
                          "compose_consul_1 | jq -r "
diff --git a/tests/itests/run_as_root/test_frameio.py b/tests/itests/run_as_root/test_frameio.py
index ad62f98..0d64f1f 100644
--- a/tests/itests/run_as_root/test_frameio.py
+++ b/tests/itests/run_as_root/test_frameio.py
@@ -18,7 +18,7 @@
 """
 Run this test inside a docker container using the following syntax:
 
-docker run -ti --rm -v $(pwd):/voltha  --privileged cord/voltha-base \
+docker run -ti --rm -v $(pwd):/voltha  --privileged voltha/voltha-base \
     env PYTHONPATH=/voltha python \
     /voltha/tests/itests/run_as_root/test_frameio.py
 
diff --git a/unum/Dockerfile b/unum/Dockerfile
index a977bc7..bf11d29 100644
--- a/unum/Dockerfile
+++ b/unum/Dockerfile
@@ -11,7 +11,7 @@
 ## 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.
-FROM golang:1.8-alpine as builder
+FROM golang:1.9.2-alpine as builder
 MAINTAINER Open Networking Foundation <info@onlab.us>
 
 WORKDIR /go
diff --git a/unum/Makefile b/unum/Makefile
index ef82dfe..ce8c23c 100644
--- a/unum/Makefile
+++ b/unum/Makefile
@@ -20,7 +20,7 @@
 	@echo "  rm        - remove the sample 3 instance cluster"
 
 image:
-	docker build --rm --tag unum:latest .
+	docker build --rm --tag voltha/unum:latest .
 
 deploy:
 	docker stack deploy -c docker-compose.yml test