blob: 029805cb7e0d5a358e0dd4f8a613af1323402ff5 [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
Pingping Lin1b563722017-01-31 02:01:40 +000015pull_services:
16 git clone https://gerrit.opencord.org/vBBU ~/xos_services/vBBU
17 git clone https://gerrit.opencord.org/vMME ~/xos_services/vMME
18 git clone https://gerrit.opencord.org/vSGW ~/xos_services/vSGW
19 git clone https://gerrit.opencord.org/vPGWC ~/xos_services/vPGWC
Pingping Linb7a7d2b2016-08-19 18:11:36 +000020
Pingping Lin1b563722017-01-31 02:01:40 +000021
22xos: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding podconfig rest-gw ui
Pingping Linb7a7d2b2016-08-19 18:11:36 +000023onboarding:
24 @echo "[ONBOARDING]"
25 # on-board any services here
Zack Williams3670f442016-10-04 17:37:12 -070026 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
27 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000028 sudo cp id_rsa key_import/vBBU_rsa
29 sudo cp id_rsa.pub key_import/vBBU_rsa.pub
Pingping Lineb05ccd2016-09-19 21:23:59 +000030 sudo cp id_rsa key_import/vPGWC_rsa
31 sudo cp id_rsa.pub key_import/vPGWC_rsa.pub
JianHao8fa69232017-01-18 03:05:01 +000032 sudo cp id_rsa key_import/vSGW_rsa
33 sudo cp id_rsa.pub key_import/vSGW_rsa.pub
Pingping Linb7a7d2b2016-08-19 18:11:36 +000034 sudo cp id_rsa key_import/onos_rsa
Saleil Bhat17529f02017-01-21 17:24:57 -080035 sudo cp id_rsa.pub key_import/onos_rsa.pub
Saleil Bhat9462d932017-01-20 20:09:06 -080036 sudo cp id_rsa key_import/vMME_rsa
Saleil Bhat17529f02017-01-21 17:24:57 -080037 sudo cp id_rsa.pub key_import/vMME_rsa.pub
Scott Bakerda3b1592016-10-24 10:45:36 -070038 $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000039 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/openstack/xos/openstack-onboard.yaml
Pingping Lin37e727c2016-08-29 23:02:12 +000040 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vBBU/xos/vBBU-onboard.yaml
Pingping Lin97c12612016-09-19 23:40:53 +000041 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vPGWC/xos/vPGWC-onboard.yaml
JianHao8fa69232017-01-18 03:05:01 +000042 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vSGW/xos/vSGW-onboard.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000043 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtn/xos/vtn-onboard.yaml
44 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/onos-service/xos/onos-onboard.yaml
Saleil Bhat9462d932017-01-20 20:09:06 -080045 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vMME/xos/vmme-onboard.yaml
Pingping Lin0dcb5e22017-05-01 16:59:04 -070046 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/fabric/xos/fabric-onboard.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000047 $(RUN_TOSCA_BOOTSTRAP) synchronizers.yaml
Zack Williams3670f442016-10-04 17:37:12 -070048 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
Scott Bakerda3b1592016-10-24 10:45:36 -070049 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/ng-xos-lib
Zack Williams3670f442016-10-04 17:37:12 -070050 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vbbu
51 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vpgwc
JianHao8fa69232017-01-18 03:05:01 +000052 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vsgw
Zack Williams3670f442016-10-04 17:37:12 -070053 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtn
54 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/onos
Saleil Bhat9462d932017-01-20 20:09:06 -080055 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vmme
Pingping Lin0dcb5e22017-05-01 16:59:04 -070056 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/fabric
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
60progran:
61 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/progran/xos/progran-onboard.yaml
62 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/progran
Zack Williams3670f442016-10-04 17:37:12 -070063 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
64 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Pingping Linb7a7d2b2016-08-19 18:11:36 +000065
66podconfig: nodes.yaml images.yaml
67 @echo "[PODCONFIG]"
Pingping Lin41a6c842017-01-26 07:57:10 +000068 # TODO: the setup create the seconde nodes.Controller named MyOpenStack, this why we delete it for now
69 # we still need it because it create lots of other services like firewall on the service list
70 #$(RUN_TOSCA) setup.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000071 $(RUN_TOSCA) nodes.yaml
72 $(RUN_TOSCA) images.yaml
73
Pingping Lin0dcb5e22017-05-01 16:59:04 -070074images:
75 $(RUN_TOSCA) images.yaml
76
Pingping Linb7a7d2b2016-08-19 18:11:36 +000077vtn: vtn-external.yaml
78 $(RUN_TOSCA) vtn-external.yaml
79
Zack Williams3670f442016-10-04 17:37:12 -070080vtn-external.yaml:
Pingping Lin0dcb5e22017-05-01 16:59:04 -070081# export SETUPDIR=$(CONFIG_DIR); bash ./make-vtn-external-yaml.sh
Pingping Linb7a7d2b2016-08-19 18:11:36 +000082
Pingping Lin82366d32016-08-31 00:21:56 +000083mcord:
84 $(RUN_TOSCA) mgmt-net.yaml
85 $(RUN_TOSCA) mcord.yaml
Pingping Linb7a7d2b2016-08-19 18:11:36 +000086
Matteo Scandoloc55c0572016-10-04 08:42:38 -070087onboard-slicing: slicing-ui
88 @echo "[ONBOARDING]"
89 # on-board slicing services here
Zack Williams3670f442016-10-04 17:37:12 -070090 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
91 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/disable-onboarding.yaml
Matteo Scandoloc55c0572016-10-04 08:42:38 -070092 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/mcord_slicing_ui/xos/mcord-slicing-onboard.yaml
Zack Williams3670f442016-10-04 17:37:12 -070093 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/mcord_slicing_ui
94 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
95 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Matteo Scandoloc55c0572016-10-04 08:42:38 -070096
Matteo Scandolo1105c5b2016-10-03 11:25:34 -070097slicing-ui:
Zack Williams3670f442016-10-04 17:37:12 -070098 $(RUN_TOSCA) ./mcord-slicing-ui.yaml
Pingping Lin12ec7a92017-01-25 18:55:58 -080099fabric:
100 @echo "[FABRIC]"
101 $(RUN_TOSCA) fabric.yaml
102 sleep 20
103delete_fabric_config:
104 curl -sSL --user karaf:karaf -X DELETE http://onos-fabric:8181/onos/v1/network/configuration/
105
106reactivate_fabric_apps:
107 curl -sSL --user karaf:karaf -X POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.vrouter/active
108 curl -sSL --user karaf:karaf -X POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.segmentrouting/active
Pingping Lin0dcb5e22017-05-01 16:59:04 -0700109
110deactivate_fabric_apps:
111 curl -sSL --user karaf:karaf -X POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.vrouter/deactivate
112 curl -sSL --user karaf:karaf -X POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.segmentrouting/deactive
113
114experimental-ui:
115 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
116 $(RUN_TOSCA_BOOTSTRAP) $(CONFIG_DIR)/ui_containers.yaml
117 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
118 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
119 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)