Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 2 | {# |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | #} |
| 17 | |
| 18 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 19 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 20 | |
| 21 | imports: |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 22 | - custom_types/controller.yaml |
| 23 | - custom_types/controllersite.yaml |
| 24 | - custom_types/deployment.yaml |
| 25 | - custom_types/flavor.yaml |
| 26 | - custom_types/image.yaml |
| 27 | - custom_types/site.yaml |
| 28 | - custom_types/sitedeployment.yaml |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 29 | |
| 30 | description: openstack extensions to deployment, generated by platform-install |
| 31 | |
| 32 | topology_template: |
| 33 | node_templates: |
| 34 | |
| 35 | # Images and flavors |
| 36 | {% for image in xos_images %} |
| 37 | {{ image.name }}: |
| 38 | type: tosca.nodes.Image |
| 39 | properties: |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 40 | name: {{ image.name }} |
| 41 | path: /opt/xos/images/{{ image.name }}.qcow2 |
| 42 | disk_format: QCOW2 |
| 43 | container_format: BARE |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 44 | |
| 45 | {% endfor %} |
| 46 | |
| 47 | {% for flavor in deployment_flavors %} |
| 48 | {{ flavor }}: |
| 49 | type: tosca.nodes.Flavor |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 50 | properties: |
| 51 | name: {{ flavor }} |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 52 | |
| 53 | {% endfor %} |
| 54 | |
| 55 | # Deployment - adds images/flavors to site defined in deployment.yaml |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 56 | # NOTE do we still need this? |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 57 | {{ deployment_type }}: |
| 58 | type: tosca.nodes.Deployment |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 59 | properties: |
| 60 | name: {{ deployment_type }} |
| 61 | # NOTE look that this are outdated and not used anymore |
| 62 | # requirements: |
| 63 | # {% for flavor in deployment_flavors %} |
| 64 | # - {{ flavor }}: |
| 65 | # node: {{ flavor }} |
| 66 | # relationship: tosca.relationships.SupportsFlavor |
| 67 | # {% endfor %} |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 68 | |
| 69 | # OpenStack Controller |
| 70 | {{ site_name }}_{{ deployment_type }}_openstack: |
| 71 | type: tosca.nodes.Controller |
| 72 | requirements: |
| 73 | - deployment: |
| 74 | node: {{ deployment_type }} |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 75 | relationship: tosca.relationships.BelongsToOne |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 76 | properties: |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 77 | name: {{ site_name }}_{{ deployment_type }}_openstack |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 78 | backend_type: OpenStack |
| 79 | version: Kilo |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 80 | auth_url: https://keystone.{{ site_suffix }}:5000/v2.0 |
| 81 | admin_user: admin |
| 82 | admin_password: {{ keystone_admin_password }} |
| 83 | admin_tenant: admin |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 84 | artifacts: |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 85 | adminrc: /opt/cord_profile/admin-openrc.sh |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 86 | |
| 87 | # Site - adds openstack controller to site defined in deployment.yaml |
| 88 | {{ site_name }}: |
| 89 | type: tosca.nodes.Site |
| 90 | properties: |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 91 | name: {{ site_name }} |
| 92 | must-exist: true |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 93 | site_url: http://{{ site_name }}.opencloud.us/ |
| 94 | hosts_nodes: true |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 95 | |
| 96 | {{site_name}}_deployment_{{ deployment_type }}: |
| 97 | type: tosca.nodes.SiteDeployment |
| 98 | requirements: |
| 99 | - site: |
| 100 | node: {{ site_name }} |
| 101 | relationship: tosca.relationships.BelongsToOne |
| 102 | - deployment: |
| 103 | node: {{ deployment_type }} |
| 104 | relationship: tosca.relationships.BelongsToOne |
| 105 | - controller: |
| 106 | node: {{ site_name }}_{{ deployment_type }}_openstack |
| 107 | relationship: tosca.relationships.BelongsToOne |
| 108 | |
| 109 | {{ site_name }}_openstack_controller: |
| 110 | type: tosca.nodes.ControllerSite |
| 111 | requirements: |
| 112 | - site: |
| 113 | node: {{ site_name }} |
| 114 | relationship: tosca.relationships.BelongsToOne |
| 115 | - controller: |
| 116 | node: {{ site_name }}_{{ deployment_type }}_openstack |
| 117 | relationship: tosca.relationships.BelongsToOne |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 118 | |