update frontend configuration for onboarded CORD services
diff --git a/xos/configurations/cord-pod/cord-vtn-vsg.yaml b/xos/configurations/cord-pod/cord-vtn-vsg.yaml
index 8c73799..e7337a2 100644
--- a/xos/configurations/cord-pod/cord-vtn-vsg.yaml
+++ b/xos/configurations/cord-pod/cord-vtn-vsg.yaml
@@ -25,6 +25,10 @@
view_url: /admin/cord/voltservice/$id$/
kind: vOLT
replaces: service_volt
+ public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+ private_key_fn: /opt/xos/services/vsg/keys/volt_rsa
+ artifacts:
+ pubkey: /opt/xos/services/vsg/keys/volt_rsa.pub
addresses_vsg:
type: tosca.nodes.AddressPool
@@ -50,11 +54,11 @@
view_url: /admin/cord/vsgservice/$id$/
backend_network_label: hpc_client
public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
- private_key_fn: /opt/xos/synchronizers/vcpe/vcpe_private_key
+ private_key_fn: /opt/xos/services/vsg/keys/vsg_rsa
# node_label: label_vsg
replaces: service_vsg
artifacts:
- pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key
+ pubkey: /opt/xos/services/vsg/keys/vsg_rsa.pub
service#vrouter:
type: tosca.nodes.VRouterService
diff --git a/xos/configurations/frontend/Makefile b/xos/configurations/frontend/Makefile
index 46f39bf..9fe88a3 100644
--- a/xos/configurations/frontend/Makefile
+++ b/xos/configurations/frontend/Makefile
@@ -3,23 +3,33 @@
DOCKER_COMPOSE_YML=./onboarding-docker-compose/docker-compose.yml
BOOTSTRAP_YML=./docker-compose-bootstrap.yml
DOCKER_PROJECT=frontend
+XOS_BOOTSTRAP_PORT=9998
+XOS_UI_PORT=9999
-frontend: prereqs bootstrap
- bash ../common/wait_for_xos_port.sh 9999
- sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py none /opt/xos/configurations/common/fixtures.yaml
- sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py none /opt/xos/configurations/common/mydeployment.yaml
- sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/frontend/sample.yaml
+frontend: prereqs bootstrap onboarding frontendconfig
prereqs:
sudo make -f ../common/Makefile.prereqs
bootstrap:
+ echo "[BOOTSTRAP]"
sudo rm -f onboarding-docker-compose/docker-compose.yml
- sudo rm -f docker-compose.yml
sudo docker-compose -p $(DOCKER_PROJECT) -f docker-compose-bootstrap.yml up -d
- bash ../common/wait_for_xos_port.sh 9998
+ bash ../common/wait_for_xos_port.sh $(XOS_BOOTSTRAP_PORT)
sudo docker-compose -p $(DOCKER_PROJECT) -f $(BOOTSTRAP_YML) run -e CONFIG_DIR=$(CONFIG_DIR) xos_bootstrap_ui python /opt/xos/tosca/run.py none /opt/xos/configurations/frontend/xos.yaml
+onboarding:
+ echo "[ONBOARDING]"
+ # on-board any services here
+ bash ../common/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT)
+ bash ../common/wait_for_xos_port.sh $(XOS_UI_PORT)
+
+frontendconfig:
+ echo "[FRONTENDCONFIG]"
+ sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py none /opt/xos/configurations/common/fixtures.yaml
+ sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py none /opt/xos/configurations/common/mydeployment.yaml
+ sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_ui python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/frontend/sample.yaml
+
containers:
cd ../../../containers/xos; make devel
cd ../../../containers/synchronizer; make
@@ -50,7 +60,7 @@
sudo docker exec frontend_xos_1 rm -f /opt/xos/xos_configuration/xos_mcord_config
sudo docker exec frontend_xos_1 rm -f /opt/xos/xos_configuration/xos_cord_config
-mock-cord-pod:
+mock-cord-pod: onboard-cord-pod
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord-pod/mgmt-net.yaml
#sudo docker-compose run xos bash -c "echo somekey > /opt/xos/synchronizers/vcpe/vcpe_public_key; python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/cord-pod/cord-vtn-vsg.yaml"
@@ -58,7 +68,15 @@
sudo docker exec frontend_xos_1 cp /opt/xos/configurations/cord-pod/xos_cord_config /opt/xos/xos_configuration/
sudo docker exec frontend_xos_1 touch /opt/xos/xos/settings.py
-
+onboard-cord-pod:
+ sudo cp id_rsa key_import/vsg_rsa
+ sudo cp id_rsa.pub key_import/vsg_rsa.pub
+ sudo cp id_rsa key_import/volt_rsa
+ sudo cp id_rsa.pub key_import/volt_rsa.pub
+ sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/onboard/volt/volt-onboard.yaml
+ sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/onboard/volt/vsg-onboard.yaml
+ bash ../common/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
+ bash ../common/wait_for_xos_port.sh $(XOS_UI_PORT)
mock-mcord:
# check this