Scott Baker | ebbe137 | 2016-06-09 16:11:11 -0700 | [diff] [blame] | 1 | CONFIG_DIR:=$(shell pwd) |
Scott Baker | 315e387 | 2016-06-09 09:24:04 -0700 | [diff] [blame] | 2 | DOCKER_COMPOSE_YML=./onboarding-docker-compose/docker-compose.yml |
| 3 | BOOTSTRAP_YML=./docker-compose-bootstrap.yml |
Scott Baker | ebbe137 | 2016-06-09 16:11:11 -0700 | [diff] [blame] | 4 | DOCKER_PROJECT=cordpod |
Scott Baker | 315e387 | 2016-06-09 09:24:04 -0700 | [diff] [blame] | 5 | |
Andy Bavier | 4c57580 | 2016-02-09 09:23:27 -0500 | [diff] [blame] | 6 | .PHONY: xos |
Scott Baker | 315e387 | 2016-06-09 09:24:04 -0700 | [diff] [blame] | 7 | xos: prereqs bootstrap onboarding podconfig |
Scott Baker | 5254405 | 2016-05-02 09:34:59 -0700 | [diff] [blame] | 8 | |
Scott Baker | 315e387 | 2016-06-09 09:24:04 -0700 | [diff] [blame] | 9 | prereqs: |
| 10 | sudo make -f ../common/Makefile.prereqs |
Scott Baker | 5254405 | 2016-05-02 09:34:59 -0700 | [diff] [blame] | 11 | |
Scott Baker | 315e387 | 2016-06-09 09:24:04 -0700 | [diff] [blame] | 12 | bootstrap: |
| 13 | echo "[BOOTSTRAP]" |
| 14 | sudo rm -f onboarding-docker-compose/docker-compose.yml |
| 15 | sudo docker-compose -p $(DOCKER_PROJECT) -f docker-compose-bootstrap.yml up -d |
| 16 | bash ../common/wait_for_xos_port.sh 81 |
| 17 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run -e CONFIG_DIR=$(CONFIG_DIR) xos_bootstrap_ui python /opt/xos/tosca/run.py none /opt/xos/configurations/cord-pod/xos.yaml |
| 18 | |
| 19 | onboarding: |
| 20 | echo "[ONBOARDING]" |
Scott Baker | 315e387 | 2016-06-09 09:24:04 -0700 | [diff] [blame] | 21 | # on-board any services here |
Scott Baker | ebbe137 | 2016-06-09 16:11:11 -0700 | [diff] [blame] | 22 | bash ../common/wait_for_onboarding_ready.sh 81 xos |
Scott Baker | 3127efd | 2016-06-13 19:52:28 -0700 | [diff] [blame] | 23 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py None /opt/xos/configurations/cord-pod/disable-onboarding.yaml |
Scott Baker | b91a4a5 | 2016-06-13 15:47:07 -0700 | [diff] [blame] | 24 | sudo cp id_rsa key_import/vsg_rsa |
| 25 | sudo cp id_rsa.pub key_import/vsg_rsa.pub |
| 26 | sudo cp id_rsa key_import/volt_rsa |
| 27 | sudo cp id_rsa.pub key_import/volt_rsa.pub |
Scott Baker | b908a0c | 2016-06-14 01:43:59 -0700 | [diff] [blame] | 28 | sudo cp id_rsa key_import/onos_rsa |
| 29 | sudo cp id_rsa key_import/onos_rsa.pub |
Scott Baker | 31ac85b | 2016-06-14 14:52:05 -0700 | [diff] [blame] | 30 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py None /opt/xos/onboard/vrouter/vrouter-onboard.yaml |
Scott Baker | 40722d0 | 2016-06-13 19:04:24 -0700 | [diff] [blame] | 31 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py None /opt/xos/onboard/volt/volt-onboard.yaml |
| 32 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py None /opt/xos/onboard/vsg/vsg-onboard.yaml |
Scott Baker | b908a0c | 2016-06-14 01:43:59 -0700 | [diff] [blame] | 33 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py None /opt/xos/onboard/vtn/vtn-onboard.yaml |
| 34 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py None /opt/xos/onboard/onos/onos-onboard.yaml |
Scott Baker | 01f3d1c | 2016-06-14 11:13:15 -0700 | [diff] [blame] | 35 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py None /opt/xos/onboard/fabric/fabric-onboard.yaml |
Scott Baker | 599d6b0 | 2016-06-14 12:51:27 -0700 | [diff] [blame] | 36 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py None /opt/xos/onboard/vtr/vtr-onboard.yaml |
Scott Baker | 39c2521 | 2016-06-13 21:41:06 -0700 | [diff] [blame] | 37 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py None /opt/xos/configurations/cord-pod/synchronizers.yaml |
Scott Baker | 3127efd | 2016-06-13 19:52:28 -0700 | [diff] [blame] | 38 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py None /opt/xos/configurations/cord-pod/enable-onboarding.yaml |
Scott Baker | 31ac85b | 2016-06-14 14:52:05 -0700 | [diff] [blame] | 39 | bash ../common/wait_for_onboarding_ready.sh 81 services/vrouter |
Scott Baker | b91a4a5 | 2016-06-13 15:47:07 -0700 | [diff] [blame] | 40 | bash ../common/wait_for_onboarding_ready.sh 81 services/volt |
| 41 | bash ../common/wait_for_onboarding_ready.sh 81 services/vsg |
Scott Baker | b908a0c | 2016-06-14 01:43:59 -0700 | [diff] [blame] | 42 | bash ../common/wait_for_onboarding_ready.sh 81 services/vtn |
| 43 | bash ../common/wait_for_onboarding_ready.sh 81 services/onos |
Scott Baker | 01f3d1c | 2016-06-14 11:13:15 -0700 | [diff] [blame] | 44 | bash ../common/wait_for_onboarding_ready.sh 81 services/fabric |
Scott Baker | 599d6b0 | 2016-06-14 12:51:27 -0700 | [diff] [blame] | 45 | bash ../common/wait_for_onboarding_ready.sh 81 services/vtr |
Scott Baker | ebbe137 | 2016-06-09 16:11:11 -0700 | [diff] [blame] | 46 | bash ../common/wait_for_onboarding_ready.sh 81 xos |
| 47 | bash ../common/wait_for_xos_port.sh 80 |
Scott Baker | 315e387 | 2016-06-09 09:24:04 -0700 | [diff] [blame] | 48 | |
| 49 | podconfig: nodes.yaml images.yaml |
| 50 | echo "[PODCONFIG]" |
Scott Baker | ebbe137 | 2016-06-09 16:11:11 -0700 | [diff] [blame] | 51 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py none /opt/xos/configurations/common/fixtures.yaml |
| 52 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py none /opt/xos/configurations/common/mydeployment.yaml |
| 53 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/setup.yaml |
| 54 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml |
| 55 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/images.yaml |
Andy Bavier | 237862b | 2016-02-16 15:39:49 -0500 | [diff] [blame] | 56 | |
Andy Bavier | 8a71f80 | 2016-04-26 16:29:06 -0400 | [diff] [blame] | 57 | vtn: vtn-external.yaml |
Scott Baker | ebbe137 | 2016-06-09 16:11:11 -0700 | [diff] [blame] | 58 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/vtn-external.yaml |
Andy Bavier | 237862b | 2016-02-16 15:39:49 -0500 | [diff] [blame] | 59 | |
Andy Bavier | 1f1f9af | 2016-06-10 17:31:05 -0400 | [diff] [blame] | 60 | fabric: fabric.yaml |
| 61 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/fabric.yaml |
| 62 | |
Scott Baker | 26d31fa | 2016-05-19 09:52:17 -0700 | [diff] [blame] | 63 | cord: vsg_custom_images |
Scott Baker | ebbe137 | 2016-06-09 16:11:11 -0700 | [diff] [blame] | 64 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/mgmt-net.yaml |
| 65 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/cord-vtn-vsg.yaml |
| 66 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/cord-volt-devices.yaml |
Andy Bavier | 4c57580 | 2016-02-09 09:23:27 -0500 | [diff] [blame] | 67 | |
Andy Bavier | 160e2aa | 2016-06-15 14:41:26 -0700 | [diff] [blame^] | 68 | clean-nodes: |
| 69 | rm -f nodes.yaml |
| 70 | |
| 71 | update-nodes: nodes.yaml |
| 72 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml |
| 73 | |
| 74 | new-nodes: clean-nodes update-nodes vtn |
| 75 | |
Andy Bavier | 07c3304 | 2016-04-08 16:34:52 -0400 | [diff] [blame] | 76 | exampleservice: |
Scott Baker | dd16efb | 2016-06-09 22:56:22 -0700 | [diff] [blame] | 77 | sudo cp id_rsa key_import/exampleservice_rsa |
| 78 | sudo cp id_rsa.pub key_import/exampleservice_rsa.pub |
| 79 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/onboard/exampleservice/exampleservice-onboard.yaml |
| 80 | bash ../common/wait_for_onboarding_ready.sh 81 xos |
Scott Baker | cf44417 | 2016-06-10 16:17:18 -0700 | [diff] [blame] | 81 | bash ../common/wait_for_xos_port.sh 80 |
Scott Baker | dd16efb | 2016-06-09 22:56:22 -0700 | [diff] [blame] | 82 | sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/pod-exampleservice.yaml |
Andy Bavier | 07c3304 | 2016-04-08 16:34:52 -0400 | [diff] [blame] | 83 | |
Srikanth Vavilapalli | 1c68c47 | 2016-03-02 18:22:04 +0000 | [diff] [blame] | 84 | cord-ceilometer: ceilometer_custom_images cord |
| 85 | sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/ceilometer.yaml |
| 86 | |
Andy Bavier | 4c57580 | 2016-02-09 09:23:27 -0500 | [diff] [blame] | 87 | nodes.yaml: |
| 88 | export SETUPDIR=.; bash ../common/make-nodes-yaml.sh |
| 89 | |
| 90 | images.yaml: |
| 91 | export SETUPDIR=.; bash ../common/make-images-yaml.sh |
| 92 | |
Andy Bavier | 8a71f80 | 2016-04-26 16:29:06 -0400 | [diff] [blame] | 93 | vtn-external.yaml: |
| 94 | export SETUPDIR=.; bash ./make-vtn-external-yaml.sh |
| 95 | |
Andy Bavier | 1f1f9af | 2016-06-10 17:31:05 -0400 | [diff] [blame] | 96 | fabric.yaml: |
| 97 | export SETUPDIR=.; bash ./make-fabric-yaml.sh |
| 98 | |
Andy Bavier | 606beb4 | 2016-02-15 14:34:33 -0500 | [diff] [blame] | 99 | virtualbng_json: |
| 100 | export SETUPDIR=.; bash ./make-virtualbng-json.sh |
| 101 | |
Andy Bavier | 4c57580 | 2016-02-09 09:23:27 -0500 | [diff] [blame] | 102 | vtn_network_cfg_json: |
| 103 | export SETUPDIR=.; bash ./make-vtn-networkconfig-json.sh |
| 104 | |
Srikanth Vavilapalli | 1c68c47 | 2016-03-02 18:22:04 +0000 | [diff] [blame] | 105 | stop: |
Scott Baker | 634a1a7 | 2016-06-09 16:15:12 -0700 | [diff] [blame] | 106 | test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) stop |
| 107 | sudo docker-compose -f $(BOOTSTRAP_YML) stop |
Srikanth Vavilapalli | 1c68c47 | 2016-03-02 18:22:04 +0000 | [diff] [blame] | 108 | |
| 109 | rm: |
Scott Baker | 634a1a7 | 2016-06-09 16:15:12 -0700 | [diff] [blame] | 110 | test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) rm |
| 111 | sudo docker-compose -f $(BOOTSTRAP_YML) rm |
Srikanth Vavilapalli | 1c68c47 | 2016-03-02 18:22:04 +0000 | [diff] [blame] | 112 | |
| 113 | showlogs: |
| 114 | sudo MYIP=$(MYIP) docker-compose logs |
| 115 | |
| 116 | cleanup: stop rm |
| 117 | ./cleanup.sh |
| 118 | bash -c "source ./admin-openrc.sh; nova list --all-tenants; neutron net-list" |
| 119 | |
Scott Baker | 315e387 | 2016-06-09 09:24:04 -0700 | [diff] [blame] | 120 | ceilometer_custom_images: images/ceilometer-trusty-server-multi-nic.img |
| 121 | bash -c "source ./admin-openrc.sh; glance image-show ceilometer-trusty-server-multi-nic || glance image-create --name ceilometer-trusty-server-multi-nic --disk-format qcow2 --file ./images/ceilometer-trusty-server-multi-nic.img --container-format bare" |
Srikanth Vavilapalli | 1c68c47 | 2016-03-02 18:22:04 +0000 | [diff] [blame] | 122 | |
Scott Baker | 315e387 | 2016-06-09 09:24:04 -0700 | [diff] [blame] | 123 | vsg_custom_images: images/vsg-1.0.img |
| 124 | bash -c "source ./admin-openrc.sh; glance image-show vsg-1.0 || glance image-create --name vsg-1.0 --disk-format qcow2 --file ./images/vsg-1.0.img --container-format bare" |
| 125 | |
| 126 | images/ceilometer-trusty-server-multi-nic.img: images |
| 127 | wget http://www.vicci.org/cord/ceilometer-trusty-server-multi-nic.compressed.qcow2 -P ./images |
| 128 | mv ./images/ceilometer-trusty-server-multi-nic.compressed.qcow2 ./images/ceilometer-trusty-server-multi-nic.img |
| 129 | |
| 130 | images/vsg-1.0.img: images |
| 131 | wget http://www.vicci.org/cord/vsg-1.0.img -P ./images |
| 132 | |
| 133 | images: |
| 134 | mkdir -p ./images |
Scott Baker | 26d31fa | 2016-05-19 09:52:17 -0700 | [diff] [blame] | 135 | |
Andy Bavier | 4c57580 | 2016-02-09 09:23:27 -0500 | [diff] [blame] | 136 | .PHONY: local_containers |
| 137 | local_containers: |
Scott Baker | 315e387 | 2016-06-09 09:24:04 -0700 | [diff] [blame] | 138 | echo "" > ../../../containers/xos/local_certs.crt |
| 139 | for CRT in $$(ls /usr/local/share/ca-certificates/*) ; do \ |
| 140 | echo Adding Certificate: $$CRT ;\ |
| 141 | cat $$CRT >> ../../../containers/xos/local_certs.crt ;\ |
| 142 | echo "" >> ../../../containers/xos/local_certs.crt ;\ |
| 143 | done |
Andy Bavier | 4c57580 | 2016-02-09 09:23:27 -0500 | [diff] [blame] | 144 | cd ../../../containers/xos; make devel |
| 145 | cd ../../../containers/synchronizer; make |
Scott Baker | ebbe137 | 2016-06-09 16:11:11 -0700 | [diff] [blame] | 146 | cd ../../../containers/onboarding_synchronizer; make |