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: deployment config, generated by platform-install |
| 7 | |
| 8 | topology_template: |
| 9 | node_templates: |
| 10 | |
| 11 | # Flavors |
| 12 | |
| 13 | {% for flavor in deployment_flavors %} |
| 14 | {{ flavor }}: |
| 15 | type: tosca.nodes.Flavor |
| 16 | |
| 17 | {% endfor %} |
| 18 | |
| 19 | # Deployment |
| 20 | {{ deployment_type }}: |
| 21 | type: tosca.nodes.Deployment |
| 22 | requirements: |
| 23 | {% for flavor in deployment_flavors %} |
| 24 | - {{ flavor }}: |
| 25 | node: {{ flavor }} |
| 26 | relationship: tosca.relationships.SupportsFlavor |
| 27 | |
| 28 | {% endfor %} |
| 29 | |
| 30 | # Site |
| 31 | {{ site_name }}: |
| 32 | type: tosca.nodes.Site |
| 33 | properties: |
| 34 | display_name: {{ site_humanname }} |
| 35 | site_url: http://{{ site_name }}.opencloud.us/ |
| 36 | hosts_nodes: true |
| 37 | requirements: |
| 38 | - deployment: |
| 39 | node: {{ deployment_type }} |
| 40 | relationship: tosca.relationships.MemberOfDeployment |
| 41 | |
| 42 | # Attach the Tenant view to the deployment |
| 43 | Tenant: |
| 44 | type: tosca.nodes.DashboardView |
| 45 | properties: |
| 46 | no-create: true |
| 47 | no-delete: true |
| 48 | requirements: |
| 49 | - deployment: |
| 50 | node: {{ deployment_type }} |
| 51 | relationship: tosca.relationships.SupportsDeployment |
| 52 | |
| 53 | # XOS Users |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 54 | # Default admin user account |
| 55 | {{ xos_admin_user }}: |
| 56 | type: tosca.nodes.User |
| 57 | properties: |
| 58 | password: {{ xos_admin_pass }} |
| 59 | firstname: {{ xos_admin_first }} |
| 60 | lastname: {{ xos_admin_last }} |
| 61 | is_admin: True |
| 62 | requirements: |
| 63 | - site: |
| 64 | node: {{ site_name }} |
| 65 | relationship: tosca.relationships.MemberOfSite |
| 66 | - tenant_dashboard: |
| 67 | node: Tenant |
| 68 | relationship: tosca.relationships.UsesDashboard |
| 69 | |
| 70 | # All other users |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 71 | {% for user in xos_users %} |
| 72 | {{ user.email }}: |
| 73 | type: tosca.nodes.User |
| 74 | properties: |
| 75 | password: {{ user.password }} |
| 76 | firstname: {{ user.first | default(user.email) }} |
| 77 | lastname: {{ user.last | default("unknown") }} |
| 78 | is_admin: {{ user.admin | default("false") }} |
| 79 | requirements: |
| 80 | - site: |
| 81 | node: {{ site_name }} |
| 82 | relationship: tosca.relationships.MemberOfSite |
| 83 | - tenant_dashboard: |
| 84 | node: Tenant |
| 85 | relationship: tosca.relationships.UsesDashboard |
| 86 | |
| 87 | {% endfor %} |
| 88 | |