blob: 3db0be38ae51e30e03f03340134d2fb002ae5cc8 [file] [log] [blame]
Pingping Lin7ba608e2017-01-26 08:04:41 +00001# mcord/Makefile
2
3CONFIG_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
4COMMON_DIR := $(CONFIG_DIR)/../common
5
6.DEFAULT_GOAL := xos
7
8DOCKER_PROJECT ?= mcord
9BOOTSTRAP_PROJECT ?= mcordbs
10
11XOS_UI_PORT := 9000
12
13include $(COMMON_DIR)/Makefile
14
15xos: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding podconfig rest-gw ui
16
17onboarding:
18 @echo "[ONBOARDING]"
19 # on-board any services here
20 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
21 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
22 sudo cp id_rsa key_import/vBBU_rsa
23 sudo cp id_rsa.pub key_import/vBBU_rsa.pub
24 sudo cp id_rsa key_import/vPGWC_rsa
25 sudo cp id_rsa.pub key_import/vPGWC_rsa.pub
26 sudo cp id_rsa key_import/vSGW_rsa
27 sudo cp id_rsa.pub key_import/vSGW_rsa.pub
28 sudo cp id_rsa key_import/onos_rsa
29 sudo cp id_rsa.pub key_import/onos_rsa.pub
30 sudo cp id_rsa key_import/vMME_rsa
31 sudo cp id_rsa.pub key_import/vMME_rsa.pub
32 $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml
33 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/openstack/xos/openstack-onboard.yaml
34 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vBBU/xos/vBBU-onboard.yaml
35 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vPGWC/xos/vPGWC-onboard.yaml
36 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vSGW/xos/vSGW-onboard.yaml
37 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtn/xos/vtn-onboard.yaml
38 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/onos-service/xos/onos-onboard.yaml
39 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vMME/xos/vmme-onboard.yaml
40 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/fabric/xos/fabric-onboard.yaml
41 $(RUN_TOSCA_BOOTSTRAP) synchronizers.yaml
42 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
43 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/ng-xos-lib
44 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vbbu
45 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vpgwc
46 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vsgw
47 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtn
48 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/onos
49 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vmme
50 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/fabric
51 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
52 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
53
54podconfig: nodes.yaml images.yaml
55 @echo "[PODCONFIG]"
56 # TODO: the setup create the seconde nodes.Controller named MyOpenStack, this why we delete it for now
57 # we still need it because it create lots of other services like firewall on the service list
58 #$(RUN_TOSCA) setup.yaml
59 $(RUN_TOSCA) nodes.yaml
60 $(RUN_TOSCA) images.yaml
61
62vtn: vtn-external.yaml
63 $(RUN_TOSCA) vtn-external.yaml
64
65vtn-external.yaml:
66 export SETUPDIR=$(CONFIG_DIR); bash ./make-vtn-external-yaml.sh
67
68mcord:
69 $(RUN_TOSCA) mgmt-net.yaml
70 $(RUN_TOSCA) mcord.yaml
71
72onboard-slicing: slicing-ui
73 @echo "[ONBOARDING]"
74 # on-board slicing services here
75 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
76 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/disable-onboarding.yaml
77 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/mcord_slicing_ui/xos/mcord-slicing-onboard.yaml
78 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/mcord_slicing_ui
79 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
80 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
81
82slicing-ui:
83 $(RUN_TOSCA) ./mcord-slicing-ui.yaml
84fabric:
85 @echo "[FABRIC]"
86 $(RUN_TOSCA) fabric.yaml
87 sleep 20
88delete_fabric_config:
89 curl -sSL --user karaf:karaf -X DELETE http://onos-fabric:8181/onos/v1/network/configuration/
90
91reactivate_fabric_apps:
92 curl -sSL --user karaf:karaf -X POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.vrouter/active
93 curl -sSL --user karaf:karaf -X POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.segmentrouting/active