Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 1 | # acord/Makefile |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 2 | |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 3 | CONFIG_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) |
| 4 | COMMON_DIR := $(abspath ../common ) |
| 5 | |
| 6 | .DEFAULT_GOAL := xos |
| 7 | |
| 8 | DOCKER_PROJECT ?= acord |
| 9 | BOOTSTRAP_PROJECT ?= acordbs |
| 10 | |
| 11 | DB_NAME ?= $(BOOTSTRAP_PROJECT)_xos_db_1 |
| 12 | |
| 13 | XOS_BOOTSTRAP_PORT ?= 9998 |
| 14 | XOS_UI_PORT ?= 9999 |
| 15 | |
| 16 | # Include common functions |
| 17 | include $(COMMON_DIR)/Makefile |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 18 | |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 19 | cloudlab: download_xos common_cloudlab local_containers xos |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 20 | |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 21 | devstack: download_xos upgrade_pkgs common_devstack local_containers xos devstack_net_fix |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 22 | |
Scott Baker | 62d2428 | 2016-10-21 09:19:11 -0700 | [diff] [blame^] | 23 | xos: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding develconfig |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 24 | |
| 25 | onboarding: |
| 26 | echo "[ONBOARDING]" |
| 27 | # on-board any services here |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 28 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos |
| 29 | bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT) |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 30 | |
| 31 | develconfig: |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 32 | $(RUN_TOSCA) $(COMMON_DIR)/tosca/cloudlab-openstack.yaml |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 33 | $(RUN_TOSCA) ../setup/nodes.yaml |
| 34 | |
| 35 | cord-monitoringservice: devstack_ceilometer_custom_images onboard-monitoringservice ceilometer_devstack_cord_plugins |
| 36 | $(RUN_TOSCA) ceilometer.yaml |
| 37 | |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 38 | onboard-monitoringservice: $(SERVICE_DIR)/monitoring |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 39 | sudo cp ~/.ssh/id_rsa key_import/monitoringservice_rsa |
| 40 | sudo cp ~/.ssh/id_rsa.pub key_import/monitoringservice_rsa.pub |
| 41 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/monitoring/xos/monitoring-onboard.yaml |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 42 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/monitoring |
| 43 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos |
| 44 | bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT) |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 45 | |
| 46 | exampleservice: |
| 47 | #Ensure exampleservice is enabled in xos/tools/xos-manage and xos/settings.py file before uncommenting below lines |
| 48 | #sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/acord/acord-exampleservice.yaml |
| 49 | |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 50 | common_cloudlab: |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 51 | make -C $(COMMON_DIR) -f Makefile.cloudlab |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 52 | |
| 53 | common_devstack: |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 54 | make -C $(COMMON_DIR) -f Makefile.devstack |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 55 | |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 56 | ceilometer_cloudlab_cord_plugins: |
| 57 | if [ -d ./ceilometer-plugins ]; then rm -fr ./ceilometer-plugins; fi |
| 58 | git clone https://github.com/srikanthvavila/ceilometer-plugins.git |
| 59 | sudo cp -r ceilometer-plugins/network/ext_services /usr/lib/python2.7/dist-packages/ceilometer/network/ |
| 60 | sudo cp -r ceilometer-plugins/network/statistics/onos /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/ |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 61 | sudo cp ceilometer-plugins/network/statistics/__init__.py /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/ |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 62 | sudo cp ceilometer-plugins/entry_points.txt /usr/lib/python2.7/dist-packages/ceilometer-*egg-info/ |
| 63 | sudo cp ceilometer-plugins/pipeline.yaml /etc/ceilometer/ |
| 64 | echo "Restarting ceilometer-agent-notification" |
| 65 | sudo service ceilometer-agent-notification restart |
| 66 | echo "Restarting ceilometer-agent-central" |
| 67 | sudo service ceilometer-agent-central restart |
| 68 | |
| 69 | ceilometer_devstack_cord_plugins: |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 70 | #if [ -d ./ceilometer-plugins ]; then rm -fr ./ceilometer-plugins; fi |
| 71 | #git clone https://github.com/srikanthvavila/ceilometer-plugins.git |
| 72 | #sudo cp -r ceilometer-plugins/network/ext_services /opt/stack/ceilometer/ceilometer/network/ |
| 73 | #sudo cp ceilometer-plugins/entry_points.txt /opt/stack/ceilometer/ceilometer*egg-info/ |
| 74 | #sudo cp ceilometer-plugins/pipeline.yaml /etc/ceilometer/ |
| 75 | #echo "Remember to restart ceilometer-anotification ceilometer-acentral screens" |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 76 | |
| 77 | ceilometer_pub_sub: |
| 78 | if [ -d ./pub-sub ]; then rm -fr ./pub-sub; fi |
| 79 | git clone https://github.com/srikanthvavila/pub-sub.git |
| 80 | echo "Starting Ceilometer PUB/SUB service...Ensure zookeeper and kafka services are launched (if required)" |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 81 | cd pub-sub/ceilometer_pub_sub/ ; python sub_main.py & |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 82 | cd ../.. |
| 83 | |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 84 | devstack_net_fix: |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 85 | sudo $(COMMON_DIR)/devstack/net-fix.sh |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 86 | 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" |
| 87 | |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 88 | devstack_ceilometer_custom_images: |
| 89 | #Assuming Openstack Mitaka backend. The glance commands require --os-image-api-version 1 to be passed to use v1 version of glance APIs |
| 90 | bash -c "source ../setup/admin-openrc.sh; glance --os-image-api-version 1 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" |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 91 | |
| 92 | cloudlab_ceilometer_custom_images: |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 93 | bash -c "source ../setup/admin-openrc.sh; glance image-show --os-image-api-version 1 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 " |
| 94 | |