Merge branch 'master' of github.com:open-cloud/xos
diff --git a/xos/configurations/acord/Makefile b/xos/configurations/acord/Makefile
index 5231e79..5b03692 100644
--- a/xos/configurations/acord/Makefile
+++ b/xos/configurations/acord/Makefile
@@ -1,16 +1,18 @@
 SETUPDIR:=../setup
 MYIP:=$(shell hostname -i)
 
-cloudlab: common_cloudlab acord
+cloudlab: common_cloudlab cloudlab_ceilometer_custom_images acord
 
-devstack: upgrade_pkgs common_devstack devstack_net_fix acord
+devstack: upgrade_pkgs common_devstack devstack_net_fix devstack_images acord
 
-acord: ceilometer_dashboard
+cord: ceilometer_dashboard
 	sudo MYIP=$(MYIP) docker-compose up -d
 	bash ../common/wait_for_xos.sh
 	sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
 	sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/base.yaml
 	sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
+
+acord: cord
 	sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/acord/ceilometer.yaml
 
 containers:
@@ -57,3 +59,9 @@
 
 rebuild_synchronizer:
 	make -C ../../../containers/synchronizer
+
+devstack_images:
+	bash -c "source ../setup/admin-openrc.sh; glance image-show ceilometer-trusty-server-multi-nic || ! mkdir -p /opt/stack/images || ! wget http://www.vicci.org/cord/ceilometer-trusty-server-multi-nic.qcow2 -P /opt/stack/images || glance image-create --name ceilometer-trusty-server-multi-nic --disk-format qcow2 --file /opt/stack/images/ceilometer-trusty-server-multi-nic.qcow2 --container-format bare"
+
+cloudlab_ceilometer_custom_images:
+	bash -c "source ../setup/admin-openrc.sh; glance image-show ceilometer-trusty-server-multi-nic || ! mkdir -p /tmp/images || ! wget http://www.vicci.org/cord/ceilometer-trusty-server-multi-nic.qcow2 -P /tmp/images || glance image-create --name ceilometer-trusty-server-multi-nic --disk-format qcow2 --file /tmp/images/ceilometer-trusty-server-multi-nic.qcow2 --container-format bare"
diff --git a/xos/configurations/acord/ceilometer.yaml b/xos/configurations/acord/ceilometer.yaml
index 874c577..ff56579 100644
--- a/xos/configurations/acord/ceilometer.yaml
+++ b/xos/configurations/acord/ceilometer.yaml
@@ -123,9 +123,9 @@
           view_url: /admin/ceilometer/ceilometerservice/$id$/
           kind: ceilometer
           ceilometer_pub_sub_url: http://10.11.10.1:4455/
-#          public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
-#      artifacts:
-#          pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key
+          public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+      artifacts:
+          pubkey: /opt/xos/synchronizers/monitoring_channel/monitoring_channel_public_key
 
 #    service_sflow:
 #      type: tosca.nodes.SFlowService
@@ -161,6 +161,9 @@
     trusty-server-multi-nic:
       type: tosca.nodes.Image
 
+    ceilometer-trusty-server-multi-nic:
+      type: tosca.nodes.Image
+
     mysite_ceilometer:
       description: Ceilometer Proxy Slice
       type: tosca.nodes.Slice
@@ -172,10 +175,10 @@
               node: mysite
               relationship: tosca.relationships.MemberOfSite
           - default_image:
-                node: trusty-server-multi-nic
+                node: ceilometer-trusty-server-multi-nic
                 relationship: tosca.relationships.DefaultImage
       properties:
-          default_flavor: m1.medium
+          default_flavor: m1.small
           max_instances: 2
 
 #    mysite_sflow:
diff --git a/xos/configurations/acord/cleanup.sh b/xos/configurations/acord/cleanup.sh
index 91d821c..dfa1438 100755
--- a/xos/configurations/acord/cleanup.sh
+++ b/xos/configurations/acord/cleanup.sh
@@ -13,7 +13,7 @@
   neutron net-delete $NETWORK
 }
 
-source ../../setup/admin-openrc.sh
+source ../setup/admin-openrc.sh
 
 echo "Deleting VMs"
 # Delete all VMs
diff --git a/xos/configurations/common/devstack/local.conf b/xos/configurations/common/devstack/local.conf
index 38cd20c..632ed1b 100644
--- a/xos/configurations/common/devstack/local.conf
+++ b/xos/configurations/common/devstack/local.conf
@@ -2,7 +2,8 @@
 [[local|localrc]]
 
 DOWNLOAD_DEFAULT_IMAGES=false
-IMAGE_URLS="http://www.planet-lab.org/cord/trusty-server-multi-nic.img"
+IMAGE_URLS="http://www.planet-lab.org/cord/trusty-server-multi-nic.img,"
+IMAGE_URLS+="http://www.vicci.org/cord/ceilometer-trusty-server-multi-nic.qcow2"
 LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
 # Append the git branch name if you wish to download ceilometer from a specific branch
 enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer 
diff --git a/xos/configurations/cord/Makefile b/xos/configurations/cord/Makefile
index 41bb37f..56990a2 100644
--- a/xos/configurations/cord/Makefile
+++ b/xos/configurations/cord/Makefile
@@ -1,7 +1,7 @@
 SETUPDIR:=../setup
 MYIP:=$(shell hostname -i)
 
-cloudlab: common_cloudlab cord
+cloudlab: common_cloudlab cord acord
 
 devstack: upgrade_pkgs common_devstack devstack_net_fix cord
 
@@ -12,7 +12,6 @@
 	sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/base.yaml
 	sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
 	sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord/cord.yaml
-	sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord/ceilometer.yaml
 
 containers:
 	cd ../../../containers/xos; make devel
@@ -24,6 +23,9 @@
 common_devstack:
 	make -C ../common -f Makefile.devstack
 
+acord: cloudlab_ceilometer_custom_images ceilometer_dashboard
+	sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord/ceilometer.yaml
+
 ceilometer_dashboard:
 	#NOTE: The below dashboard install scripts assume
 	#clouldlab openstack environment created using "OpenStack" profile
@@ -78,3 +80,6 @@
 
 upgrade_pkgs:
 	sudo pip install httpie --upgrade
+
+cloudlab_ceilometer_custom_images:
+	bash -c "source ../setup/admin-openrc.sh; glance image-show ceilometer-trusty-server-multi-nic || ! mkdir -p /tmp/images || ! wget http://www.vicci.org/cord/ceilometer-trusty-server-multi-nic.qcow2 -P /tmp/images || glance image-create --name ceilometer-trusty-server-multi-nic --disk-format qcow2 --file /tmp/images/ceilometer-trusty-server-multi-nic.qcow2 --container-format bare"
diff --git a/xos/configurations/cord/ceilometer.yaml b/xos/configurations/cord/ceilometer.yaml
index a5655b4..ff282e3 100644
--- a/xos/configurations/cord/ceilometer.yaml
+++ b/xos/configurations/cord/ceilometer.yaml
@@ -123,18 +123,18 @@
           view_url: /admin/ceilometer/ceilometerservice/$id$/
           kind: ceilometer
           ceilometer_pub_sub_url: http://10.11.10.1:4455/
-#          public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
-#      artifacts:
-#          pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key
+          public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+      artifacts:
+          pubkey: /opt/xos/synchronizers/monitoring_channel/monitoring_channel_public_key
 
-    service_sflow:
-      type: tosca.nodes.SFlowService
-      requirements:
-      properties:
-          view_url: /admin/ceilometer/sflowservice/$id$/
-          kind: sflow
-          sflow_port: 6343
-          sflow_api_port: 33333
+#    service_sflow:
+#      type: tosca.nodes.SFlowService
+#      requirements:
+#      properties:
+#          view_url: /admin/ceilometer/sflowservice/$id$/
+#          kind: sflow
+#          sflow_port: 6343
+#          sflow_api_port: 33333
 
     Private:
       type: tosca.nodes.NetworkTemplate
@@ -161,6 +161,9 @@
     trusty-server-multi-nic:
       type: tosca.nodes.Image
 
+    ceilometer-trusty-server-multi-nic:
+      type: tosca.nodes.Image
+
     mysite_ceilometer:
       description: Ceilometer Proxy Slice
       type: tosca.nodes.Slice
@@ -172,21 +175,21 @@
               node: mysite
               relationship: tosca.relationships.MemberOfSite
           - default_image:
-                node: trusty-server-multi-nic
+                node: ceilometer-trusty-server-multi-nic
                 relationship: tosca.relationships.DefaultImage
       properties:
           default_flavor: m1.small
 
-    mysite_sflow:
-      description: Slice for sFlow service
-      type: tosca.nodes.Slice
-      requirements:
-          - sflow_service:
-              node: service_sflow
-              relationship: tosca.relationships.MemberOfService
-          - site:
-              node: mysite
-              relationship: tosca.relationships.MemberOfSite
+#    mysite_sflow:
+#      description: Slice for sFlow service
+#      type: tosca.nodes.Slice
+#      requirements:
+#          - sflow_service:
+#              node: service_sflow
+#              relationship: tosca.relationships.MemberOfService
+#          - site:
+#              node: mysite
+#              relationship: tosca.relationships.MemberOfSite
 
     my_ceilometer_tenant:
       description: Ceilometer Service default Tenant
@@ -197,27 +200,27 @@
               relationship: tosca.relationships.MemberOfService
        
     # Virtual machines
-    sflow_service_instance:
-      type: tosca.nodes.Compute
-      capabilities:
-        # Host container properties
-        host:
-         properties:
-           num_cpus: 1
-           disk_size: 10 GB
-           mem_size: 4 MB
-        # Guest Operating System properties
-        os:
-          properties:
-            # host Operating System image properties
-            architecture: x86_64
-            type: linux
-            distribution: Ubuntu
-            version: 14.10
-      requirements:
-          - slice:
-                node: mysite_sflow
-                relationship: tosca.relationships.MemberOfSlice
+#    sflow_service_instance:
+#      type: tosca.nodes.Compute
+#      capabilities:
+#        # Host container properties
+#        host:
+#         properties:
+#           num_cpus: 1
+#           disk_size: 10 GB
+#           mem_size: 4 MB
+#        # Guest Operating System properties
+#        os:
+#          properties:
+#            # host Operating System image properties
+#            architecture: x86_64
+#            type: linux
+#            distribution: Ubuntu
+#            version: 14.10
+#      requirements:
+#          - slice:
+#                node: mysite_sflow
+#                relationship: tosca.relationships.MemberOfSlice
 
     Ceilometer:
       type: tosca.nodes.DashboardView
diff --git a/xos/services/ceilometer/models.py b/xos/services/ceilometer/models.py
index 65bffef..d8fb0fa 100644
--- a/xos/services/ceilometer/models.py
+++ b/xos/services/ceilometer/models.py
@@ -36,7 +36,8 @@
 
     KIND = CEILOMETER_KIND
     LOOK_FOR_IMAGES=[ #"trusty-server-multi-nic-docker", # CloudLab
-                      "trusty-server-multi-nic",
+                      "ceilometer-trusty-server-multi-nic",
+                      #"trusty-server-multi-nic",
                     ]
 
 
diff --git a/xos/synchronizers/exampleservice/steps/exampletenant_playbook.yaml b/xos/synchronizers/exampleservice/steps/exampletenant_playbook.yaml
index 82a5af1..9da06f5 100644
--- a/xos/synchronizers/exampleservice/steps/exampletenant_playbook.yaml
+++ b/xos/synchronizers/exampleservice/steps/exampletenant_playbook.yaml
@@ -1,4 +1,6 @@
 ---
+# exampletenant_playbook
+
 - hosts: "{{ instance_name }}"
   connection: ssh
   user: ubuntu
@@ -10,15 +12,7 @@
     apt:
       name=apache2
       update_cache=yes
-    notify:
-      - restart apache
 
   - name: write message
     shell: echo "{{ tenant_message }}" > /var/www/html/index.html
 
-  handlers:
-  - name: restart apache
-    service:
-      name=apache2
-      state=restarted
-
diff --git a/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.yaml b/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.yaml
index 06403a6..1c4da12 100644
--- a/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.yaml
+++ b/xos/synchronizers/monitoring_channel/steps/sync_monitoringchannel.yaml
@@ -32,38 +32,38 @@
      - remove container
 {% else %}
 {% if full_setup %}
-  - name: Docker repository
-    copy: src=/opt/xos/synchronizers/monitoring_channel/files/docker.list
-      dest=/etc/apt/sources.list.d/docker.list
-
-  - name: Import the repository key
-    apt_key: keyserver=keyserver.ubuntu.com id=36A1D7869245C8950F966E92D8576A8BA88D21E9
-
-  - name: install Docker
-    apt: name=lxc-docker state=present update_cache=yes
-
-  - name: install python-setuptools
-    apt: name=python-setuptools state=present
-
-  - name: install pip
-    easy_install: name=pip
-
-  - name: install docker-py
-    pip: name=docker-py version=0.5.3
-
-  - name: install Pipework
-    get_url: url=https://raw.githubusercontent.com/jpetazzo/pipework/master/pipework
-       dest=/usr/local/bin/pipework
-       mode=0755
-
-  - name: Disable resolvconf service
-    shell: service resolvconf stop
-    shell: echo manual > /etc/init/resolvconf.override
-    shell: rm -f /etc/resolv.conf
-
-  - name: Install resolv.conf
-    copy: src=/opt/xos/synchronizers/monitoring_channel/files/vm-resolv.conf
-      dest=/etc/resolv.conf
+#  - name: Docker repository
+#    copy: src=/opt/xos/synchronizers/monitoring_channel/files/docker.list
+#      dest=/etc/apt/sources.list.d/docker.list
+#
+#  - name: Import the repository key
+#    apt_key: keyserver=keyserver.ubuntu.com id=36A1D7869245C8950F966E92D8576A8BA88D21E9
+#
+#  - name: install Docker
+#    apt: name=lxc-docker state=present update_cache=yes
+#
+#  - name: install python-setuptools
+#    apt: name=python-setuptools state=present
+#
+#  - name: install pip
+#    easy_install: name=pip
+#
+#  - name: install docker-py
+#    pip: name=docker-py version=0.5.3
+#
+#  - name: install Pipework
+#    get_url: url=https://raw.githubusercontent.com/jpetazzo/pipework/master/pipework
+#       dest=/usr/local/bin/pipework
+#       mode=0755
+#
+#  - name: Disable resolvconf service
+#    shell: service resolvconf stop
+#    shell: echo manual > /etc/init/resolvconf.override
+#    shell: rm -f /etc/resolv.conf
+#
+#  - name: Install resolv.conf
+#    copy: src=/opt/xos/synchronizers/monitoring_channel/files/vm-resolv.conf
+#      dest=/etc/resolv.conf
 {% endif %}
 
   - name: ceilometer proxy config
diff --git a/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2 b/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2
index a0ebb0c..1685e07 100755
--- a/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2
+++ b/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2
@@ -21,7 +21,7 @@
 if [ "$?" == 1 ]
 then
     #sudo docker build -t monitoring-channel -f Dockerfile.monitoring_channel .
-    sudo docker pull srikanthvavila/monitoring-channel
+    #sudo docker pull srikanthvavila/monitoring-channel
 if [ -z "$HEADNODEFLATLANIP" ] || [ "$HEADNODEFLATLANIP" == "None" ]
 then
     docker run -d --name=$MONITORING_CHANNEL --privileged=true -p $HOST_FORWARDING_PORT_FOR_CEILOMETER:8000 -v /usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config:/usr/local/share/ceilometer_proxy_config srikanthvavila/monitoring-channel
@@ -43,4 +43,4 @@
 #cat /usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config | sudo docker exec -i $MONITORING_CHANNEL bash -c 'cat > /usr/local/share/ceilometer_proxy_config'
 
 # Attach to container
-docker start -a $MONITORING_CHANNEL
+#docker start -a $MONITORING_CHANNEL