Changes to support custom pre-installed image for ceilometer service
diff --git a/xos/configurations/acord/Makefile b/xos/configurations/acord/Makefile
index d8f4196..b67a670 100644
--- a/xos/configurations/acord/Makefile
+++ b/xos/configurations/acord/Makefile
@@ -3,14 +3,16 @@
cloudlab: common_cloudlab 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:
@@ -56,3 +58,6 @@
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"
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/common/devstack/local.conf b/xos/configurations/common/devstack/local.conf
index 38cd20c..6e4d4cb 100644
--- a/xos/configurations/common/devstack/local.conf
+++ b/xos/configurations/common/devstack/local.conf
@@ -3,6 +3,7 @@
DOWNLOAD_DEFAULT_IMAGES=false
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/ceilometer.yaml b/xos/configurations/cord/ceilometer.yaml
index 6fcd132..adf5b30 100644
--- a/xos/configurations/cord/ceilometer.yaml
+++ b/xos/configurations/cord/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,7 +175,7 @@
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
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/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