blob: 0424950aa7d62343e94575452aeec788989bedb5 [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