blob: 5f2f23336b2b95d4db1f856c4914551410edce64 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2{#
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16#}
17
18
Zack Williams682450e2016-11-19 09:04:41 -070019tosca_definitions_version: tosca_simple_yaml_1_0
20
21imports:
22 - custom_types/xos.yaml
23
24description: openstack extensions to deployment, generated by platform-install
25
26topology_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 Williamsa2763112017-01-03 11:38:38 -070072 adminrc: /opt/cord_profile/admin-openrc.sh
Zack Williams682450e2016-11-19 09:04:41 -070073
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