blob: c4a1101e03e5bc76aab0c7953c1e2ef6dce5ba5f [file] [log] [blame]
Zack Williams7828f222016-10-19 14:04:51 -07001# mcord/Makefile
Pingping Linb7a7d2b2016-08-19 18:11:36 +00002
Zack Williams3670f442016-10-04 17:37:12 -07003CONFIG_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
4COMMON_DIR := $(abspath ../common )
Pingping Linb7a7d2b2016-08-19 18:11:36 +00005
Zack Williams3670f442016-10-04 17:37:12 -07006.DEFAULT_GOAL := xos
Pingping Linb7a7d2b2016-08-19 18:11:36 +00007
Zack Williams3670f442016-10-04 17:37:12 -07008DOCKER_PROJECT ?= mcord
9BOOTSTRAP_PROJECT ?= mcordbs
Pingping Linb7a7d2b2016-08-19 18:11:36 +000010
Scott Baker62d24282016-10-21 09:19:11 -070011xos: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding podconfig
Pingping Linb7a7d2b2016-08-19 18:11:36 +000012
13onboarding:
14 @echo "[ONBOARDING]"
15 # on-board any services here
Zack Williams3670f442016-10-04 17:37:12 -070016 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
17 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000018 sudo cp id_rsa key_import/vBBU_rsa
19 sudo cp id_rsa.pub key_import/vBBU_rsa.pub
Pingping Lineb05ccd2016-09-19 21:23:59 +000020 sudo cp id_rsa key_import/vPGWC_rsa
21 sudo cp id_rsa.pub key_import/vPGWC_rsa.pub
Pingping Linb7a7d2b2016-08-19 18:11:36 +000022 sudo cp id_rsa key_import/onos_rsa
23 sudo cp id_rsa key_import/onos_rsa.pub
Scott Bakerda3b1592016-10-24 10:45:36 -070024 $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000025 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/openstack/xos/openstack-onboard.yaml
Pingping Lin37e727c2016-08-29 23:02:12 +000026 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vBBU/xos/vBBU-onboard.yaml
Pingping Lin97c12612016-09-19 23:40:53 +000027 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vPGWC/xos/vPGWC-onboard.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000028 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtn/xos/vtn-onboard.yaml
29 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/onos-service/xos/onos-onboard.yaml
Matteo Scandolob286a6a2016-10-03 13:27:00 -070030 # $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/fabric/xos/\fabric-onboard.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000031 $(RUN_TOSCA_BOOTSTRAP) synchronizers.yaml
Zack Williams3670f442016-10-04 17:37:12 -070032 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
Scott Bakerda3b1592016-10-24 10:45:36 -070033 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/ng-xos-lib
Zack Williams3670f442016-10-04 17:37:12 -070034 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vbbu
35 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vpgwc
36 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtn
37 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/onos
38 # bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/fabric
39 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
40 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Pingping Linb7a7d2b2016-08-19 18:11:36 +000041
42podconfig: nodes.yaml images.yaml
43 @echo "[PODCONFIG]"
44 $(RUN_TOSCA) setup.yaml
45 $(RUN_TOSCA) nodes.yaml
46 $(RUN_TOSCA) images.yaml
47
48vtn: vtn-external.yaml
49 $(RUN_TOSCA) vtn-external.yaml
50
Zack Williams3670f442016-10-04 17:37:12 -070051vtn-external.yaml:
52 export SETUPDIR=$(CONFIG_DIR); bash ./make-vtn-external-yaml.sh
Pingping Linb7a7d2b2016-08-19 18:11:36 +000053
Pingping Lin82366d32016-08-31 00:21:56 +000054mcord:
55 $(RUN_TOSCA) mgmt-net.yaml
56 $(RUN_TOSCA) mcord.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000057
Matteo Scandoloc55c0572016-10-04 08:42:38 -070058onboard-slicing: slicing-ui
59 @echo "[ONBOARDING]"
60 # on-board slicing services here
Zack Williams3670f442016-10-04 17:37:12 -070061 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
62 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/disable-onboarding.yaml
Matteo Scandoloc55c0572016-10-04 08:42:38 -070063 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/mcord_slicing_ui/xos/mcord-slicing-onboard.yaml
Zack Williams3670f442016-10-04 17:37:12 -070064 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/mcord_slicing_ui
65 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
66 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Matteo Scandoloc55c0572016-10-04 08:42:38 -070067
Matteo Scandolo1105c5b2016-10-03 11:25:34 -070068slicing-ui:
Zack Williams3670f442016-10-04 17:37:12 -070069 $(RUN_TOSCA) ./mcord-slicing-ui.yaml