blob: d56ff74bcfc89fa55d26428b3dd6c6e955cbc923 [file] [log] [blame]
Zack Williams3670f442016-10-04 17:37:12 -07001# frontend/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
Zack Williams3670f442016-10-04 17:37:12 -070017metronetwork: prereqs config_dirs xos_download cord_services 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
Rizwan Haider752a48c2016-08-18 15:37:06 -040027 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/metro-net/xos/metronetworkservice-onboard.yaml
Zack Williams3670f442016-10-04 17:37:12 -070028 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
29 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/metronetwork
30 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
31 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Rizwan Haider752a48c2016-08-18 15:37:06 -040032
Zack Williams3670f442016-10-04 17:37:12 -070033ecord_services:
Matteo Scandolo74a062a2016-09-23 14:15:06 -070034 $(RUN_TOSCA) ecord-services.yaml
35
Rizwan Haider752a48c2016-08-18 15:37:06 -040036clean-config-folder:
Zack Williams3670f442016-10-04 17:37:12 -070037 sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 rm -f /opt/xos/xos_configuration/xos_mcord_config
38 sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 rm -f /opt/xos/xos_configuration/xos_cord_config