blob: 9cbb5ac60d2c7ae008fd4a1d1d790d7af78ceeb0 [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:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080022 - 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 Williams682450e2016-11-19 09:04:41 -070029
30description: openstack extensions to deployment, generated by platform-install
31
32topology_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 Scandolo1ed76b82017-12-05 13:58:22 -080040 name: {{ image.name }}
41 path: /opt/xos/images/{{ image.name }}.qcow2
42 disk_format: QCOW2
43 container_format: BARE
Zack Williams682450e2016-11-19 09:04:41 -070044
45{% endfor %}
46
47{% for flavor in deployment_flavors %}
48 {{ flavor }}:
49 type: tosca.nodes.Flavor
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080050 properties:
51 name: {{ flavor }}
Zack Williams682450e2016-11-19 09:04:41 -070052
53{% endfor %}
54
55# Deployment - adds images/flavors to site defined in deployment.yaml
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080056# NOTE do we still need this?
Zack Williams682450e2016-11-19 09:04:41 -070057 {{ deployment_type }}:
58 type: tosca.nodes.Deployment
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080059 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 Williams682450e2016-11-19 09:04:41 -070068
69# OpenStack Controller
70 {{ site_name }}_{{ deployment_type }}_openstack:
71 type: tosca.nodes.Controller
72 requirements:
73 - deployment:
74 node: {{ deployment_type }}
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080075 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -070076 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080077 name: {{ site_name }}_{{ deployment_type }}_openstack
Zack Williams682450e2016-11-19 09:04:41 -070078 backend_type: OpenStack
79 version: Kilo
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080080 auth_url: https://keystone.{{ site_suffix }}:5000/v2.0
81 admin_user: admin
82 admin_password: {{ keystone_admin_password }}
83 admin_tenant: admin
Zack Williams682450e2016-11-19 09:04:41 -070084 artifacts:
Zack Williamsa2763112017-01-03 11:38:38 -070085 adminrc: /opt/cord_profile/admin-openrc.sh
Zack Williams682450e2016-11-19 09:04:41 -070086
87# Site - adds openstack controller to site defined in deployment.yaml
88 {{ site_name }}:
89 type: tosca.nodes.Site
90 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080091 name: {{ site_name }}
92 must-exist: true
Zack Williams682450e2016-11-19 09:04:41 -070093 site_url: http://{{ site_name }}.opencloud.us/
94 hosts_nodes: true
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080095
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 Williams682450e2016-11-19 09:04:41 -0700118