Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 1 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 2 | |
| 3 | imports: |
| 4 | - custom_types/xos.yaml |
| 5 | |
| 6 | description: openstack extensions to deployment, generated by platform-install |
| 7 | |
| 8 | topology_template: |
| 9 | node_templates: |
| 10 | |
| 11 | # Images and flavors |
| 12 | {% for image in xos_images %} |
| 13 | {{ image.name }}: |
| 14 | type: tosca.nodes.Image |
| 15 | properties: |
| 16 | path: /opt/xos/images/{{ image.name }}.qcow2 |
| 17 | disk_format: QCOW2 |
| 18 | container_format: BARE |
| 19 | |
| 20 | {% endfor %} |
| 21 | |
| 22 | {% for flavor in deployment_flavors %} |
| 23 | {{ flavor }}: |
| 24 | type: tosca.nodes.Flavor |
| 25 | |
| 26 | {% endfor %} |
| 27 | |
| 28 | # Deployment - adds images/flavors to site defined in deployment.yaml |
| 29 | {{ deployment_type }}: |
| 30 | type: tosca.nodes.Deployment |
| 31 | requirements: |
| 32 | {% for flavor in deployment_flavors %} |
| 33 | - {{ flavor }}: |
| 34 | node: {{ flavor }} |
| 35 | relationship: tosca.relationships.SupportsFlavor |
| 36 | {% endfor %} |
| 37 | |
| 38 | # OpenStack Controller |
| 39 | {{ site_name }}_{{ deployment_type }}_openstack: |
| 40 | type: tosca.nodes.Controller |
| 41 | requirements: |
| 42 | - deployment: |
| 43 | node: {{ deployment_type }} |
| 44 | relationship: tosca.relationships.ControllerDeployment |
| 45 | properties: |
| 46 | backend_type: OpenStack |
| 47 | version: Kilo |
| 48 | auth_url: { get_script_env: [ SELF, adminrc, OS_AUTH_URL, LOCAL_FILE] } |
| 49 | admin_user: { get_script_env: [ SELF, adminrc, OS_USERNAME, LOCAL_FILE] } |
| 50 | admin_password: { get_script_env: [ SELF, adminrc, OS_PASSWORD, LOCAL_FILE] } |
| 51 | admin_tenant: { get_script_env: [ SELF, adminrc, OS_TENANT_NAME, LOCAL_FILE] } |
| 52 | domain: Default |
| 53 | artifacts: |
| 54 | adminrc: /root/setup/admin-openrc.sh |
| 55 | |
| 56 | # Site - adds openstack controller to site defined in deployment.yaml |
| 57 | {{ site_name }}: |
| 58 | type: tosca.nodes.Site |
| 59 | properties: |
| 60 | display_name: {{ site_humanname }} |
| 61 | site_url: http://{{ site_name }}.opencloud.us/ |
| 62 | hosts_nodes: true |
| 63 | requirements: |
| 64 | - deployment: |
| 65 | node: {{ deployment_type }} |
| 66 | relationship: tosca.relationships.MemberOfDeployment |
| 67 | - controller: |
| 68 | node: {{ site_name }}_{{ deployment_type }}_openstack |
| 69 | relationship: tosca.relationships.UsesController |
| 70 | |