blob: fd089e6b3cf99a86ec60c94b036606b353b27088 [file] [log] [blame]
# opencloud/Makefile
CONFIG_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
COMMON_DIR := $(abspath ../common )
.DEFAULT_GOAL := xos
DOCKER_PROJECT ?= oc
BOOTSTRAP_PROJECT ?= ocb
# Include common functions
include $(COMMON_DIR)/Makefile
xos: prereqs config_dirs xos_download opencloud_services bootstrap onboarding podconfig
opencloud_services: $(SERVICE_DIR) \
$(SERVICE_DIR)/onos-service \
$(SERVICE_DIR)/openstack \
$(SERVICE_DIR)/vrouter \
$(SERVICE_DIR)/vtn
onboarding: synchronizers.yaml id_rsa id_rsa.pub
@echo "[ONBOARDING]"
bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
sudo cp id_rsa key_import/onos_rsa
sudo cp id_rsa.pub key_import/onos_rsa.pub
$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/openstack/xos/openstack-onboard.yaml
$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vrouter/xos/vrouter-onboard.yaml
$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtn/xos/vtn-onboard.yaml
$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/onos-service/xos/onos-onboard.yaml
$(RUN_TOSCA_BOOTSTRAP) synchronizers.yaml
$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vrouter
bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtn
bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/onos
bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
podconfig: nodes.yaml images.yaml
@echo "[PODCONFIG]"
$(RUN_TOSCA) $(COMMON_DIR)/tosca/setup.yaml
$(RUN_TOSCA) nodes.yaml
$(RUN_TOSCA) images.yaml
opencloud: opencloud.yaml
@echo "[OPENCLOUD]"
$(RUN_TOSCA) opencloud.yaml
vtn: vtn.yaml
@echo "[VTN]"
$(RUN_TOSCA) vtn.yaml
exampleservice: $(SERVICE_DIR)/exampleservice opencloud-exampleservice.yaml
@echo "[EXAMPLESERVICE]"
sudo cp id_rsa key_import/exampleservice_rsa
sudo cp id_rsa.pub key_import/exampleservice_rsa.pub
$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml
$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/exampleservice/xos/exampleservice-onboard.yaml
$(RUN_TOSCA_BOOTSTRAP) exampleservice-synchronizer.yaml
$(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml
bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/exampleservice
bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT)
$(RUN_TOSCA) opencloud-exampleservice.yaml