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 |
Scott Baker | da3b159 | 2016-10-24 10:45:36 -0700 | [diff] [blame^] | 41 | $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 42 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/monitoring/xos/monitoring-onboard.yaml |
Scott Baker | da3b159 | 2016-10-24 10:45:36 -0700 | [diff] [blame^] | 43 | $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 44 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/monitoring |
| 45 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos |
| 46 | bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT) |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 47 | |
| 48 | exampleservice: |
| 49 | #Ensure exampleservice is enabled in xos/tools/xos-manage and xos/settings.py file before uncommenting below lines |
| 50 | #sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/acord/acord-exampleservice.yaml |
| 51 | |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 52 | common_cloudlab: |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 53 | make -C $(COMMON_DIR) -f Makefile.cloudlab |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 54 | |
| 55 | common_devstack: |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 56 | make -C $(COMMON_DIR) -f Makefile.devstack |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 57 | |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 58 | ceilometer_cloudlab_cord_plugins: |
| 59 | if [ -d ./ceilometer-plugins ]; then rm -fr ./ceilometer-plugins; fi |
| 60 | git clone https://github.com/srikanthvavila/ceilometer-plugins.git |
| 61 | sudo cp -r ceilometer-plugins/network/ext_services /usr/lib/python2.7/dist-packages/ceilometer/network/ |
| 62 | 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] | 63 | 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] | 64 | sudo cp ceilometer-plugins/entry_points.txt /usr/lib/python2.7/dist-packages/ceilometer-*egg-info/ |
| 65 | sudo cp ceilometer-plugins/pipeline.yaml /etc/ceilometer/ |
| 66 | echo "Restarting ceilometer-agent-notification" |
| 67 | sudo service ceilometer-agent-notification restart |
| 68 | echo "Restarting ceilometer-agent-central" |
| 69 | sudo service ceilometer-agent-central restart |
| 70 | |
| 71 | ceilometer_devstack_cord_plugins: |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 72 | #if [ -d ./ceilometer-plugins ]; then rm -fr ./ceilometer-plugins; fi |
| 73 | #git clone https://github.com/srikanthvavila/ceilometer-plugins.git |
| 74 | #sudo cp -r ceilometer-plugins/network/ext_services /opt/stack/ceilometer/ceilometer/network/ |
| 75 | #sudo cp ceilometer-plugins/entry_points.txt /opt/stack/ceilometer/ceilometer*egg-info/ |
| 76 | #sudo cp ceilometer-plugins/pipeline.yaml /etc/ceilometer/ |
| 77 | #echo "Remember to restart ceilometer-anotification ceilometer-acentral screens" |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 78 | |
| 79 | ceilometer_pub_sub: |
| 80 | if [ -d ./pub-sub ]; then rm -fr ./pub-sub; fi |
| 81 | git clone https://github.com/srikanthvavila/pub-sub.git |
| 82 | 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] | 83 | cd pub-sub/ceilometer_pub_sub/ ; python sub_main.py & |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 84 | cd ../.. |
| 85 | |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 86 | devstack_net_fix: |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 87 | sudo $(COMMON_DIR)/devstack/net-fix.sh |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 88 | 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" |
| 89 | |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 90 | devstack_ceilometer_custom_images: |
| 91 | #Assuming Openstack Mitaka backend. The glance commands require --os-image-api-version 1 to be passed to use v1 version of glance APIs |
| 92 | 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] | 93 | |
| 94 | cloudlab_ceilometer_custom_images: |
Srikanth Vavilapalli | f95cd5b | 2016-07-10 19:08:04 +0000 | [diff] [blame] | 95 | 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 " |
| 96 | |