unify bootstrap
remove image downloading
add admin_openrc.sh to docker-compose-bootstrap.yml for cord-pod
remove Tosca generated in platform-install
move more Tosca to platform-install
reinclude needed fabric config file
clarify relationship between making nodes and vtn config
whitespace
sleep as required to hack around management network not coming up
pauses moved to Makefile
dedicated, separate openstack configuration file
Change-Id: I78f4ce0121480fa6ef1509f5ff416b203b7d6013
diff --git a/common/Makefile b/common/Makefile
index 9f410d4..48f5ef3 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -36,15 +36,6 @@
mkdir -p $(CONFIG_DIR)/onboarding-docker-compose
mkdir -p $(CONFIG_DIR)/images
-nodes.yaml:
- export SETUPDIR=$(CONFIG_DIR); bash $(COMMON_DIR)/make-nodes-yaml.sh
-
-clean_nodes:
- rm -f $(CONFIG_DIR)/nodes.yaml
-
-images.yaml:
- export SETUPDIR=$(CONFIG_DIR); bash $(COMMON_DIR)/make-images-yaml.sh
-
# download/clone xos and service repos
GITOPTS ?= -c advice.detachedHead=false
@@ -154,12 +145,11 @@
sudo CONFIG_DIR=$(CONFIG_DIR) docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) up -d
bash $(COMMON_DIR)/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_DIR)/tosca/fixtures.yaml
- sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py none - < $(COMMON_DIR)/tosca/mydeployment.yaml
+ sudo docker-compose -p $(BOOTSTRAP_PROJECT) -f $(BOOTSTRAP_YML) run xos_bootstrap_ui python /opt/xos/tosca/run.py none - < $(CONFIG_DIR)/deployment.yaml
+ bash $(COMMON_DIR)/wait_for_xos_port.sh $(XOS_BOOTSTRAP_PORT)
$(RUN_TOSCA_BOOTSTRAP) $(CONFIG_DIR)/xos.yaml
-
# container creation targets
-
local_containers: prereqs xos_download update_certs xos_base_c xos_devel_c
test_containers: local_containers xos_test_c
@@ -174,7 +164,7 @@
xos_base_c:
@[ -z "$(HAS_BASE)" ] || echo "skipping base container build"
- @[ -n "$(HAS_BASE)" ] || ( cd $(XOS_DIR)/containers/xos; make base )
+ @[ -n "$(HAS_BASE)" ] || ( cd $(XOS_DIR)/containers/xos; make base )
# cd $(XOS_DIR)/containers/xos; make base
xos_devel_c:
@@ -184,24 +174,6 @@
cd $(XOS_DIR)/containers/xos; make test
-# image downloads
-
-$(CONFIG_DIR)images/trusty-server-multi-nic.img: config_dirs
- curl -fLsS http://www.vicci.org/opencloud/trusty-server-cloudimg-amd64-disk1.img -o $@
- echo "c2d0ffc937aeb96016164881052a496658efeb98959dc68e73d9895c5d9920f7 $@" | sha256sum -c -
-
-$(CONFIG_DIR)images/vsg-1.1.img: config_dirs
- curl -fLsS http://www.vicci.org/cord/vsg-1.1.img -o $@
- echo "16b0beb6778aed0f5feecb05f8d5750e6c262f98e6011e99ddadf7d46a177b6f $@" | sha256sum -c -
-
-$(CONFIG_DIR)images/ceilometer-trusty-server-multi-nic.img: | config_dirs
- curl -fLsS http://www.vicci.org/cord/ceilometer-trusty-server-multi-nic.compressed.qcow2 -o $@
- echo "afde3f0448483902693be4d52ae76bb683fd74b1c7728019094bf81b37d86105 $@" | sha256sum -c -
-
-$(CONFIG_DIR)images/ceilometer-service-trusty-server-multi-nic.img: | config_dirs
- curl -fLsS http://www.vicci.org/cord/ceilometer-service-trusty-server-multi-nic.compressed.qcow2 -o $@
- echo "9c346ff15727e9a98942835d6bd34b3d033f868234425f517e53d64b5a124a13 $@" | sha256sum -c -
-
# utilties/convenience targets
cleanup: stop rm $(CONFIG_DIR)/cleanup.sh
$(CONFIG_DIR)/cleanup.sh
diff --git a/common/make-images-yaml.sh b/common/make-images-yaml.sh
deleted file mode 100644
index 6321a9d..0000000
--- a/common/make-images-yaml.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-FN=$SETUPDIR/images.yaml
-
-rm -f $FN
-
-cat >> $FN <<EOF
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-imports:
- - custom_types/xos.yaml
-
-description: autogenerated nodes file
-
-topology_template:
- node_templates:
- mysite:
- type: tosca.nodes.Site
-
-EOF
-
-IMAGES=$( bash -c "source $SETUPDIR/admin-openrc.sh ; glance image-list" |grep -v ID|grep -v +|awk '{print $4}' )
-I=0
-for IMAGE in $IMAGES; do
- echo $IMAGE
- cat >> $FN <<EOF
- $IMAGE:
- type: tosca.nodes.Image
- properties:
- disk_format: QCOW2
- container_format: BARE
-
-EOF
-done
-
-cat >> $FN <<EOF
- MyDeployment:
- type: tosca.nodes.Deployment
- properties:
- flavors: m1.large, m1.medium, m1.small
- requirements:
-EOF
-
-for IMAGE in $IMAGES; do
- cat >> $FN <<EOF
- - image:
- node: $IMAGE
- relationship: tosca.relationships.SupportsImage
-EOF
-done
diff --git a/common/make-nodes-yaml.sh b/common/make-nodes-yaml.sh
deleted file mode 100644
index 65e16bb..0000000
--- a/common/make-nodes-yaml.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-FN=$SETUPDIR/nodes.yaml
-
-rm -f $FN
-
-cat >> $FN <<EOF
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-imports:
- - custom_types/xos.yaml
-
-description: autogenerated nodes file
-
-topology_template:
- node_templates:
- MyDeployment:
- type: tosca.nodes.Deployment
- mysite:
- type: tosca.nodes.Site
-EOF
-
-NODES=$( bash -c "source $SETUPDIR/admin-openrc.sh ; nova host-list" |grep compute|awk '{print $2}' )
-I=0
-for NODE in $NODES; do
- echo $NODE
- cat >> $FN <<EOF
- $NODE:
- type: tosca.nodes.Node
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.MemberOfDeployment
-EOF
-done
diff --git a/common/tosca/base.yaml b/common/tosca/base.yaml
deleted file mode 100644
index 847b1fb..0000000
--- a/common/tosca/base.yaml
+++ /dev/null
@@ -1,88 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-# Note:
-# assumes the following have been created and filled with appropriate data:
-# /root/setup/admin_openrc
-# /root/setup/flat_net_name
-# /root/setup/padmin_public_key
-
-description: >
- * Adds OpenCloud Sites, Deployments, and Controllers.
-
-imports:
- - custom_types/xos.yaml
-
-topology_template:
- node_templates:
- trusty-server-multi-nic:
- type: tosca.nodes.Image
- properties:
- disk_format: QCOW2
- container_format: BARE
-
- MyDeployment:
- type: tosca.nodes.Deployment
- properties:
- flavors: m1.large, m1.medium, m1.small
- requirements:
- - image:
- node: trusty-server-multi-nic
- relationship: tosca.relationships.SupportsImage
-
- CloudLab:
- type: tosca.nodes.Controller
- requirements:
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.ControllerDeployment
- properties:
- backend_type: OpenStack
- version: Kilo
- auth_url: { get_script_env: [ SELF, adminrc, OS_AUTH_URL, LOCAL_FILE] }
- admin_user: { get_script_env: [ SELF, adminrc, OS_USERNAME, LOCAL_FILE] }
- admin_password: { get_script_env: [ SELF, adminrc, OS_PASSWORD, LOCAL_FILE] }
- admin_tenant: { get_script_env: [ SELF, adminrc, OS_TENANT_NAME, LOCAL_FILE] }
- rabbit_user: { get_script_env: [ SELF, controller_settings, RABBIT_USER, LOCAL_FILE] }
- rabbit_password: { get_script_env: [ SELF, controller_settings, RABBIT_PASS, LOCAL_FILE] }
- rabbit_host: { get_script_env: [ SELF, controller_settings, CONTROLLER_FLAT_LAN_IP, LOCAL_FILE] }
- domain: Default
- artifacts:
- adminrc: /root/setup/admin-openrc.sh
- controller_settings: /root/setup/controller_settings
-
- mysite:
- type: tosca.nodes.Site
- properties:
- display_name: MySite
- site_url: http://opencloud.us/
- requirements:
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.MemberOfDeployment
- - controller:
- node: CloudLab
- relationship: tosca.relationships.UsesController
-
- Public shared IPv4:
- type: tosca.nodes.NetworkTemplate
- properties:
- visibility: private
- translation: NAT
- shared_network_name: { get_artifact: [ SELF, flat_net_name, LOCAL_FILE] }
- artifacts:
- flat_net_name: /root/setup/flat_net_name
-
- padmin@vicci.org:
- type: tosca.nodes.User
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
- properties:
- public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE ] }
- is_admin: true
- is_active: true
- firstname: XOS
- lastname: admin
- artifacts:
- pubkey: /root/setup/padmin_public_key
diff --git a/common/tosca/fixtures.yaml b/common/tosca/fixtures.yaml
index 9ac1a93..00da082 100644
--- a/common/tosca/fixtures.yaml
+++ b/common/tosca/fixtures.yaml
@@ -11,7 +11,6 @@
xos:
type: tosca.nodes.XOS
-
# -----------------------------------------------------------------------------
# Network Parameter Types
# -----------------------------------------------------------------------------
@@ -155,7 +154,3 @@
translation: none
shared_network_name: ext-net
-
-
-
-
diff --git a/common/tosca/mgmt-net.yaml b/common/tosca/mgmt-net.yaml
deleted file mode 100644
index b45f0d5..0000000
--- a/common/tosca/mgmt-net.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Set up management network for CORD POD
-imports:
- - custom_types/xos.yaml
-
-topology_template:
- node_templates:
-
- management_template:
- type: tosca.nodes.NetworkTemplate
- properties:
- visibility: private
- translation: none
- vtn_kind: MANAGEMENT_LOCAL
-
- management:
- type: tosca.nodes.network.Network
- properties:
- ip_version: 4
- cidr: 172.27.0.0/24
- requirements:
- - network_template:
- node: management_template
- relationship: tosca.relationships.UsesNetworkTemplate
- - owner:
- node: mysite_management
- relationship: tosca.relationships.MemberOfSlice
-
- management_hosts_template:
- type: tosca.nodes.NetworkTemplate
- properties:
- visibility: private
- translation: none
- vtn_kind: MANAGEMENT_HOST
-
-# management_hosts:
-# type: tosca.nodes.network.Network
-# properties:
-# ip_version: 4
-# cidr: 10.1.0.0/24
-# start_ip: 10.1.0.128
-# end_ip: 10.1.0.254
-# requirements:
-# - network_template:
-# node: management_hosts_template
-# relationship: tosca.relationships.UsesNetworkTemplate
-# - owner:
-# node: mysite_management
-# relationship: tosca.relationships.MemberOfSlice
-
- mysite:
- type: tosca.nodes.Site
-
- mysite_management:
- description: This slice exists solely to own the management network
- type: tosca.nodes.Slice
- properties:
- network: noauto
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
-
diff --git a/common/tosca/mydeployment.yaml b/common/tosca/mydeployment.yaml
deleted file mode 100644
index 2adfdff..0000000
--- a/common/tosca/mydeployment.yaml
+++ /dev/null
@@ -1,76 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Some basic fixtures
-
-imports:
- - custom_types/xos.yaml
-
-topology_template:
- node_templates:
-
- m1.small:
- type: tosca.nodes.Flavor
-
- m1.medium:
- type: tosca.nodes.Flavor
-
- m1.large:
- type: tosca.nodes.Flavor
-
- m1.xlarge:
- type: tosca.nodes.Flavor
-
- MyDeployment:
- type: tosca.nodes.Deployment
- requirements:
- - m1.small:
- node: m1.small
- relationship: tosca.relationships.SupportsFlavor
- - m1.medium:
- node: m1.medium
- relationship: tosca.relationships.SupportsFlavor
- - m1.large:
- node: m1.large
- relationship: tosca.relationships.SupportsFlavor
- - m1.xlarge:
- node: m1.xlarge
- relationship: tosca.relationships.SupportsFlavor
-
- mysite:
- type: tosca.nodes.Site
- properties:
- display_name: MySite
- requirements:
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.MemberOfDeployment
-
- # Attach the Tenant view to the MyDeployment deployment
- Tenant:
- type: tosca.nodes.DashboardView
- properties:
- no-create: true
- no-delete: true
- requirements:
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.SupportsDeployment
-
- padmin@vicci.org:
- type: tosca.nodes.User
- properties:
- password: letmein
-# encrypted_password: pbkdf2_sha256$12000$Qufx9iqtaYma$xs0YurPOcj9qYQna/Qrb3K+im9Yr2XEVr0J4Kqek7AE=
- firstname: XOS
- lastname: admin
- is_admin: true
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
- - tenant_dashboard:
- node: Tenant
- relationship: tosca.relationships.UsesDashboard
-
-
-
diff --git a/common/tosca/public-net.yaml b/common/tosca/public-net.yaml
deleted file mode 100644
index c241fc0..0000000
--- a/common/tosca/public-net.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: Set up public network for CORD POD
-imports:
- - custom_types/xos.yaml
-
-topology_template:
- node_templates:
-
- service#vrouter:
- type: tosca.nodes.VRouterService
-
- public_template:
- type: tosca.nodes.NetworkTemplate
- properties:
- visibility: private
- translation: none
- vtn_kind: PUBLIC
-
- public:
- type: tosca.nodes.network.Network
- properties:
- ip_version: 4
- requirements:
- - network_template:
- node: public_template
- relationship: tosca.relationships.UsesNetworkTemplate
- - owner:
- node: mysite_public
- relationship: tosca.relationships.MemberOfSlice
- - vrouter_tenant:
- node: service#vrouter
- relationship: tosca.relationships.TenantOfService
-
- mysite:
- type: tosca.nodes.Site
-
- mysite_public:
- description: This slice exists solely to own the public network
- type: tosca.nodes.Slice
- properties:
- network: noauto
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
diff --git a/common/tosca/setup.yaml b/common/tosca/setup.yaml
deleted file mode 100644
index 20b1b12..0000000
--- a/common/tosca/setup.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0
-
-description: >
- * Adds OpenCloud Sites, Deployments, and Controllers.
-
-imports:
- - custom_types/xos.yaml
-
-topology_template:
- node_templates:
-
- MyDeployment:
- type: tosca.nodes.Deployment
- properties:
- flavors: m1.large, m1.medium, m1.small
-
- MyOpenStack:
- type: tosca.nodes.Controller
- requirements:
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.ControllerDeployment
- properties:
- backend_type: OpenStack
- version: Kilo
- auth_url: { get_script_env: [ SELF, adminrc, OS_AUTH_URL, LOCAL_FILE] }
- admin_user: { get_script_env: [ SELF, adminrc, OS_USERNAME, LOCAL_FILE] }
- admin_password: { get_script_env: [ SELF, adminrc, OS_PASSWORD, LOCAL_FILE] }
- admin_tenant: { get_script_env: [ SELF, adminrc, OS_TENANT_NAME, LOCAL_FILE] }
- domain: Default
- artifacts:
- adminrc: /root/setup/admin-openrc.sh
-
- mysite:
- type: tosca.nodes.Site
- properties:
- display_name: MySite
- site_url: http://xosproject.org/
- requirements:
- - deployment:
- node: MyDeployment
- relationship: tosca.relationships.MemberOfDeployment
- - controller:
- node: MyOpenStack
- relationship: tosca.relationships.UsesController
-
- # This user already exists in XOS with this password
- # It's an example of how to create new users
- padmin@vicci.org:
- type: tosca.nodes.User
- requirements:
- - site:
- node: mysite
- relationship: tosca.relationships.MemberOfSite
- properties:
- is_admin: true
- is_active: true
- firstname: XOS
- lastname: admin
- password: letmein