Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 1 | # frontend/Makefile |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 2 | |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 3 | CONFIG_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) |
| 4 | COMMON_DIR := $(abspath ../common ) |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 5 | |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 6 | .DEFAULT_GOAL := frontend |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 7 | |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 8 | DOCKER_PROJECT ?= frontend |
| 9 | BOOTSTRAP_PROJECT ?= frontendbs |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 10 | |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 11 | XOS_BOOTSTRAP_PORT ?= 9998 |
| 12 | XOS_UI_PORT ?= 9999 |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 13 | |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 14 | # Include common functions |
| 15 | include $(COMMON_DIR)/Makefile |
Scott Baker | bda441d | 2016-06-28 14:14:31 -0700 | [diff] [blame] | 16 | |
Scott Baker | 62d2428 | 2016-10-21 09:19:11 -0700 | [diff] [blame] | 17 | frontend: prereqs config_dirs xos_download cord_services cord_libraries bootstrap onboarding frontendconfig |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 18 | |
| 19 | onboarding: |
Scott Baker | c5e2f3c | 2016-07-11 11:48:06 -0700 | [diff] [blame] | 20 | @echo "[ONBOARDING]" |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 21 | # on-board any services here |
Matteo Scandolo | 4bb87be | 2016-10-27 11:10:00 +0200 | [diff] [blame] | 22 | $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml |
| 23 | $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml |
| 24 | $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml |
| 25 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/ng-xos-lib |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 26 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos |
| 27 | bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT) |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 28 | |
| 29 | onboard-cord-pod: |
| 30 | sudo bash -c "echo somekey > key_import/vsg_rsa" |
| 31 | sudo bash -c "echo somekey > key_import/vsg_rsa.pub" |
| 32 | sudo bash -c "echo somekey > key_import/volt_rsa" |
| 33 | sudo bash -c "echo somekey > key_import/volt_rsa.pub" |
Scott Baker | 21ecb20 | 2016-08-01 16:03:25 -0700 | [diff] [blame] | 34 | sudo bash -c "echo somekey > key_import/onos_rsa" |
| 35 | sudo bash -c "echo somekey > key_import/onos_rsa.pub" |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 36 | $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/disable-onboarding.yaml |
Scott Baker | da3b159 | 2016-10-24 10:45:36 -0700 | [diff] [blame] | 37 | $(RUN_TOSCA_BOOTSTRAP) $(LIBRARY_DIR)/ng-xos-lib/ng-xos-lib-onboard.yaml |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 38 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vrouter/xos/vrouter-onboard.yaml |
| 39 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/olt/xos/volt-onboard.yaml |
| 40 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vsg/xos/vsg-onboard.yaml |
Scott Baker | 21ecb20 | 2016-08-01 16:03:25 -0700 | [diff] [blame] | 41 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/onos-service/xos/onos-onboard.yaml |
| 42 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/fabric/xos/fabric-onboard.yaml |
| 43 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/vtr/xos/vtr-onboard.yaml |
Scott Baker | 418f247 | 2016-06-28 11:57:08 -0700 | [diff] [blame] | 44 | $(RUN_TOSCA_BOOTSTRAP) xos-cord-branding.yaml |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 45 | $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/tosca/enable-onboarding.yaml |
Scott Baker | da3b159 | 2016-10-24 10:45:36 -0700 | [diff] [blame] | 46 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/ng-xos-lib |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 47 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vrouter |
| 48 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/volt |
| 49 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vsg |
| 50 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/onos |
| 51 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/fabric |
| 52 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/vtr |
| 53 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos |
| 54 | bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT) |
| 55 | |
| 56 | frontendconfig: sample.yaml |
| 57 | @echo "[FRONTENDCONFIG]" |
| 58 | $(RUN_TOSCA) sample.yaml |
| 59 | |
| 60 | mock-cord-pod: onboard-cord-pod |
| 61 | $(RUN_TOSCA) $(COMMON_DIR)/tosca/mgmt-net.yaml |
| 62 | $(RUN_TOSCA) mocks/onos.yaml |
| 63 | $(RUN_TOSCA) ../cord-pod/cord-services.yaml |
Andy Bavier | 53b98b6 | 2016-11-03 16:22:24 -0400 | [diff] [blame^] | 64 | $(RUN_TOSCA) $(COMMON_DIR)/tosca/public-net.yaml |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 65 | $(RUN_TOSCA) ../cord-pod/cord-test-subscriber.yaml |
Andy Bavier | 53b98b6 | 2016-11-03 16:22:24 -0400 | [diff] [blame^] | 66 | $(RUN_TOSCA) $(COMMON_DIR)/tosca/cord-volt-devices.yaml |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 67 | |
| 68 | mock-mcord: |
| 69 | # check this |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 70 | $(RUN_TOSCA) $(COMMON_DIR)/tosca/mgmt-net.yaml |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 71 | $(RUN_TOSCA) mocks/mcord.yaml |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 72 | sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 cp /opt/xos/configurations/mcord/xos_mcord_config /opt/xos/xos_configuration/ |
| 73 | sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 touch /opt/xos/xos/settings.py |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 74 | |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 75 | exampleservice: $(SERVICE_DIR)/exampleservice |
Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 76 | mkdir -p key_import |
| 77 | # fake keys are fine |
| 78 | sudo bash -c "echo somekey > key_import/exampleservice_rsa" |
| 79 | sudo bash -c "echo somekey > key_import/exampleservice_rsa.pub" |
| 80 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/exampleservice/xos/exampleservice-onboard.yaml |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 81 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/exampleservice |
| 82 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos |
| 83 | bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT) |
Matteo Scandolo | 74321fe | 2016-07-19 14:41:54 -0700 | [diff] [blame] | 84 | |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 85 | hypercache: $(SERVICE_DIR)/hypercache |
Scott Baker | f12eed7 | 2016-08-08 11:12:51 -0700 | [diff] [blame] | 86 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/hypercache/xos/hpc-onboard.yaml |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 87 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/hpc |
| 88 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos |
| 89 | bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT) |
Scott Baker | f12eed7 | 2016-08-08 11:12:51 -0700 | [diff] [blame] | 90 | $(RUN_TOSCA) mocks/cdn.yaml |
| 91 | $(RUN_TOSCA) ../opencloud/cdn-content.yaml |
| 92 | |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 93 | dashboard: dashboard.yaml |
| 94 | $(RUN_TOSCA) $(CONFIG_DIR)/dashboard.yaml |
Matteo Scandolo | 74321fe | 2016-07-19 14:41:54 -0700 | [diff] [blame] | 95 | |
Matteo Scandolo | 6b1cfb9 | 2016-09-30 17:07:35 -0700 | [diff] [blame] | 96 | # before executing this clone the service from: https://github.com/teone/mcord-slicing-ui.git |
| 97 | onboard-mcord-slicing: slicing-ui |
| 98 | # fix ports (now they are set to use the FE config ones |
| 99 | @echo "[ONBOARDING UI SERVICES]" |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 100 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_UI_PORT) xos |
| 101 | $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/disable-onboarding.yaml |
Matteo Scandolo | 6b1cfb9 | 2016-09-30 17:07:35 -0700 | [diff] [blame] | 102 | $(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/mcord-ui-slicing/xos/mcord-slicing-onboard.yaml |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 103 | $(RUN_TOSCA_BOOTSTRAP) $(COMMON_DIR)/enable-onboarding.yaml |
| 104 | bash $(COMMON_DIR)/wait_for_onboarding_ready.sh $(XOS_UI_PORT) xos |
| 105 | bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_UI_PORT) |
Matteo Scandolo | 6b1cfb9 | 2016-09-30 17:07:35 -0700 | [diff] [blame] | 106 | |
| 107 | slicing-ui: |
| 108 | $(RUN_TOSCA) ./mocks/mcord-slicing-ui.yaml |
Zack Williams | 3670f44 | 2016-10-04 17:37:12 -0700 | [diff] [blame] | 109 | |
| 110 | clean-config-folder: |
| 111 | sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 rm -f /opt/xos/xos_configuration/xos_mcord_config |
| 112 | sudo docker exec $(DOCKER_PROJECT)_xos_ui_1 rm -f /opt/xos/xos_configuration/xos_cord_config |
| 113 | |