blob: e0833472dad77e31b0a78fec0b378f851c735a61 [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
Rizwan Haider0bab5f42016-11-10 01:21:07 -050014BOOTSTRAP_DEVEL_YML ?= $(CONFIG_DIR)/docker-compose-bootstrap-devel.yml
15
Zack Williams3670f442016-10-04 17:37:12 -070016# Include common functions
17include $(COMMON_DIR)/Makefile
Rizwan Haider752a48c2016-08-18 15:37:06 -040018
Scott Baker62d24282016-10-21 09:19:11 -070019metronetwork: prereqs config_dirs xos_download cord_services cord_libraries bootstrap dashboard onboarding ecord_services
Rizwan Haider752a48c2016-08-18 15:37:06 -040020
Rizwan Haider0bab5f42016-11-10 01:21:07 -050021# Targets to accomodate users with HTTP proxies
22metronetworkconfig: prereqs config_dirs xos_download cord_services cord_libraries
23metronetworklaunch: bootstrap dashboard onboarding ecord_services
24
Zack Williams3670f442016-10-04 17:37:12 -070025dashboard:
Rizwan Haider752a48c2016-08-18 15:37:06 -040026 $(RUN_TOSCA_BOOTSTRAP) dashboard.yaml
27
28onboarding:
29 @echo "[ONBOARDING]"
30 # on-board the metronetwork service
Zack Williams3670f442016-10-04 17:37:12 -070031 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
32 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
Scott Bakerda3b1592016-10-24 10:45:36 -070033 $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml
Rizwan Haider752a48c2016-08-18 15:37:06 -040034 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/metro-net/xos/metronetworkservice-onboard.yaml
Zack Williams3670f442016-10-04 17:37:12 -070035 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
Scott Bakerda3b1592016-10-24 10:45:36 -070036 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/ng-xos-lib
Zack Williams3670f442016-10-04 17:37:12 -070037 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/metronetwork
38 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
39 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Rizwan Haider752a48c2016-08-18 15:37:06 -040040
Zack Williams3670f442016-10-04 17:37:12 -070041ecord_services:
Matteo Scandolo74a062a2016-09-23 14:15:06 -070042 $(RUN_TOSCA) ecord-services.yaml
43
Rizwan Haider752a48c2016-08-18 15:37:06 -040044clean-config-folder:
Zack Williams3670f442016-10-04 17:37:12 -070045 sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 rm -f /opt/xos/xos_configuration/xos_mcord_config
46 sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 rm -f /opt/xos/xos_configuration/xos_cord_config
Rizwan Haider0bab5f42016-11-10 01:21:07 -050047
48onboardmetronetlocal:
49 @echo "[ONBOARDING VNOD LOCAL]"
50 # on-board the vnodlocal service - used for testing
51 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
52 $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml
53 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/metronet-local/xos/vnodlocalservice-onboard.yaml
54 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
55 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/ng-xos-lib
56 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vnodlocal
57 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
58 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
59
60devel:
61 # Simply start the DB - other steps will be done manually
62 sudo CONFIG_DIR=$(CONFIG_DIR) docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_DEVEL_YML) up -d