diff --git a/common/utils/dockerhelpers.py b/common/utils/dockerhelpers.py
index af23dbc..9708e9e 100644
--- a/common/utils/dockerhelpers.py
+++ b/common/utils/dockerhelpers.py
@@ -210,7 +210,7 @@
                         data = self.client.inspect_image(i)
                     data[i] = data
                 except errors.NotFound:
-                    log.info('No data for container {}'.format(i))
+                    log.debug('No data for container {}'.format(i))
 
             status = get_status(event)
             if status in handlers:
diff --git a/podder/handlers.py b/podder/handlers.py
index 6b261a6..40d53a8 100644
--- a/podder/handlers.py
+++ b/podder/handlers.py
@@ -17,6 +17,7 @@
     get_all_running_containers, inspect_container, remove_container
 
 from structlog import get_logger
+import yaml
 
 log = get_logger()
 
@@ -48,7 +49,6 @@
     # Assuming only one network exists....
     return create_networking_config(network[0], { l : l for l in links})
 
-
 def process_value(value):
     if value is None:
         return None
@@ -68,7 +68,6 @@
 def construct_container_spec(config):
     container_spec = {}
     container_spec['image'] = get_entry('image', config, mandatory=True)
-    #TODO need to rewrite command to connect to right service instance
     container_spec['command'] = get_entry('command', config, mandatory=True)
     container_spec['environment'] = get_entry('environment', config, noneval={})
     container_spec['ports'] = get_entry('ports', config)
@@ -86,7 +85,11 @@
                     log.info('Removing container {}'.format(container['Names']))
                     remove_container(container['Id'])
 
-def start_slaves(service, instance_name, instance_id, data, config):
+def start_slaves(service, instance_name, instance_id, data, conf):
+    network = obtain_network_name(data)
+    # still assuming a single network
+    config = yaml.load(conf.render(data=data, network=network[0]))
+
     if service not in config['services']:
         log.debug('Unknown service {}'.format(service))
         return
@@ -94,7 +97,7 @@
         if slave not in config['slaves']:
             log.debug('Unknown slave service {}'.format(slave))
             continue
-        network = obtain_network_name(data)
+
         netcfg = create_network_config(network, get_entry('links', config['slaves'][slave]))
         container_spec = construct_container_spec(config['slaves'][slave])
         container_spec['networking_config'] = netcfg
@@ -107,11 +110,14 @@
         container_spec['environment']['PODDER_MASTER'] = instance_name
 
         container = create_container(container_spec)
+        log.info('Starting slaves for {}'.format(instance_name))
         start_container(container)
 
 
-def stop_slaves(service, instance_name, instance_id, data, config):
+def stop_slaves(service, instance_name, instance_id, data, conf):
     log.info('Stopping slaves for {}'.format(instance_name))
+    network = obtain_network_name(data)
+    config = yaml.load(conf.render())
     if service in config['services']:
         service_shutdown(service, instance_name, config)
     else:
diff --git a/podder/main.py b/podder/main.py
index 3f74446..d02fc63 100755
--- a/podder/main.py
+++ b/podder/main.py
@@ -25,7 +25,7 @@
 from common.utils.nethelpers import get_my_primary_local_ipv4
 
 defs = dict(
-    slaves=os.environ.get('SLAVES', './slaves.yml'),
+    slaves=os.environ.get('SLAVES', './slaves.yml.j2'),
     config=os.environ.get('CONFIG', './podder.yml'),
     consul=os.environ.get('CONSUL', 'localhost:8500'),
     external_host_address=os.environ.get('EXTERNAL_HOST_ADDRESS',
@@ -110,15 +110,20 @@
 
     return args
 
-def load_config(config):
-    path = config
+def load_file(file):
+    path = file
     if path.startswith('.'):
         dir = os.path.dirname(os.path.abspath(__file__))
         path = os.path.join(dir, path)
     path = os.path.abspath(path)
     with open(path) as fd:
-        config = yaml.load(fd)
-    return config
+        contents = fd.read()
+    return contents
+
+def load_config(config):
+    contents = load_file(config)
+    return yaml.load(contents)
+
 
 banner = r'''
  _____
@@ -139,7 +144,7 @@
     def __init__(self):
         self.args = args = parse_args()
         self.config = load_config(args.config)
-        self.slave_config = load_config(args.slaves)
+        self.slave_config = load_file(args.slaves)
 
         verbosity_adjust = (args.verbose or 0) - (args.quiet or 0)
         self.log = setup_logging(self.config.get('logging', {}),
diff --git a/podder/podder.py b/podder/podder.py
index daa9e91..7cd166d 100644
--- a/podder/podder.py
+++ b/podder/podder.py
@@ -16,6 +16,7 @@
 
 from handlers import handler_start, handler_stop
 from structlog import get_logger
+from jinja2 import Template
 
 from common.utils.dockerhelpers import EventProcessor
 
@@ -27,7 +28,7 @@
         self.log.info('Initializing Podder')
         self.running = False
         self.events = EventProcessor()
-        self.handlers = { 'podder_config' : slave_config }
+        self.handlers = { 'podder_config' : Template(slave_config) }
 
     def run(self):
         if self.running:
diff --git a/podder/slaves.yml b/podder/slaves.yml.j2
similarity index 65%
rename from podder/slaves.yml
rename to podder/slaves.yml.j2
index 2adc46b..668d7d6 100644
--- a/podder/slaves.yml
+++ b/podder/slaves.yml.j2
@@ -1,3 +1,11 @@
+{% macro address(data, network) -%}
+    {% if data is defined and network is defined -%}
+    {{ data['NetworkSettings']['Networks'][network]['IPAddress'] }}:{{ data['NetworkSettings']['Ports']['50555/tcp'][0]['HostPort'] }}
+    {%- else -%}
+    None:None
+    {%- endif %}
+{%- endmacro %}
+
 services:
   cord/voltha:
     slaves: ["chameleon", "ofagent"]
@@ -7,12 +15,12 @@
   chameleon:
     image: cord/chameleon
     command: [
-      "/chameleon/main.py",
+      "/chameleon/chameleon/main.py",
       "-v",
       "--consul=consul:8500",
       "--fluentd=fluentd:24224",
       "--rest-port=8881",
-      "--grpc-endpoint=@voltha-grpc",
+      "--grpc-endpoint={{ address(data, network) }}",
       "--instance-id-is-container-name",
       "-v"
     ]
@@ -32,12 +40,12 @@
   ofagent:
     image: cord/ofagent
     command: [
-      "/ofagent/main.py",
+      "/ofagent/ofagent/main.py",
       "-v",
       "--consul=${DOCKER_HOST_IP}:8500",
       "--fluentd=fluentd:24224",
       "--controller=${DOCKER_HOST_IP}:6633",
-      "--grpc-endpoint=@voltha-grpc",
+      "--grpc-endpoint={{ address(data, network) }}",
       "--instance-id-is-container-name",
       "-v"
     ]
