blob: 45671302d4fe5c9d0f6448b3dbfe6e4959a68af2 [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
Scott Baker62d24282016-10-21 09:19:11 -070014xos: prereqs config_dirs xos_download cord_services cord_libraries 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 Bakerda3b1592016-10-24 10:45:36 -070027 $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml
Scott Baker989959c2016-08-11 19:22:52 -070028 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/openstack/xos/openstack-onboard.yaml
Scott Baker50421662016-06-27 22:09:48 -070029 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vrouter/xos/vrouter-onboard.yaml
30 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/olt/xos/volt-onboard.yaml
31 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vsg/xos/vsg-onboard.yaml
32 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtn/xos/vtn-onboard.yaml
33 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/onos-service/xos/onos-onboard.yaml
Zack Williams3670f442016-10-04 17:37:12 -070034 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/fabric/xos/fabric-onboard.yaml
Scott Baker50421662016-06-27 22:09:48 -070035 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtr/xos/vtr-onboard.yaml
36 $(RUN_TOSCA_BOOTSTRAP) synchronizers.yaml
Zack Williams3670f442016-10-04 17:37:12 -070037 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
Scott Bakerda3b1592016-10-24 10:45:36 -070038 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/ng-xos-lib
Zack Williams3670f442016-10-04 17:37:12 -070039 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vrouter
40 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/volt
41 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vsg
42 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtn
43 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/onos
44 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/fabric
45 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtr
46 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
47 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Scott Baker50421662016-06-27 22:09:48 -070048
49podconfig: nodes.yaml images.yaml
Scott Bakerc5e2f3c2016-07-11 11:48:06 -070050 @echo "[PODCONFIG]"
Zack Williams3670f442016-10-04 17:37:12 -070051 $(RUN_TOSCA) $(COMMON_DIR)/tosca/setup.yaml
Scott Baker50421662016-06-27 22:09:48 -070052 $(RUN_TOSCA) nodes.yaml
53 $(RUN_TOSCA) images.yaml
54
55vtn: vtn-external.yaml
56 $(RUN_TOSCA) vtn-external.yaml
57
Zack Williamsd7d58f12016-10-24 23:11:06 -070058vtn-external.yaml:
59 export SETUPDIR=$(CONFIG_DIR); bash ./make-vtn-external-yaml.sh
60
Andy Bavier712e1342016-07-28 17:01:53 -040061delete_fabric_config:
Andy Bavierabdbf302016-07-28 20:25:53 -040062 http -a karaf:karaf DELETE http://onos-fabric:8181/onos/v1/network/configuration/
Andy Bavier712e1342016-07-28 17:01:53 -040063
64reactivate_fabric_apps:
Andy Bavierabdbf302016-07-28 20:25:53 -040065 http -a karaf:karaf POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.vrouter/active
66 http -a karaf:karaf POST http://onos-fabric:8181/onos/v1/applications/org.onosproject.segmentrouting/active
Andy Bavier712e1342016-07-28 17:01:53 -040067
Scott Baker50421662016-06-27 22:09:48 -070068fabric: fabric.yaml
Zack Williamsd7d58f12016-10-24 23:11:06 -070069 cp $(SERVICE_DIR)/fabric/config/network-cfg-quickstart.json .
Scott Baker50421662016-06-27 22:09:48 -070070 $(RUN_TOSCA) fabric.yaml
71
Zack Williamsd7d58f12016-10-24 23:11:06 -070072fabric.yaml:
73 export SETUPDIR=$(CONFIG_DIR); bash ./make-fabric-yaml.sh
74
75cord: $(CONFIG_DIR)/images/vsg-1.1.img
Zack Williams3670f442016-10-04 17:37:12 -070076 $(RUN_TOSCA) $(COMMON_DIR)/tosca/mgmt-net.yaml
Andy Bavieracfadd42016-06-30 16:46:32 -040077 $(RUN_TOSCA) cord-services.yaml
Andy Bavier53b98b62016-11-03 16:22:24 -040078 $(RUN_TOSCA) $(COMMON_DIR)/tosca/public-net.yaml
Zack Williams3670f442016-10-04 17:37:12 -070079 $(RUN_TOSCA) $(COMMON_DIR)/tosca/cord-volt-devices.yaml
80
Andy Bavieracfadd42016-06-30 16:46:32 -040081cord-subscriber:
82 $(RUN_TOSCA) cord-test-subscriber.yaml
83
Zack Williams3670f442016-10-04 17:37:12 -070084update_nodes: nodes.yaml
Scott Baker50421662016-06-27 22:09:48 -070085 $(RUN_TOSCA) nodes.yaml
86
Zack Williams3670f442016-10-04 17:37:12 -070087new-nodes: clean_nodes update_nodes vtn
Scott Baker4b37d1a2016-07-01 13:41:52 -070088
Scott Baker50421662016-06-27 22:09:48 -070089exampleservice: onboard-exampleservice
90 $(RUN_TOSCA) pod-exampleservice.yaml
91
Zack Williams3670f442016-10-04 17:37:12 -070092onboard-exampleservice: $(SERVICE_DIR)/exampleservice
Scott Baker50421662016-06-27 22:09:48 -070093 sudo cp id_rsa key_import/exampleservice_rsa
94 sudo cp id_rsa.pub key_import/exampleservice_rsa.pub
Zack Williams3670f442016-10-04 17:37:12 -070095 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
Scott Bakerdf81f592016-07-14 12:01:21 -070096 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/exampleservice/xos/exampleservice-onboard.yaml
Scott Baker78ea35a2016-07-25 08:55:16 -070097 $(RUN_TOSCA_BOOTSTRAP) exampleservice-synchronizer.yaml
Zack Williams3670f442016-10-04 17:37:12 -070098 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
99 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/exampleservice
100 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
101 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Scott Baker50421662016-06-27 22:09:48 -0700102
Zack Williamsd7d58f12016-10-24 23:11:06 -0700103cord-monitoringservice: onboard-monitoringservice
Scott Bakerd1545d32016-06-29 11:27:33 -0700104 $(RUN_TOSCA) monitoringservice.yaml
Srikanth Vavilapallicccb0a32016-07-08 04:19:04 +0000105 $(RUN_TOSCA) monitoringtenant.yaml
Scott Baker50421662016-06-27 22:09:48 -0700106
Zack Williams3670f442016-10-04 17:37:12 -0700107onboard-monitoringservice: $(SERVICE_DIR)/monitoring
Scott Bakerd1545d32016-06-29 11:27:33 -0700108 sudo cp id_rsa key_import/monitoringservice_rsa
109 sudo cp id_rsa.pub key_import/monitoringservice_rsa.pub
110 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/monitoring/xos/monitoring-onboard.yaml
Srikanth Vavilapalli4cf2fed2016-07-01 21:27:20 +0000111 $(RUN_TOSCA_BOOTSTRAP) monitoring_synchronizer.yaml
Zack Williams3670f442016-10-04 17:37:12 -0700112 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/monitoring
113 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
114 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Scott Baker50421662016-06-27 22:09:48 -0700115
Scott Baker50421662016-06-27 22:09:48 -0700116virtualbng_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