blob: fd089e6b3cf99a86ec60c94b036606b353b27088 [file] [log] [blame]
Zack Williams3670f442016-10-04 17:37:12 -07001# opencloud/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 ?= oc
9BOOTSTRAP_PROJECT ?= ocb
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 opencloud_services bootstrap onboarding podconfig
Scott Baker50421662016-06-27 22:09:48 -070015
Zack Williams3670f442016-10-04 17:37:12 -070016opencloud_services: $(SERVICE_DIR) \
17 $(SERVICE_DIR)/onos-service \
18 $(SERVICE_DIR)/openstack \
19 $(SERVICE_DIR)/vrouter \
20 $(SERVICE_DIR)/vtn
Scott Baker50421662016-06-27 22:09:48 -070021
Zack Williams3670f442016-10-04 17:37:12 -070022onboarding: synchronizers.yaml id_rsa id_rsa.pub
23 @echo "[ONBOARDING]"
24 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
25 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
26 sudo cp id_rsa key_import/onos_rsa
27 sudo cp id_rsa.pub key_import/onos_rsa.pub
28 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/openstack/xos/openstack-onboard.yaml
29 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vrouter/xos/vrouter-onboard.yaml
30 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtn/xos/vtn-onboard.yaml
31 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/onos-service/xos/onos-onboard.yaml
32 $(RUN_TOSCA_BOOTSTRAP) synchronizers.yaml
33 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
34 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vrouter
35 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtn
36 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/onos
37 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
38 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
Scott Baker50421662016-06-27 22:09:48 -070039
Zack Williams3670f442016-10-04 17:37:12 -070040podconfig: nodes.yaml images.yaml
41 @echo "[PODCONFIG]"
42 $(RUN_TOSCA) $(COMMON_DIR)/tosca/setup.yaml
43 $(RUN_TOSCA) nodes.yaml
44 $(RUN_TOSCA) images.yaml
Scott Baker50421662016-06-27 22:09:48 -070045
Zack Williams2c1f8592016-11-01 21:51:26 -070046opencloud: opencloud.yaml
47 @echo "[OPENCLOUD]"
48 $(RUN_TOSCA) opencloud.yaml
49
50vtn: vtn.yaml
51 @echo "[VTN]"
52 $(RUN_TOSCA) vtn.yaml
53
54exampleservice: $(SERVICE_DIR)/exampleservice opencloud-exampleservice.yaml
55 @echo "[EXAMPLESERVICE]"
56 sudo cp id_rsa key_import/exampleservice_rsa
57 sudo cp id_rsa.pub key_import/exampleservice_rsa.pub
58 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
59 $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/exampleservice/xos/exampleservice-onboard.yaml
60 $(RUN_TOSCA_BOOTSTRAP) exampleservice-synchronizer.yaml
61 $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
62 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/exampleservice
63 bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
64 bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
65 $(RUN_TOSCA) opencloud-exampleservice.yaml
66