Gabe Black | 4c040b7 | 2016-11-17 22:35:04 +0000 | [diff] [blame] | 1 | include ~/service-profile/mcord/Makefile |
| 2 | |
| 3 | ifneq (,$(filter $(firstword $(MAKECMDGOALS)),vpma vta qt600)) |
| 4 | # use the rest as arguments for "run" |
| 5 | TARGET_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) |
| 6 | # ...and turn them into do-nothing targets |
| 7 | $(eval $(TARGET_ARGS):;@:) |
| 8 | endif |
| 9 | |
| 10 | activetest: activetest-onboard |
| 11 | $(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-activetest.yaml |
| 12 | |
| 13 | activetest-onboard: $(CONFIG_DIR)/files/activetest_config activetest-flavors |
| 14 | sudo cp $(CONFIG_DIR)/id_rsa $(CONFIG_DIR)/key_import/activetest_rsa |
| 15 | sudo cp $(CONFIG_DIR)/id_rsa.pub $(CONFIG_DIR)/key_import/activetest_rsa.pub |
| 16 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/ActiveTest/xos/ActiveTest-onboard.yaml |
| 17 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/ActiveTest/xos/synchronizer/activetest-synchronizer.yaml |
| 18 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh 81 services/activetest |
| 19 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh 81 xos |
| 20 | bash $(COMMON_DIR)/wait_for_xos_port.sh 80 |
| 21 | |
| 22 | foobar: $(CONFIG_DIR)/files/activetest_config |
| 23 | |
| 24 | $(CONFIG_DIR)/files/activetest_config: |
| 25 | cp $(SERVICE_DIR)/ActiveTest/xos/synchronizer/activetest_config $(CONFIG_DIR)/files/activetest_config |
| 26 | |
| 27 | clean: cleanup |
| 28 | ./cleanup.sh |
| 29 | bash -c "source $(CONFIG_DIR)/admin-openrc.sh; nova list --all-tenants; neutron net-list" |
| 30 | |
| 31 | activetest-flavors: |
| 32 | bash -c "source $(CONFIG_DIR)/admin-openrc.sh; nova flavor-show activetest.vta || nova flavor-create activetest.vta auto 4096 64 2" |
| 33 | |
| 34 | .PHONY: vpma |
| 35 | vpma: |
| 36 | sed 's/vpmatenant/vpmatenant$(TARGET_ARGS)/g' pod-vpma-template.yaml > pod-vpma.yaml |
| 37 | $(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-vpma.yaml |
| 38 | |
| 39 | .PHONY: vta |
| 40 | vta: |
| 41 | sed 's/vtatenant/vtatenant$(TARGET_ARGS)/g' pod-vta-template.yaml > pod-vta.yaml |
| 42 | $(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-vta.yaml |
| 43 | |
| 44 | .PHONY: qt600 |
| 45 | qt600: |
| 46 | sed 's/qt600tenant/qt600tenant$(TARGET_ARGS)/g' pod-qt600-template.yaml > pod-qt600.yaml |
| 47 | $(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-qt600.yaml |
| 48 | |
| 49 | activetest-tunnel: |
| 50 | $(eval NODES=$(shell bash -c "source $(CONFIG_DIR)/admin-openrc.sh ; nova host-list" | grep compute | awk '{print $$2}' )) |
| 51 | $(eval CONTROLLER_IP=$(shell bash -c "source $(CONFIG_DIR)/admin-openrc.sh ; nova list --image fusion --all-tenants | grep -o -E '172.27.0.[0-9]+'")) |
| 52 | @echo 'Run the following on HEAD NODE:' |
| 53 | @echo ' ssh -f -N -o ProxyCommand="ssh -W %h:%p $(NODES)" root@$(CONTROLLER_IP) -L 0.0.0.0:9443:$(CONTROLLER_IP):9443' |