blob: 18bb90a12fc332eae0dd3f1c07a4016c9253fa61 [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))))
Gabe Blackcaf7e1c2016-11-08 21:49:04 +00004COMMON_DIR := $(CONFIG_DIR)/../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
Gabe Black86b1afe2017-01-12 18:52:51 +000011XOS_UI_PORT := 9000
JianHao2f6dca22016-12-22 03:44:52 +000012
Gabe Black8746a932016-10-28 19:36:15 +000013include $(COMMON_DIR)/Makefile
14
Matteo Scandoloa317b872017-01-10 12:02:41 -080015xos: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding podconfig rest-gw ui
Pingping Linb7a7d2b2016-08-19 18:11:36 +000016
17onboarding:
18 @echo "[ONBOARDING]"
19 # on-board any services here
Zack Williams3670f442016-10-04 17:37:12 -070020 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
21 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000022 sudo cp id_rsa key_import/vBBU_rsa
23 sudo cp id_rsa.pub key_import/vBBU_rsa.pub
Pingping Lineb05ccd2016-09-19 21:23:59 +000024 sudo cp id_rsa key_import/vPGWC_rsa
25 sudo cp id_rsa.pub key_import/vPGWC_rsa.pub
JianHao8fa69232017-01-18 03:05:01 +000026 sudo cp id_rsa key_import/vSGW_rsa
27 sudo cp id_rsa.pub key_import/vSGW_rsa.pub
Pingping Linb7a7d2b2016-08-19 18:11:36 +000028 sudo cp id_rsa key_import/onos_rsa
29 sudo cp id_rsa key_import/onos_rsa.pub
Scott Bakerda3b1592016-10-24 10:45:36 -070030 $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000031 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/openstack/xos/openstack-onboard.yaml
Pingping Lin37e727c2016-08-29 23:02:12 +000032 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vBBU/xos/vBBU-onboard.yaml
Pingping Lin97c12612016-09-19 23:40:53 +000033 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vPGWC/xos/vPGWC-onboard.yaml
JianHao8fa69232017-01-18 03:05:01 +000034 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vSGW/xos/vSGW-onboard.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000035 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtn/xos/vtn-onboard.yaml
36 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/onos-service/xos/onos-onboard.yaml
Matteo Scandolob286a6a2016-10-03 13:27:00 -070037 # $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/fabric/xos/\fabric-onboard.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000038 $(RUN_TOSCA_BOOTSTRAP) synchronizers.yaml
Zack Williams3670f442016-10-04 17:37:12 -070039 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
Scott Bakerda3b1592016-10-24 10:45:36 -070040 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/ng-xos-lib
Zack Williams3670f442016-10-04 17:37:12 -070041 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vbbu
42 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vpgwc
JianHao8fa69232017-01-18 03:05:01 +000043 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vsgw
Zack Williams3670f442016-10-04 17:37:12 -070044 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtn
45 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/onos
46 # bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/fabric
47 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
48 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Pingping Linb7a7d2b2016-08-19 18:11:36 +000049
50podconfig: nodes.yaml images.yaml
51 @echo "[PODCONFIG]"
52 $(RUN_TOSCA) setup.yaml
53 $(RUN_TOSCA) nodes.yaml
54 $(RUN_TOSCA) images.yaml
55
56vtn: vtn-external.yaml
57 $(RUN_TOSCA) vtn-external.yaml
58
Zack Williams3670f442016-10-04 17:37:12 -070059vtn-external.yaml:
60 export SETUPDIR=$(CONFIG_DIR); bash ./make-vtn-external-yaml.sh
Pingping Linb7a7d2b2016-08-19 18:11:36 +000061
Pingping Lin82366d32016-08-31 00:21:56 +000062mcord:
63 $(RUN_TOSCA) mgmt-net.yaml
64 $(RUN_TOSCA) mcord.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000065
Matteo Scandoloc55c0572016-10-04 08:42:38 -070066onboard-slicing: slicing-ui
67 @echo "[ONBOARDING]"
68 # on-board slicing services here
Zack Williams3670f442016-10-04 17:37:12 -070069 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
70 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/disable-onboarding.yaml
Matteo Scandoloc55c0572016-10-04 08:42:38 -070071 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/mcord_slicing_ui/xos/mcord-slicing-onboard.yaml
Zack Williams3670f442016-10-04 17:37:12 -070072 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/mcord_slicing_ui
73 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
74 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Matteo Scandoloc55c0572016-10-04 08:42:38 -070075
Matteo Scandolo1105c5b2016-10-03 11:25:34 -070076slicing-ui:
Zack Williams3670f442016-10-04 17:37:12 -070077 $(RUN_TOSCA) ./mcord-slicing-ui.yaml