blob: d0bf779bf142e85cdff494784ff5730dd0ec4fe0 [file] [log] [blame]
Zack Williams3670f442016-10-04 17:37:12 -07001# cord-pod/Makefile
Scott Baker50421662016-06-27 22:09:48 -07002
Zack Williams3670f442016-10-04 17:37:12 -07003CONFIG_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
4COMMON_DIR := $(abspath ../common )
Scott Baker50421662016-06-27 22:09:48 -07005
Zack Williams3670f442016-10-04 17:37:12 -07006.DEFAULT_GOAL := xos
Scott Baker50421662016-06-27 22:09:48 -07007
Zack Williams3670f442016-10-04 17:37:12 -07008DOCKER_PROJECT ?= cordpod
9BOOTSTRAP_PROJECT ?= cordpodbs
Scott Baker50421662016-06-27 22:09:48 -070010
Zack Williams3670f442016-10-04 17:37:12 -070011# Include common functions
12include $(COMMON_DIR)/Makefile
Scott Baker50421662016-06-27 22:09:48 -070013
Zack Williams3670f442016-10-04 17:37:12 -070014xos: prereqs config_dirs xos_download cord_services bootstrap onboarding podconfig
Scott Baker50421662016-06-27 22:09:48 -070015
Zack Williams3670f442016-10-04 17:37:12 -070016onboarding: synchronizers.yaml id_rsa id_rsa.pub
Scott Bakerc5e2f3c2016-07-11 11:48:06 -070017 @echo "[ONBOARDING]"
Scott Baker50421662016-06-27 22:09:48 -070018 # on-board any services here
Zack Williams3670f442016-10-04 17:37:12 -070019 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
20 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
Scott Baker50421662016-06-27 22:09:48 -070021 sudo cp id_rsa key_import/vsg_rsa
22 sudo cp id_rsa.pub key_import/vsg_rsa.pub
23 sudo cp id_rsa key_import/volt_rsa
24 sudo cp id_rsa.pub key_import/volt_rsa.pub
25 sudo cp id_rsa key_import/onos_rsa
26 sudo cp id_rsa key_import/onos_rsa.pub
Scott Baker989959c2016-08-11 19:22:52 -070027 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/openstack/xos/openstack-onboard.yaml
Scott Baker50421662016-06-27 22:09:48 -070028 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vrouter/xos/vrouter-onboard.yaml
29 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/olt/xos/volt-onboard.yaml
30 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vsg/xos/vsg-onboard.yaml
31 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtn/xos/vtn-onboard.yaml
32 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/onos-service/xos/onos-onboard.yaml
Zack Williams3670f442016-10-04 17:37:12 -070033 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/fabric/xos/fabric-onboard.yaml
Scott Baker50421662016-06-27 22:09:48 -070034 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtr/xos/vtr-onboard.yaml
35 $(RUN_TOSCA_BOOTSTRAP) synchronizers.yaml
Zack Williams3670f442016-10-04 17:37:12 -070036 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
37 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vrouter
38 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/volt
39 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vsg
40 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtn
41 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/onos
42 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/fabric
43 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtr
44 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
45 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Scott Baker50421662016-06-27 22:09:48 -070046
47podconfig: nodes.yaml images.yaml
Scott Bakerc5e2f3c2016-07-11 11:48:06 -070048 @echo "[PODCONFIG]"
Zack Williams3670f442016-10-04 17:37:12 -070049 $(RUN_TOSCA) $(COMMON_DIR)/tosca/setup.yaml
Scott Baker50421662016-06-27 22:09:48 -070050 $(RUN_TOSCA) nodes.yaml
51 $(RUN_TOSCA) images.yaml
52
53vtn: vtn-external.yaml
54 $(RUN_TOSCA) vtn-external.yaml
55
Andy Bavier712e1342016-07-28 17:01:53 -040056delete_fabric_config:
Andy Bavierabdbf302016-07-28 20:25:53 -040057 http -a karaf:karaf DELETE http://onos-fabric:8181/onos/v1/network/configuration/
Andy Bavier712e1342016-07-28 17:01:53 -040058
59reactivate_fabric_apps:
Andy Bavierabdbf302016-07-28 20:25:53 -040060 http -a karaf:karaf POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.vrouter/active
61 http -a karaf:karaf POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.segmentrouting/active
Andy Bavier712e1342016-07-28 17:01:53 -040062
Scott Baker50421662016-06-27 22:09:48 -070063fabric: fabric.yaml
Andy Bavierac281492016-07-19 14:32:29 -040064 cp ../../xos_services/fabric/config/network-cfg-quickstart.json .
Scott Baker50421662016-06-27 22:09:48 -070065 $(RUN_TOSCA) fabric.yaml
66
67cord: vsg_custom_images
Zack Williams3670f442016-10-04 17:37:12 -070068 $(RUN_TOSCA) $(COMMON_DIR)/tosca/mgmt-net.yaml
Andy Bavieracfadd42016-06-30 16:46:32 -040069 $(RUN_TOSCA) cord-services.yaml
Zack Williams3670f442016-10-04 17:37:12 -070070 $(RUN_TOSCA) $(COMMON_DIR)/tosca/cord-volt-devices.yaml
71
72vsg_custom_images: images/vsg-1.1.img
73 bash -c "source ./admin-openrc.sh; glance image-show vsg-1.1 || glance image-create --name vsg-1.1 --disk-format qcow2 --file ./images/vsg-1.1.img --container-format bare"
Scott Baker50421662016-06-27 22:09:48 -070074
Andy Bavieracfadd42016-06-30 16:46:32 -040075cord-subscriber:
76 $(RUN_TOSCA) cord-test-subscriber.yaml
77
Zack Williams3670f442016-10-04 17:37:12 -070078update_nodes: nodes.yaml
Scott Baker50421662016-06-27 22:09:48 -070079 $(RUN_TOSCA) nodes.yaml
80
Zack Williams3670f442016-10-04 17:37:12 -070081new-nodes: clean_nodes update_nodes vtn
Scott Baker4b37d1a2016-07-01 13:41:52 -070082
Scott Baker50421662016-06-27 22:09:48 -070083exampleservice: onboard-exampleservice
84 $(RUN_TOSCA) pod-exampleservice.yaml
85
Zack Williams3670f442016-10-04 17:37:12 -070086onboard-exampleservice: $(SERVICE_DIR)/exampleservice
Scott Baker50421662016-06-27 22:09:48 -070087 sudo cp id_rsa key_import/exampleservice_rsa
88 sudo cp id_rsa.pub key_import/exampleservice_rsa.pub
Zack Williams3670f442016-10-04 17:37:12 -070089 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
Scott Bakerdf81f592016-07-14 12:01:21 -070090 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/exampleservice/xos/exampleservice-onboard.yaml
Scott Baker78ea35a2016-07-25 08:55:16 -070091 $(RUN_TOSCA_BOOTSTRAP) exampleservice-synchronizer.yaml
Zack Williams3670f442016-10-04 17:37:12 -070092 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
93 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/exampleservice
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)
Scott Baker50421662016-06-27 22:09:48 -070096
Srikanth Vavilapallicccb0a32016-07-08 04:19:04 +000097cord-monitoringservice: ceilometer_custom_images onboard-monitoringservice
Scott Bakerd1545d32016-06-29 11:27:33 -070098 $(RUN_TOSCA) monitoringservice.yaml
Srikanth Vavilapallicccb0a32016-07-08 04:19:04 +000099 $(RUN_TOSCA) monitoringtenant.yaml
Scott Baker50421662016-06-27 22:09:48 -0700100
Zack Williams3670f442016-10-04 17:37:12 -0700101onboard-monitoringservice: $(SERVICE_DIR)/monitoring
Scott Bakerd1545d32016-06-29 11:27:33 -0700102 sudo cp id_rsa key_import/monitoringservice_rsa
103 sudo cp id_rsa.pub key_import/monitoringservice_rsa.pub
104 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/monitoring/xos/monitoring-onboard.yaml
Srikanth Vavilapalli4cf2fed2016-07-01 21:27:20 +0000105 $(RUN_TOSCA_BOOTSTRAP) monitoring_synchronizer.yaml
Zack Williams3670f442016-10-04 17:37:12 -0700106 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/monitoring
107 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
108 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Scott Baker50421662016-06-27 22:09:48 -0700109
110vtn-external.yaml:
Zack Williams3670f442016-10-04 17:37:12 -0700111 export SETUPDIR=$(CONFIG_DIR); bash ./make-vtn-external-yaml.sh
Scott Baker50421662016-06-27 22:09:48 -0700112
113fabric.yaml:
Zack Williams3670f442016-10-04 17:37:12 -0700114 export SETUPDIR=$(CONFIG_DIR); bash ./make-fabric-yaml.sh
Scott Baker50421662016-06-27 22:09:48 -0700115
116virtualbng_json:
Zack Williams3670f442016-10-04 17:37:12 -0700117 export SETUPDIR=$(CONFIG_DIR); bash ./make-virtualbng-json.sh
Scott Baker50421662016-06-27 22:09:48 -0700118