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: |
| 22 | - custom_types/xos.yaml |
| 23 | |
| 24 | description: openstack extensions to deployment, generated by platform-install |
| 25 | |
| 26 | topology_template: |
| 27 | node_templates: |
| 28 | |
| 29 | # Images and flavors |
| 30 | {% for image in xos_images %} |
| 31 | {{ image.name }}: |
| 32 | type: tosca.nodes.Image |
| 33 | properties: |
| 34 | path: /opt/xos/images/{{ image.name }}.qcow2 |
| 35 | disk_format: QCOW2 |
| 36 | container_format: BARE |
| 37 | |
| 38 | {% endfor %} |
| 39 | |
| 40 | {% for flavor in deployment_flavors %} |
| 41 | {{ flavor }}: |
| 42 | type: tosca.nodes.Flavor |
| 43 | |
| 44 | {% endfor %} |
| 45 | |
| 46 | # Deployment - adds images/flavors to site defined in deployment.yaml |
| 47 | {{ deployment_type }}: |
| 48 | type: tosca.nodes.Deployment |
| 49 | requirements: |
| 50 | {% for flavor in deployment_flavors %} |
| 51 | - {{ flavor }}: |
| 52 | node: {{ flavor }} |
| 53 | relationship: tosca.relationships.SupportsFlavor |
| 54 | {% endfor %} |
| 55 | |
| 56 | # OpenStack Controller |
| 57 | {{ site_name }}_{{ deployment_type }}_openstack: |
| 58 | type: tosca.nodes.Controller |
| 59 | requirements: |
| 60 | - deployment: |
| 61 | node: {{ deployment_type }} |
| 62 | relationship: tosca.relationships.ControllerDeployment |
| 63 | properties: |
| 64 | backend_type: OpenStack |
| 65 | version: Kilo |
| 66 | auth_url: { get_script_env: [ SELF, adminrc, OS_AUTH_URL, LOCAL_FILE] } |
| 67 | admin_user: { get_script_env: [ SELF, adminrc, OS_USERNAME, LOCAL_FILE] } |
| 68 | admin_password: { get_script_env: [ SELF, adminrc, OS_PASSWORD, LOCAL_FILE] } |
| 69 | admin_tenant: { get_script_env: [ SELF, adminrc, OS_TENANT_NAME, LOCAL_FILE] } |
| 70 | domain: Default |
| 71 | artifacts: |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 72 | adminrc: /opt/cord_profile/admin-openrc.sh |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 73 | |
| 74 | # Site - adds openstack controller to site defined in deployment.yaml |
| 75 | {{ site_name }}: |
| 76 | type: tosca.nodes.Site |
| 77 | properties: |
| 78 | display_name: {{ site_humanname }} |
| 79 | site_url: http://{{ site_name }}.opencloud.us/ |
| 80 | hosts_nodes: true |
| 81 | requirements: |
| 82 | - deployment: |
| 83 | node: {{ deployment_type }} |
| 84 | relationship: tosca.relationships.MemberOfDeployment |
| 85 | - controller: |
| 86 | node: {{ site_name }}_{{ deployment_type }}_openstack |
| 87 | relationship: tosca.relationships.UsesController |
| 88 | |