blob: e388fcb653151e23b539c7f1d4b414a63bd790af [file] [log] [blame]
include ~/service-profile/mcord/Makefile
ifneq (,$(filter $(firstword $(MAKECMDGOALS)),vpma vta qt600))
# use the rest as arguments for "run"
TARGET_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(TARGET_ARGS):;@:)
endif
activetest: activetest-onboard
$(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-activetest.yaml
activetest-onboard: $(CONFIG_DIR)/files/activetest_config activetest-flavors
sudo cp $(CONFIG_DIR)/id_rsa $(CONFIG_DIR)/key_import/activetest_rsa
sudo cp $(CONFIG_DIR)/id_rsa.pub $(CONFIG_DIR)/key_import/activetest_rsa.pub
$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/ActiveTest/xos/ActiveTest-onboard.yaml
$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/ActiveTest/xos/synchronizer/activetest-synchronizer.yaml
bash $(COMMON_DIR)/wait_for_onboarding_ready.sh 81 services/activetest
bash $(COMMON_DIR)/wait_for_onboarding_ready.sh 81 xos
bash $(COMMON_DIR)/wait_for_xos_port.sh 80
foobar: $(CONFIG_DIR)/files/activetest_config
$(CONFIG_DIR)/files/activetest_config:
cp $(SERVICE_DIR)/ActiveTest/xos/synchronizer/activetest_config $(CONFIG_DIR)/files/activetest_config
clean: cleanup
./cleanup.sh
bash -c "source $(CONFIG_DIR)/admin-openrc.sh; nova list --all-tenants; neutron net-list"
activetest-flavors:
bash -c "source $(CONFIG_DIR)/admin-openrc.sh; nova flavor-show activetest.vta || nova flavor-create activetest.vta auto 4096 64 2"
.PHONY: vpma
vpma:
sed 's/vpmatenant/vpmatenant$(TARGET_ARGS)/g' pod-vpma-template.yaml > pod-vpma.yaml
$(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-vpma.yaml
.PHONY: vta
vta:
sed 's/vtatenant/vtatenant$(TARGET_ARGS)/g' pod-vta-template.yaml > pod-vta.yaml
$(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-vta.yaml
.PHONY: qt600
qt600:
sed 's/qt600tenant/qt600tenant$(TARGET_ARGS)/g' pod-qt600-template.yaml > pod-qt600.yaml
$(RUN_TOSCA) $(SERVICE_DIR)/ActiveTest/pod-qt600.yaml
activetest-tunnel:
$(eval NODES=$(shell bash -c "source $(CONFIG_DIR)/admin-openrc.sh ; nova host-list" | grep compute | awk '{print $$2}' ))
$(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]+'"))
@echo 'Run the following on HEAD NODE:'
@echo ' ssh -f -N -o ProxyCommand="ssh -W %h:%p $(NODES)" root@$(CONTROLLER_IP) -L 0.0.0.0:9443:$(CONTROLLER_IP):9443'