blob: 709bb22c9782f61806db036147f3b43d72f21d78 [file] [log] [blame]
Scott Baker818c7bd2018-06-13 16:28:01 -07001---
2# Copyright 2017-present Open Networking Foundation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16tosca_definitions_version: tosca_simple_yaml_1_0
17
18description: >
19 Creates a TrustDomain, Principal, Slice, Image, and then brings up an openstack
20 VM attached to the management network. The VM is pinned to a specific compute
21 node. Make sure to edit the compute_node section below and set the name of
22 the node to the hostname of your compute node.
23
24imports:
25 - custom_types/trustdomain.yaml
26 - custom_types/principal.yaml
27 - custom_types/image.yaml
28 - custom_types/flavor.yaml
29 - custom_types/network.yaml
30 - custom_types/networkslice.yaml
31 - custom_types/node.yaml
32 - custom_types/site.yaml
33 - custom_types/slice.yaml
34 - custom_types/openstackservice.yaml
35 - custom_types/openstackserviceinstance.yaml
36
37topology_template:
38 node_templates:
39 service#openstack:
40 type: tosca.nodes.OpenStackService
41 properties:
42 name: OpenStack
43 must-exist: true
44
45 mysite:
46 type: tosca.nodes.Site
47 properties:
48 name: mysite
49 must-exist: true
50
51 management_network:
52 type: tosca.nodes.Network
53 properties:
54 name: management
55 must-exist: true
56
57 compute_node:
58 type: tosca.nodes.Node
59 properties:
60 name: <insert node hostname here>
61 must-exist: true
62
63 m1.small:
64 type: tosca.nodes.Flavor
65 properties:
66 name: m1.small
67 must-exist: true
68
69 demo_trustdomain:
70 type: tosca.nodes.TrustDomain
71 properties:
72 name: "demo-trust"
73 requirements:
74 - owner:
75 node: service#openstack
76 relationship: tosca.relationships.BelongsToOne
77
78 demo_principal:
79 type: tosca.nodes.Principal
80 properties:
81 name: "demo-account"
82 requirements:
83 - trust_domain:
84 node: demo_trustdomain
85 relationship: tosca.relationships.BelongsToOne
86
87 image_cirros:
88 type: tosca.nodes.Image
89 properties:
90 name: "cirros-0.3.5"
91 container_format: "BARE"
92 disk_format: "QCOW2"
93 path: "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img"
94
95 demo_slice:
96 type: tosca.nodes.Slice
97 properties:
98 name: "demo-slice"
99 requirements:
100 - site:
101 node: mysite
102 relationship: tosca.relationships.BelongsToOne
103 - trust_domain:
104 node: demo_trustdomain
105 relationship: tosca.relationships.BelongsToOne
106 - principal:
107 node: demo_principal
108 relationship: tosca.relationships.BelongsToOne
109
110 demo_slice_management_network:
111 type: tosca.nodes.NetworkSlice
112 requirements:
113 - network:
114 node: management_network
115 relationship: tosca.relationships.BelongsToOne
116 - slice:
117 node: demo_slice
118 relationship: tosca.relationships.BelongsToOne
119
120 demo_instance:
121 type: tosca.nodes.OpenStackServiceInstance
122 properties:
123 name: "demo-instance-pinned"
124 requirements:
125 - slice:
126 node: demo_slice
127 relationship: tosca.relationships.BelongsToOne
128 - owner:
129 node: service#openstack
130 relationship: tosca.relationships.BelongsToOne
131 - image:
132 node: image_cirros
133 relationship: tosca.relationships.BelongsToOne
134 - node:
135 node: compute_node
136 relationship: tosca.relationships.BelongsToOne
137 - flavor:
138 node: m1.small
139 relationship: tosca.relationships.BelongsToOne