blob: f87ebb48c3f4110f2b43ac3c0cf06a5ea45957f1 [file] [log] [blame]
Zack Williams7828f222016-10-19 14:04:51 -07001# metronetwork/Makefile
Rizwan Haider752a48c2016-08-18 15:37:06 -04002
Zack Williams3670f442016-10-04 17:37:12 -07003CONFIG_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
4COMMON_DIR := $(abspath ../common )
Rizwan Haider752a48c2016-08-18 15:37:06 -04005
Zack Williams3670f442016-10-04 17:37:12 -07006.DEFAULT_GOAL := metronetwork
Rizwan Haider752a48c2016-08-18 15:37:06 -04007
Zack Williams3670f442016-10-04 17:37:12 -07008DOCKER_PROJECT ?= metronetwork
9BOOTSTRAP_PROJECT ?= metronetworkbs
Rizwan Haider752a48c2016-08-18 15:37:06 -040010
Zack Williams3670f442016-10-04 17:37:12 -070011XOS_BOOTSTRAP_PORT ?= 9998
12XOS_UI_PORT ?= 9999
Rizwan Haider752a48c2016-08-18 15:37:06 -040013
Zack Williams3670f442016-10-04 17:37:12 -070014# Include common functions
15include $(COMMON_DIR)/Makefile
Rizwan Haider752a48c2016-08-18 15:37:06 -040016
Scott Baker62d24282016-10-21 09:19:11 -070017metronetwork: prereqs config_dirs xos_download cord_services cord_libraries bootstrap dashboard onboarding ecord_services
Rizwan Haider752a48c2016-08-18 15:37:06 -040018
Zack Williams3670f442016-10-04 17:37:12 -070019dashboard:
Rizwan Haider752a48c2016-08-18 15:37:06 -040020 $(RUN_TOSCA_BOOTSTRAP) dashboard.yaml
21
22onboarding:
23 @echo "[ONBOARDING]"
24 # on-board the metronetwork service
Zack Williams3670f442016-10-04 17:37:12 -070025 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
26 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
Scott Bakerda3b1592016-10-24 10:45:36 -070027 $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml
Rizwan Haider752a48c2016-08-18 15:37:06 -040028 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/metro-net/xos/metronetworkservice-onboard.yaml
Zack Williams3670f442016-10-04 17:37:12 -070029 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
Scott Bakerda3b1592016-10-24 10:45:36 -070030 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/ng-xos-lib
Zack Williams3670f442016-10-04 17:37:12 -070031 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/metronetwork
32 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
33 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Rizwan Haider752a48c2016-08-18 15:37:06 -040034
Zack Williams3670f442016-10-04 17:37:12 -070035ecord_services:
Matteo Scandolo74a062a2016-09-23 14:15:06 -070036 $(RUN_TOSCA) ecord-services.yaml
37
Rizwan Haider752a48c2016-08-18 15:37:06 -040038clean-config-folder:
Zack Williams3670f442016-10-04 17:37:12 -070039 sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 rm -f /opt/xos/xos_configuration/xos_mcord_config
40 sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 rm -f /opt/xos/xos_configuration/xos_cord_config