Merge "new-host -> mavenrepo"
diff --git a/.gitignore b/.gitignore
index 4315746..875ce2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
.vagrant/
+key_import/
onboarding-docker-compose/
diff --git a/common/Makefile.cloudlab b/common/Makefile.cloudlab
index 7ab8a54..ee0bc48 100644
--- a/common/Makefile.cloudlab
+++ b/common/Makefile.cloudlab
@@ -10,6 +10,7 @@
prereqs:
make -f Makefile.prereqs
mkdir -p $(SETUPDIR)
+ sudo ./check_docker_version.sh
admin-openrc:
sudo cat /root/setup/admin-openrc.sh > $(SETUPDIR)/admin-openrc.sh
diff --git a/common/Makefile.prereqs b/common/Makefile.prereqs
index fce51be..381a1e7 100644
--- a/common/Makefile.prereqs
+++ b/common/Makefile.prereqs
@@ -39,3 +39,17 @@
/usr/local/bin/docker-compose:
sudo bash -c "curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
sudo chmod +x /usr/local/bin/docker-compose
+
+rebuild_docker:
+ stat docker_build || git clone https://github.com/dotcloud/docker.git docker_build
+ sudo make -C docker_build build
+ sudo make -C docker_build binary
+ sudo service docker stop
+ sudo mv /usr/bin/docker /usr/bin/docker-old
+ sudo cp docker_build/bundles/latest/binary-client/docker /usr/bin/
+ sudo cp docker_build/bundles/latest/binary-daemon/dockerd /usr/bin/
+ sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd /usr/bin/
+ sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd-shim /usr/bin/
+ sudo cp docker_build/bundles/latest/binary-daemon/docker-containerd-ctr /usr/bin/
+ sudo cp docker_build/bundles/latest/binary-daemon/docker-runc /usr/bin/
+ sudo service docker start
diff --git a/common/check_docker_version.sh b/common/check_docker_version.sh
new file mode 100755
index 0000000..654ff5f
--- /dev/null
+++ b/common/check_docker_version.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+DOCKER_VERSION=`docker version --format '{{.Server.Version}}'`
+
+verlte() {
+ [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
+}
+
+verlte $DOCKER_VERSION 1.10.0 && echo "Please upgrade to docker 1.10.2 or better" && exit -1
+
+exit 0
diff --git a/common/rebuild.sh b/common/rebuild.sh
new file mode 100755
index 0000000..dbca3c8
--- /dev/null
+++ b/common/rebuild.sh
@@ -0,0 +1,21 @@
+#! /bin/bash
+
+display_usage() {
+ echo -e "\nUsage:\n$0 [xos-listen-port] \n"
+}
+
+if [ $# -lt 1 ]
+then
+ display_usage
+ exit 1
+fi
+
+echo "Sending rebuild request to XOS"
+STATUS=`curl -X POST 0.0.0.0:$1/api/utility/onboarding/xos/rebuild/ 2> /dev/null`
+if [[ "$STATUS" != "true" ]]; then
+ echo "Rebuild request failed"
+ exit -1
+fi
+
+echo "Rebuild request accepted"
+
diff --git a/cord-pod/Makefile b/cord-pod/Makefile
index 97d27f7..fce354b 100644
--- a/cord-pod/Makefile
+++ b/cord-pod/Makefile
@@ -41,6 +41,9 @@
update_services:
make -f ../common/Makefile.services update
+update_xos:
+ make -f ../common/Makefile.services update_xos
+
onboarding:
echo "[ONBOARDING]"
# on-board any services here
@@ -99,6 +102,10 @@
new-nodes: clean-nodes update-nodes vtn
+rebuild:
+ bash ../common/rebuild.sh $(XOS_BOOTSTRAP_PORT)
+ bash ../common/wait_for_onboarding_ready.sh 81 xos
+
exampleservice: onboard-exampleservice
$(RUN_TOSCA) pod-exampleservice.yaml
@@ -117,6 +124,7 @@
sudo cp id_rsa key_import/monitoringservice_rsa
sudo cp id_rsa.pub key_import/monitoringservice_rsa.pub
$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/monitoring/xos/monitoring-onboard.yaml
+ $(RUN_TOSCA_BOOTSTRAP) monitoring_synchronizer.yaml
bash ../common/wait_for_onboarding_ready.sh 81 services/monitoring
bash ../common/wait_for_onboarding_ready.sh 81 xos
bash ../common/wait_for_xos_port.sh 80
@@ -146,9 +154,9 @@
test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) stop
sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) stop
-rm:
- test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) rm
- sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) rm
+rm: stop
+ test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) rm -f
+ sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) rm -f
showlogs:
sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) logs
@@ -178,5 +186,5 @@
.PHONY: local_containers
local_containers: prereqs download_xos
- make -f ../common/Makefile.containers update_certs xos_devel synchronizer onboarding_synchronizer
+ make -f ../common/Makefile.containers update_certs xos_base xos_devel synchronizer onboarding_synchronizer
diff --git a/cord-pod/files/monitoring_channel_synchronizer_config b/cord-pod/files/monitoring_synchronizer_config
similarity index 68%
rename from cord-pod/files/monitoring_channel_synchronizer_config
rename to cord-pod/files/monitoring_synchronizer_config
index fb3f22a..1ee96f0 100644
--- a/cord-pod/files/monitoring_channel_synchronizer_config
+++ b/cord-pod/files/monitoring_synchronizer_config
@@ -22,11 +22,11 @@
nova_enabled=True
[observer]
-name=monitoring_channel
-dependency_graph=/opt/xos/synchronizers/monitoring_channel/model-deps
-steps_dir=/opt/xos/synchronizers/monitoring_channel/steps
-sys_dir=/opt/xos/synchronizers/monitoring_channel/sys
-deleters_dir=/opt/xos/synchronizers/monitoring_channel/deleters
+name=monitoring_service
+dependency_graph=/opt/xos/synchronizers/monitoring/model-deps
+steps_dir=/opt/xos/synchronizers/monitoring/steps
+sys_dir=/opt/xos/synchronizers/monitoring/sys
+deleters_dir=/opt/xos/synchronizers/monitoring/deleters
log_file=console
driver=None
pretend=False
diff --git a/cord-pod/monitoring_synchronizer.yaml b/cord-pod/monitoring_synchronizer.yaml
new file mode 100644
index 0000000..5b248a9
--- /dev/null
+++ b/cord-pod/monitoring_synchronizer.yaml
@@ -0,0 +1,14 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: This recipe provides additional configuration for the onboarded services.
+
+imports:
+ - custom_types/xos.yaml
+
+topology_template:
+ node_templates:
+ servicecontroller#monitoring:
+ type: tosca.nodes.ServiceController
+ properties:
+ no-create: true
+ synchronizer_config: /root/setup/files/monitoring_synchronizer_config
diff --git a/devel/Makefile b/devel/Makefile
index 524e4cd..2bf5f50 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1,16 +1,56 @@
+include ../common/Makedefs
+
MYIP:=$(shell hostname -i)
+CONFIG_DIR:=$(shell pwd)
+DOCKER_COMPOSE_YML=./onboarding-docker-compose/docker-compose.yml
+BOOTSTRAP_YML=./docker-compose-bootstrap.yml
+DOCKER_PROJECT=devel
+BOOTSTRAP_PROJECT=develbs
+XOS_BOOTSTRAP_PORT=9998
+XOS_UI_PORT=9999
+ADMIN_USERNAME=padmin@vicci.org
+ADMIN_PASSWORD=letmein
+RUN_TOSCA_BOOTSTRAP=python ../common/run_tosca.py $(XOS_BOOTSTRAP_PORT) $(ADMIN_USERNAME) $(ADMIN_PASSWORD)
+RUN_TOSCA=python ../common/run_tosca.py $(XOS_UI_PORT) $(ADMIN_USERNAME) $(ADMIN_PASSWORD)
-cloudlab: common_cloudlab local_containers xos
+cloudlab: download_xos common_cloudlab local_containers xos
-devstack: upgrade_pkgs common_devstack local_containers xos
+devstack: download_xos upgrade_pkgs common_devstack local_containers xos
-xos:
- sudo MYIP=$(MYIP) docker-compose up -d
- bash ../common/wait_for_xos.sh
- sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/fixtures.yaml
- sudo docker-compose run xos python /opt/xos/tosca/run.py none /opt/xos/configurations/common/mydeployment.yaml
- sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/cloudlab-openstack.yaml
- sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
+xos: dirs download_services bootstrap onboarding develconfig
+
+dirs:
+ # if this directory doesn't exist, then docker-compose will create it with root permission
+ mkdir -p key_import
+ mkdir -p onboarding-docker-compose
+
+download_xos:
+ make -f ../common/Makefile.services xos_core
+
+download_services:
+ make -f ../common/Makefile.services
+
+update_services:
+ make -f ../common/Makefile.services update
+
+bootstrap:
+ echo "[BOOTSTRAP]"
+ sudo rm -f onboarding-docker-compose/docker-compose.yml
+ sudo CONFIG_DIR=$(CONFIG_DIR) MYIP=$(MYIP) docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) up -d
+ bash ../common/wait_for_xos_port.sh $(XOS_BOOTSTRAP_PORT)
+ sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py none - < ../common/fixtures.yaml
+ sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py none - < ../common/mydeployment.yaml
+ $(RUN_TOSCA_BOOTSTRAP) xos.yaml
+
+onboarding:
+ echo "[ONBOARDING]"
+ # on-board any services here
+ bash ../common/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
+ bash ../common/wait_for_xos_port.sh $(XOS_UI_PORT)
+
+develconfig:
+ $(RUN_TOSCA) ../common/cloudlab-openstack.yaml
+ $(RUN_TOSCA) ../setup/nodes.yaml
common_cloudlab:
make -C ../common -f Makefile.cloudlab
@@ -19,36 +59,24 @@
make -C ../common -f Makefile.devstack
base:
- make -C ../../../containers/xos base
+ make -f ../common/Makefile.containers xos_base
local_containers:
- echo "" > ../../../containers/xos/local_certs.crt
- for CRT in $$(ls /usr/local/share/ca-certificates/*) ; do \
- echo Adding Certificate: $$CRT ;\
- cat $$CRT >> ../../../containers/xos/local_certs.crt ;\
- echo "" >> ../../../containers/xos/local_certs.crt ;\
- done
- make -C ../../../containers/xos devel
- make -C ../../../containers/synchronizer
+ make -f ../common/Makefile.containers xos_devel synchronizer onboarding_synchronizer
stop:
- sudo MYIP=$(MYIP) docker-compose stop
+ test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) stop
+ sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) stop
showlogs:
- sudo MYIP=$(MYIP) docker-compose logs
+ sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) logs
rm: stop
- sudo MYIP=$(MYIP) docker-compose rm
+ test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) rm -f
+ sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) rm -f
ps:
sudo MYIP=$(MYIP) docker-compose ps
-enter-xos:
- sudo docker exec -it devel_xos_1 bash
-
-enter-synchronizer:
- sudo docker exec -it devel_xos_synchronizer_openstack_1 bash
-
upgrade_pkgs:
sudo pip install httpie --upgrade
-
diff --git a/devel/docker-compose-bootstrap.yml b/devel/docker-compose-bootstrap.yml
new file mode 100644
index 0000000..f0123da
--- /dev/null
+++ b/devel/docker-compose-bootstrap.yml
@@ -0,0 +1,56 @@
+xos_db:
+ image: xosproject/xos-postgres
+ expose:
+ - "5432"
+
+xos_bootstrap_ui:
+ image: xosproject/xos
+ command: python /opt/xos/manage.py runserver 0.0.0.0:9998 --insecure --makemigrations
+ environment:
+ - CONFIG_DIR
+ ports:
+ - "9998:9998"
+ links:
+ - xos_db
+ volumes:
+ - ../setup:/root/setup:ro
+ - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config
+ - ../../xos_services:/opt/xos_services
+
+xos_synchronizer_onboarding:
+ image: xosproject/xos-synchronizer-onboarding
+ command: bash -c "cd /opt/xos/synchronizers/onboarding; ./run.sh"
+# command: sleep 86400
+ labels:
+ org.xosproject.kind: synchronizer
+ org.xosproject.target: onboarding
+ links:
+ - xos_db
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ - ./key_import:/opt/xos/key_import:ro
+ - ./onboarding-docker-compose:/opt/xos/synchronizers/onboarding/docker-compose
+ - ../../xos_services:/opt/xos_services
+ log_driver: "json-file"
+ log_opt:
+ max-size: "100k"
+ max-file: "5"
+
+xos_synchronizer_openstack:
+ command: bash -c "sleep 120; python /opt/xos/synchronizers/openstack/xos-synchronizer.py"
+ image: xosproject/xos-synchronizer-openstack
+ labels:
+ org.xosproject.kind: synchronizer
+ org.xosproject.target: openstack
+ links:
+ - xos_db
+ extra_hosts:
+ - ctl:${MYIP}
+ volumes:
+ - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
+ - ../setup:/root/setup:ro
+ - ./images:/opt/xos/images:ro
+ log_driver: "json-file"
+ log_opt:
+ max-size: "100k"
+ max-file: "5"
diff --git a/devel/xos.yaml b/devel/xos.yaml
new file mode 100644
index 0000000..bffb9ce
--- /dev/null
+++ b/devel/xos.yaml
@@ -0,0 +1,37 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Onboard the exampleservice
+
+imports:
+ - custom_types/xos.yaml
+
+topology_template:
+ node_templates:
+ xos:
+ type: tosca.nodes.XOS
+ properties:
+ ui_port: 9999
+ bootstrap_ui_port: 9998
+ docker_project_name: devel
+ db_container_name: develbs_xos_db_1
+ frontend_only: true
+
+ /opt/xos/xos_configuration/xos_common_config:
+ type: tosca.nodes.XOSVolume
+ properties:
+ host_path: { path_join: [ SELF, CONFIG_DIR, ../common/xos_common_config, ENV_VAR ] }
+ read_only: false
+ requirements:
+ - xos:
+ node: xos
+ relationship: tosca.relationships.UsedByXOS
+
+ /root/setup:
+ type: tosca.nodes.XOSVolume
+ properties:
+ host_path: { path_join: [ SELF, CONFIG_DIR, ../setup, ENV_VAR ] }
+ read_only: false
+ requirements:
+ - xos:
+ node: xos
+ relationship: tosca.relationships.UsedByXOS
\ No newline at end of file
diff --git a/frontend/Makefile b/frontend/Makefile
index 20aa487..1409530 100644
--- a/frontend/Makefile
+++ b/frontend/Makefile
@@ -32,6 +32,9 @@
update_services:
make -f ../common/Makefile.services update
+update_xos:
+ make -f ../common/Makefile.services update_xos
+
bootstrap:
echo "[BOOTSTRAP]"
sudo rm -f onboarding-docker-compose/docker-compose.yml
@@ -54,6 +57,10 @@
containers: prereqs download_xos
make -f ../common/Makefile.containers xos_devel synchronizer onboarding_synchronizer
+rebuild:
+ bash ../common/rebuild.sh $(XOS_BOOTSTRAP_PORT)
+ bash ../common/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
+
stop:
test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) stop
sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) stop
@@ -65,8 +72,8 @@
sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) logs
rm: stop
- test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) rm
- sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) rm
+ test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) rm -f
+ sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) rm -f
ps:
sudo docker-compose ps
@@ -115,5 +122,5 @@
sudo bash -c "echo somekey > key_import/exampleservice_rsa"
sudo bash -c "echo somekey > key_import/exampleservice_rsa.pub"
$(RUN_TOSCA_BOOTSTRAP) $(SERVICE_DIR)/exampleservice/xos/exampleservice-onboard.yaml
- bash ../common/wait_for_onboarding_ready.sh 9998 services/exampleservice
- bash ../common/wait_for_onboarding_ready.sh 9998 xos
+ bash ../common/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) services/exampleservice
+ bash ../common/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
diff --git a/frontend/mocks/MCORDServiceN.yaml b/frontend/mocks/MCORDServiceN.yaml
deleted file mode 100644
index bef7bb3..0000000
--- a/frontend/mocks/MCORDServiceN.yaml
+++ /dev/null
@@ -1,89 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Setup MCORD-related services.
-
-imports:
- - custom_types/xos.yaml
-
-node_types:
- tosca.nodes.MCORDComponent:
- derived_from: tosca.nodes.Root
- description: >
- CORD: A Service Component of MCORD Service.
- properties:
- kind:
- type: string
- default: generic
- description: Kind of component
-
-topology_template:
- node_templates:
- service_mcord:
- type: tosca.nodes.Service
- requirements:
- properties:
- kind: mcordservice
-
-
- Private:
- type: tosca.nodes.NetworkTemplate
-
- mcord_network:
- type: tosca.nodes.network.Network.XOS
- properties:
- ip_version: 4
- labels: mcord_service_internal_net
- cidr: 172.16.16.0/24
- start_ip: 172.16.16.1
- end_ip: 172.16.16.5
- gateway_ip: 172.16.16.1
-
- requirements:
- - network_template:
- node: Private
- relationship: tosca.relationships.UsesNetworkTemplate
- - owner:
- node: mysite_mcord_slice1
- relationship: tosca.relationships.MemberOfSlice
- - connection:
- node: mysite_mcord_slice1
- relationship: tosca.relationships.ConnectsToSlice
-
- mysite:
- type: tosca.nodes.Site
-
-
- ubuntu-14.04-server-cloudimg-amd64-disk1:
- type: tosca.nodes.Image
-
- trusty-server-multi-nic:
- type: tosca.nodes.Image
-
- mysite_mcord_slice1:
- description: MCORD Service Slice 1
- type: tosca.nodes.Slice
- requirements:
- - mcord_service:
- node: service_mcord
- relationship: tosca.relationships.MemberOfService
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
- - default_image:
- node: ubuntu-14.04-server-cloudimg-amd64-disk1
-# node: mcord-server-image-s1
- relationship: tosca.relationships.DefaultImage
- properties:
- default_flavor: m1.medium
- default_node: compute9
-
- my_service_mcord_component1:
- description: MCORD Service default Component
- type: tosca.nodes.MCORDComponent
- requirements:
- - provider_service:
- node: service_mcord
- relationship: tosca.relationships.MemberOfService
- - mcord_slice:
- node: mysite_mcord_slice1
- relationship: tosca.relationships.MemberOfSlice
diff --git a/frontend/mocks/MCORDServiceN.yml b/frontend/mocks/MCORDServiceN.yml
deleted file mode 100644
index 8f764d0..0000000
--- a/frontend/mocks/MCORDServiceN.yml
+++ /dev/null
@@ -1,106 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Setup MCORD-related services.
-
-imports:
- - custom_types/xos.yaml
-
-node_types:
- tosca.nodes.MCORDComponent:
- derived_from: tosca.nodes.Root
- description: >
- CORD: A Service Component of MCORD Service.
- properties:
- kind:
- type: string
- default: generic
- description: Kind of component
-
-topology_template:
- node_templates:
- service_mcord:
- type: tosca.nodes.Service
- requirements:
- properties:
- kind: mcordservice
-
-
- Private:
- type: tosca.nodes.NetworkTemplate
-
- mcord_network:
- type: tosca.nodes.network.Network.XOS
- properties:
- ip_version: 4
- labels: mcord_service_internal_net
- cidr: 172.16.16.0/24
- start_ip: 172.16.16.1
- end_ip: 172.16.16.5
- gateway_ip: 172.16.16.1
-
- requirements:
- - network_template:
- node: Private
- relationship: tosca.relationships.UsesNetworkTemplate
- - owner:
- node: mysite_mcord_slice1
- relationship: tosca.relationships.MemberOfSlice
- - connection:
- node: mysite_mcord_slice1
- relationship: tosca.relationships.ConnectsToSlice
-
- mysite:
- type: tosca.nodes.Site
-
-
- mcord-server-image-s1:
- type: tosca.nodes.Image
-
- trusty-server-multi-nic:
- type: tosca.nodes.Image
-
- mysite_mcord_slice1:
- description: MCORD Service Slice 1
- type: tosca.nodes.Slice
- requirements:
- - mcord_service:
- node: service_mcord
- relationship: tosca.relationships.MemberOfService
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
- - default_image:
- node: trusty-server-multi-nic
-# node: mcord-server-image-s1
- relationship: tosca.relationships.DefaultImage
- properties:
- default_flavor: m1.medium
- default_node: ip-10-0-10-125
-
- my_service_mcord_component1:
- description: MCORD Service default Component
- type: tosca.nodes.MCORDComponent
- # properties:
- # view_url: /mcord/?service=vBBU
- # kind: RAN
- requirements:
- - provider_service:
- node: service_mcord
- relationship: tosca.relationships.MemberOfService
- - mcord_slice:
- node: mysite_mcord_slice1
- relationship: tosca.relationships.MemberOfSlice
-
- # Nodes
- compute9:
- type: tosca.nodes.Node
- properties:
- view_url: /mcord/?service=vBBU
- kind: RAN
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.MemberOfDeployment
diff --git a/frontend/mocks/cord.yaml b/frontend/mocks/cord.yaml
deleted file mode 100644
index 9d5aeaa..0000000
--- a/frontend/mocks/cord.yaml
+++ /dev/null
@@ -1,561 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Setup CORD-related services -- vOLT, vCPE, vBNG.
-
-imports:
- - custom_types/xos.yaml
-
-topology_template:
- node_templates:
-
- addresses_vsg:
- type: tosca.nodes.AddressPool
- properties:
- addresses: 10.168.0.0/24
- gateway_ip: 10.168.0.1
- gateway_mac: 02:42:0a:a8:00:01
-
- addresses_exampleservice-public:
- type: tosca.nodes.AddressPool
- properties:
- addresses: 10.168.1.0/24
- gateway_ip: 10.168.1.1
- gateway_mac: 02:42:0a:a8:00:01
-
- # CORD Services
- service_volt:
- type: tosca.nodes.Service
- requirements:
- - vcpe_tenant:
- node: service_vsg
- relationship: tosca.relationships.TenantOfService
- - lan_network:
- node: lan_network
- relationship: tosca.relationships.UsesNetwork
- - wan_network:
- node: wan_network
- relationship: tosca.relationships.UsesNetwork
- properties:
- view_url: /admin/cord/voltservice/$id$/
- kind: vOLT
-
- service_vrouter:
- type: tosca.nodes.VRouterService
- properties:
- view_url: /admin/vrouter/vrouterservice/$id$/
- requirements:
- - addresses_vsg:
- node: addresses_vsg
- relationship: tosca.relationships.ProvidesAddresses
- - addresses_service1:
- node: addresses_exampleservice-public
- relationship: tosca.relationships.ProvidesAddresses
-
- service_vsg:
- type: tosca.nodes.VSGService
- requirements:
- - vrouter_tenant:
- node: service_vrouter
- relationship: tosca.relationships.TenantOfService
- properties:
- 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
- #artifacts:
- #pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key
-
- service_vbng:
- type: tosca.nodes.VBNGService
- properties:
- view_url: /admin/cord/vbngservice/$id$/
-# if unspecified, vbng observer will look for an ONOSApp Tenant and
-# generate a URL from its IP address
-# vbng_url: http://10.11.10.24:8181/onos/virtualbng/
-
- service_ONOS_vBNG:
- type: tosca.nodes.ONOSService
- requirements:
- properties:
- kind: onos
- view_url: /admin/onos/onosservice/$id$/
- #public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
- #artifacts:
- #pubkey: /opt/xos/synchronizers/onos/onos_key.pub
-
-#
-# To actually bring up the vBNG app
-# - Set up the dataplane using the ansible script
-# - Log into the vBNG ONOS and run 'devices' to get switch dpID
-# - Change the dpID values in vBNG ONOS app in XOS GUI
-# - (Synchronizer should copy the files to ONOS container immediately)
-# - Log into service_ONOS_vBNG VM and restart ONOS Docker container
-# (Should roll this step into a Synchronizer)
-#f
- vBNG_ONOS_app:
- type: tosca.nodes.ONOSvBNGApp
- requirements:
- - onos_tenant:
- node: service_ONOS_vBNG
- relationship: tosca.relationships.TenantOfService
- - vbng_service:
- node: service_vbng
- relationship: tosca.relationships.UsedByService
- properties:
- dependencies: org.onosproject.proxyarp, org.onosproject.virtualbng, org.onosproject.openflow, org.onosproject.fwd
- config_network-cfg.json: >
- {
- "ports" : {
- "of:0000000000000001/1" : {
- "interfaces" : [
- {
- "ips" : [ "10.0.1.253/24" ],
- "mac" : "00:00:00:00:00:99"
- }
- ]
- },
- "of:0000000000000001/2" : {
- "interfaces" : [
- {
- "ips" : [ "10.254.0.2/24" ],
- "mac" : "00:00:00:00:00:98"
- }
- ]
- }
- }
- }
- #config_virtualbng.json: { get_artifact: [ SELF, virtualbng_json, LOCAL_FILE] }
- #artifacts:
- #virtualbng_json: /root/setup/virtualbng.json
-
- service_ONOS_vOLT:
- type: tosca.nodes.ONOSService
- requirements:
- properties:
- kind: onos
- view_url: /admin/onos/onosservice/$id$/
- #public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
- rest_onos/v1/network/configuration/: >
- {
- "devices" : {
- "of:0000000000000001" : {
- "accessDevice" : {
- "uplink" : "2",
- "vlan" : "222",
- "defaultVlan" : "1"
- },
- "basic" : {
- "driver" : "pmc-olt"
- }
- }
- }
- }
- #artifacts:
- #pubkey: /opt/xos/synchronizers/onos/onos_key.pub
-
-
- vOLT_ONOS_app:
- type: tosca.nodes.ONOSvOLTApp
- requirements:
- - onos_tenant:
- node: service_ONOS_vOLT
- relationship: tosca.relationships.TenantOfService
- - volt_service:
- node: service_volt
- relationship: tosca.relationships.UsedByService
- properties:
- install_dependencies: onos-ext-notifier-1.0-SNAPSHOT.oar, onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar
- dependencies: org.onosproject.openflow-base, org.onosproject.olt, org.ciena.onos.ext_notifier, org.ciena.onos.volt_event_publisher
- component_config: >
- {
- "org.ciena.onos.ext_notifier.KafkaNotificationBridge":{
- "rabbit.user": "<rabbit_user>",
- "rabbit.password": "<rabbit_password>",
- "rabbit.host": "<rabbit_host>",
- "publish.rabbit": "true",
- "volt.events.rabbit.topic": "notifications.info",
- "volt.events.rabbit.exchange": "voltlistener",
- "volt.events.opaque.info": "{project_id: <keystone_tenant_id>, user_id: <keystone_user_id>}",
- "publish.volt.events": "true"
- }
- }
-# config_network-cfg.json: >
-# {
-# "devices" : {
-# "of:0000000000000001" : {
-# "accessDevice" : {
-# "uplink" : "2",
-# "vlan" : "222",
-# "defaultVlan" : "1"
-# },
-# "basic" : {
-# "driver" : "default"
-# }
-# }
-# }
-# }
-
- # Network templates
- Private:
- type: tosca.nodes.NetworkTemplate
-
- Public network hack:
- type: tosca.nodes.NetworkTemplate
- properties:
- visibility: private
- translation: NAT
- shared_network_name: tun0-net
-
-
- # Networks required by the CORD setup
- lan_network:
- type: tosca.nodes.network.Network
- properties:
- ip_version: 4
- requirements:
- - network_template:
- node: Private
- relationship: tosca.relationships.UsesNetworkTemplate
- - owner:
- node: mysite_vcpe
- relationship: tosca.relationships.MemberOfSlice
- - connection:
- node: mysite_vcpe
- relationship: tosca.relationships.ConnectsToSlice
- - connection:
- node: mysite_volt
- relationship: tosca.relationships.ConnectsToSlice
-
- wan_network:
- type: tosca.nodes.network.Network
- properties:
- ip_version: 4
- requirements:
- - network_template:
- node: Private
- relationship: tosca.relationships.UsesNetworkTemplate
- - owner:
- node: mysite_vcpe
- relationship: tosca.relationships.MemberOfSlice
- - connection:
- node: mysite_vcpe
- relationship: tosca.relationships.ConnectsToSlice
- - connection:
- node: mysite_vbng
- relationship: tosca.relationships.ConnectsToSlice
-
- Private-Direct:
- type: tosca.nodes.NetworkTemplate
- properties:
- access: direct
-
- Private-Indirect:
- type: tosca.nodes.NetworkTemplate
- properties:
- access: indirect
-
- subscriber_network:
- type: tosca.nodes.network.Network
- properties:
- ip_version: 4
- requirements:
- - network_template:
- node: Private
- relationship: tosca.relationships.UsesNetworkTemplate
- - owner:
- node: mysite_volt
- relationship: tosca.relationships.MemberOfSlice
- - connection:
- node: mysite_volt
- relationship: tosca.relationships.ConnectsToSlice
- - connection:
- node: mysite_clients
- relationship: tosca.relationships.ConnectsToSlice
-
- public_network:
- type: tosca.nodes.network.Network
- properties:
- requirements:
- - network_template:
- node: Public network hack
- relationship: tosca.relationships.UsesNetworkTemplate
- - owner:
- node: mysite_vbng
- relationship: tosca.relationships.MemberOfSlice
- - connection:
- node: mysite_vbng
- relationship: tosca.relationships.ConnectsToSlice
-
-
- mysite:
- type: tosca.nodes.Site
-
-
- # CORD Slices
- mysite_vcpe:
- description: vCPE Controller Slice
- type: tosca.nodes.Slice
- requirements:
- - vcpe_service:
- node: service_vsg
- relationship: tosca.relationships.MemberOfService
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
- - vcpe_docker_image:
- node: docker-vcpe
- relationship: tosca.relationships.UsesImage
-# properties:
-# default_isolation: container
-
- mysite_onos_vbng:
- description: ONOS Controller Slice for vBNG
- type: tosca.nodes.Slice
- requirements:
- - ONOS:
- node: service_ONOS_vBNG
- relationship: tosca.relationships.MemberOfService
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
-
- mysite_onos_volt:
- description: ONOS Controller Slice for vOLT
- type: tosca.nodes.Slice
- requirements:
- - ONOS:
- node: service_ONOS_vOLT
- relationship: tosca.relationships.MemberOfService
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
-
- mysite_vbng:
- description: slice running OVS controlled by vBNG
- type: tosca.nodes.Slice
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
-
- mysite_volt:
- description: OVS controlled by vOLT
- type: tosca.nodes.Slice
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
-
- mysite_clients:
- description: slice for clients at the subscriber
- type: tosca.nodes.Slice
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
-
-
- # Virtual machines
- onos_app_1:
- type: tosca.nodes.Compute
- capabilities:
- # Host container properties
- host:
- properties:
- num_cpus: 1
- disk_size: 10 GB
- mem_size: 4 MB
- # Guest Operating System properties
- os:
- properties:
- # host Operating System image properties
- architecture: x86_64
- type: linux
- distribution: Ubuntu
- version: 14.10
- requirements:
- - slice:
- node: mysite_onos_vbng
- relationship: tosca.relationships.MemberOfSlice
-
- onos_app_2:
- type: tosca.nodes.Compute
- capabilities:
- # Host container properties
- host:
- properties:
- num_cpus: 1
- disk_size: 10 GB
- mem_size: 4 MB
- # Guest Operating System properties
- os:
- properties:
- # host Operating System image properties
- architecture: x86_64
- type: linux
- distribution: Ubuntu
- version: 14.10
- requirements:
- - slice:
- node: mysite_onos_volt
- relationship: tosca.relationships.MemberOfSlice
-
- # VM for running the OVS controlled by vBNG
- ovs_vbng:
- type: tosca.nodes.Compute
- capabilities:
- # Host container properties
- host:
- properties:
- num_cpus: 1
- disk_size: 10 GB
- mem_size: 4 MB
- # Guest Operating System properties
- os:
- properties:
- # host Operating System image properties
- architecture: x86_64
- type: linux
- distribution: ubuntu
- version: 14.04
- requirements:
- - slice:
- node: mysite_vbng
- relationship: tosca.relationships.MemberOfSlice
-
- # VM for running the OVS controlled by vOLT
- ovs_volt:
- type: tosca.nodes.Compute
- capabilities:
- # Host container properties
- host:
- properties:
- num_cpus: 1
- disk_size: 10 GB
- mem_size: 4 MB
- # Guest Operating System properties
- os:
- properties:
- # host Operating System image properties
- architecture: x86_64
- type: linux
- distribution: ubuntu
- version: 14.04
- requirements:
- - slice:
- node: mysite_volt
- relationship: tosca.relationships.MemberOfSlice
-
- # A subscriber client VM
- client1:
- type: tosca.nodes.Compute
- capabilities:
- # Host container properties
- host:
- properties:
- num_cpus: 1
- disk_size: 10 GB
- mem_size: 4 MB
- # Guest Operating System properties
- os:
- properties:
- # host Operating System image properties
- architecture: x86_64
- type: linux
- distribution: ubuntu
- version: 14.04
- requirements:
- - slice:
- node: mysite_clients
- relationship: tosca.relationships.MemberOfSlice
-
- # docker image for vcpe containers
- docker-vcpe:
- # TODO: need to attach this to mydeployment
- type: tosca.nodes.Image
- properties:
- kind: container
- container_format: na
- disk_format: na
- path: andybavier/docker-vcpe
- tag: develop
-
- # Let's add a user who can be administrator of the household
- johndoe@myhouse.com:
- type: tosca.nodes.User
- properties:
- password: letmein
- firstname: john
- lastname: doe
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
-
- # A subscriber
- My House:
- type: tosca.nodes.CORDSubscriber
- properties:
- service_specific_id: 123
- firewall_enable: false
- cdn_enable: false
- url_filter_enable: false
- url_filter_level: R
- requirements:
- - house_admin:
- node: johndoe@myhouse.com
- relationship: tosca.relationships.AdminPrivilege
-
- Mom's PC:
- type: tosca.nodes.CORDUser
- properties:
- mac: 01:02:03:04:05:06
- level: PG_13
- requirements:
- - household:
- node: My House
- relationship: tosca.relationships.SubscriberDevice
-
- Dad's PC:
- type: tosca.nodes.CORDUser
- properties:
- mac: 90:E2:BA:82:F9:75
- level: PG_13
- requirements:
- - household:
- node: My House
- relationship: tosca.relationships.SubscriberDevice
-
- Jack's Laptop:
- type: tosca.nodes.CORDUser
- properties:
- mac: 68:5B:35:9D:91:D5
- level: PG_13
- requirements:
- - household:
- node: My House
- relationship: tosca.relationships.SubscriberDevice
-
- Jill's Laptop:
- type: tosca.nodes.CORDUser
- properties:
- mac: 34:36:3B:C9:B6:A6
- level: PG_13
- requirements:
- - household:
- node: My House
- relationship: tosca.relationships.SubscriberDevice
-
- My Volt:
- type: tosca.nodes.VOLTTenant
- properties:
- service_specific_id: 123
- s_tag: 222
- c_tag: 432
- requirements:
- - provider_service:
- node: service_volt
- relationship: tosca.relationships.MemberOfService
- - subscriber:
- node: My House
- relationship: tosca.relationships.BelongsToSubscriber
diff --git a/frontend/xos.yaml b/frontend/xos.yaml
index dbd4e71..f2a77f7 100644
--- a/frontend/xos.yaml
+++ b/frontend/xos.yaml
@@ -36,6 +36,16 @@
node: xos
relationship: tosca.relationships.UsedByXOS
+ /opt/xos/core/static:
+ type: tosca.nodes.XOSVolume
+ properties:
+ host_path: { path_join: [ SELF, CONFIG_DIR, ../../xos/xos/core/static/, ENV_VAR ] }
+ read_only: false
+ requirements:
+ - xos:
+ node: xos
+ relationship: tosca.relationships.UsedByXOS
+
/opt/xos/core/xoslib/static:
type: tosca.nodes.XOSVolume
properties:
diff --git a/test-standalone/Makefile b/test-standalone/Makefile
index 05f6451..44a5363 100644
--- a/test-standalone/Makefile
+++ b/test-standalone/Makefile
@@ -55,6 +55,9 @@
update_services:
make -f ../common/Makefile.services update
+update_xos:
+ make -f ../common/Makefile.services update_xos
+
onboarding:
echo "[ONBOARDING]"
bash ../common/wait_for_onboarding_ready.sh 9998 xos
@@ -119,6 +122,10 @@
containers: prereqs download_xos devel-container
make -f ../common/Makefile.containers xos_test
+rebuild:
+ bash ../common/rebuild.sh $(XOS_BOOTSTRAP_PORT)
+ bash ../common/wait_for_onboarding_ready.sh $(XOS_BOOTSTRAP_PORT) xos
+
stop:
test ! -s $(DOCKER_COMPOSE_YML) || sudo docker-compose -p $(DOCKER_PROJECT) -f $(DOCKER_COMPOSE_YML) stop
sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) stop
diff --git a/test-standalone/xos.yaml b/test-standalone/xos.yaml
index 85bdd02..ee6be6b 100644
--- a/test-standalone/xos.yaml
+++ b/test-standalone/xos.yaml
@@ -26,3 +26,23 @@
- xos:
node: xos
relationship: tosca.relationships.UsedByXOS
+
+ /opt/xos/api/utility:
+ type: tosca.nodes.XOSVolume
+ properties:
+ host_path: { path_join: [ SELF, CONFIG_DIR, ../../xos/xos/api/utility, ENV_VAR ] }
+ read_only: false
+ requirements:
+ - xos:
+ node: xos
+ relationship: tosca.relationships.UsedByXOS
+
+ /opt/xos/tests:
+ type: tosca.nodes.XOSVolume
+ properties:
+ host_path: { path_join: [ SELF, CONFIG_DIR, ../../xos/xos/tests, ENV_VAR ] }
+ read_only: false
+ requirements:
+ - xos:
+ node: xos
+ relationship: tosca.relationships.UsedByXOS