Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 1 | SETUPDIR:=../setup |
| 2 | MYIP:=$(shell hostname -i) |
| 3 | |
| 4 | cloudlab: common_cloudlab cloudlab_ceilometer_custom_images ceilometer_cloudlab_cord_plugins acord |
| 5 | |
| 6 | devstack: upgrade_pkgs common_devstack devstack_net_fix devstack_images ceilometer_devstack_cord_plugins acord |
| 7 | |
| 8 | cord: |
| 9 | sudo MYIP=$(MYIP) docker-compose up -d |
| 10 | bash ../common/wait_for_xos.sh |
| 11 | sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/fixtures.yaml |
| 12 | sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/mydeployment.yaml |
| 13 | sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab-openstack.yaml |
| 14 | sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml |
| 15 | |
| 16 | acord: cord exampleservice |
| 17 | sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/acord/ceilometer.yaml |
| 18 | |
| 19 | exampleservice: |
| 20 | #Ensure exampleservice is enabled in xos/tools/xos-manage and xos/settings.py file before uncommenting below lines |
| 21 | #sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/acord/acord-exampleservice.yaml |
| 22 | |
| 23 | containers: |
| 24 | cd ../../../containers/xos; make devel |
| 25 | cd ../../../containers/synchronizer; make |
| 26 | |
| 27 | common_cloudlab: |
| 28 | make -C ../common -f Makefile.cloudlab |
| 29 | |
| 30 | common_devstack: |
| 31 | make -C ../common -f Makefile.devstack |
| 32 | |
| 33 | ceilometer_cloudlab_cord_plugins: |
| 34 | if [ -d ./ceilometer-plugins ]; then rm -fr ./ceilometer-plugins; fi |
| 35 | git clone https://github.com/srikanthvavila/ceilometer-plugins.git |
| 36 | sudo cp -r ceilometer-plugins/network/ext_services /usr/lib/python2.7/dist-packages/ceilometer/network/ |
| 37 | sudo cp -r ceilometer-plugins/network/statistics/onos /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/ |
| 38 | sudo cp ceilometer-plugins/network/statistics/__init__.py /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/ |
| 39 | sudo cp ceilometer-plugins/entry_points.txt /usr/lib/python2.7/dist-packages/ceilometer-*egg-info/ |
| 40 | sudo cp ceilometer-plugins/pipeline.yaml /etc/ceilometer/ |
| 41 | echo "Restarting ceilometer-agent-notification" |
| 42 | sudo service ceilometer-agent-notification restart |
| 43 | echo "Restarting ceilometer-agent-central" |
| 44 | sudo service ceilometer-agent-central restart |
| 45 | |
| 46 | ceilometer_devstack_cord_plugins: |
| 47 | if [ -d ./ceilometer-plugins ]; then rm -fr ./ceilometer-plugins; fi |
| 48 | git clone https://github.com/srikanthvavila/ceilometer-plugins.git |
| 49 | sudo cp -r ceilometer-plugins/network/ext_services /opt/stack/ceilometer/ceilometer/network/ |
| 50 | sudo cp ceilometer-plugins/entry_points.txt /opt/stack/ceilometer/ceilometer*egg-info/ |
| 51 | sudo cp ceilometer-plugins/pipeline.yaml /etc/ceilometer/ |
| 52 | echo "Remember to restart ceilometer-anotification ceilometer-acentral screens" |
| 53 | |
| 54 | ceilometer_pub_sub: |
| 55 | if [ -d ./pub-sub ]; then rm -fr ./pub-sub; fi |
| 56 | git clone https://github.com/srikanthvavila/pub-sub.git |
| 57 | echo "Starting Ceilometer PUB/SUB service...Ensure zookeeper and kafka services are launched (if required)" |
| 58 | cd pub-sub/ceilometer_pub_sub/ ; python sub_main.py & |
| 59 | cd ../.. |
| 60 | |
| 61 | stop: |
| 62 | sudo MYIP=$(MYIP) docker-compose stop |
| 63 | |
| 64 | rm: stop |
| 65 | sudo MYIP=$(MYIP) docker-compose rm |
| 66 | |
| 67 | showlogs: |
| 68 | sudo MYIP=$(MYIP) docker-compose logs |
| 69 | |
| 70 | ps: |
| 71 | sudo MYIP=$(MYIP) docker-compose ps |
| 72 | |
| 73 | cleanup: stop rm |
| 74 | ./cleanup.sh |
| 75 | bash -c "source ../setup/admin-openrc.sh; nova list --all-tenants; neutron net-list" |
| 76 | |
| 77 | devstack_net_fix: |
| 78 | sudo ../common/devstack/net-fix.sh |
| 79 | sudo bash -c "source ../setup/admin-openrc.sh; neutron subnet-update private-subnet --dns-nameservers list=true 8.8.8.8 8.8.4.4" |
| 80 | |
| 81 | upgrade_pkgs: |
| 82 | sudo pip install httpie --upgrade |
| 83 | |
| 84 | rebuild_xos: |
| 85 | make -C ../../../containers/xos devel |
| 86 | |
| 87 | rebuild_synchronizer: |
| 88 | make -C ../../../containers/synchronizer |
| 89 | |
| 90 | devstack_images: |
| 91 | 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.compressed.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.compressed.qcow2 --container-format bare" |
| 92 | |
| 93 | cloudlab_ceilometer_custom_images: |
| 94 | bash -c "source ../setup/admin-openrc.sh; glance image-show ceilometer-trusty-server-multi-nic || if test -f /proj/xos-PG0/images/ceilometer-trusty-server-multi-nic.compressed.qcow2 ; then glance image-create --name ceilometer-trusty-server-multi-nic --disk-format qcow2 --file /proj/xos-PG0/images/ceilometer-trusty-server-multi-nic.compressed.qcow2 --container-format bare ; else mkdir -p /tmp/images && wget http://www.vicci.org/cord/ceilometer-trusty-server-multi-nic.compressed.qcow2 -P /tmp/images && glance image-create --name ceilometer-trusty-server-multi-nic --disk-format qcow2 --file /tmp/images/ceilometer-trusty-server-multi-nic.compressed.qcow2 --container-format bare ; fi " |