blob: 0fb51710baddad3e844214a5056830509992908b [file] [log] [blame]
Andy Bavier3ade4a52017-12-20 10:40:16 -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
19tosca_definitions_version: tosca_simple_yaml_1_0
20
21description: Just enough Tosca to get the vSG slice running on the CORD POD, created by platform-install
22
23imports:
24 - custom_types/addressmanagerservice.yaml
25 - custom_types/addresspool.yaml
26 - custom_types/image.yaml
27 - custom_types/network.yaml
28 - custom_types/networkslice.yaml
29 - custom_types/networktemplate.yaml
30 - custom_types/nodelabel.yaml
31 - custom_types/onosapp.yaml
32 - custom_types/onosservice.yaml
33 - custom_types/site.yaml
34 - custom_types/service.yaml
35 - custom_types/servicedependency.yaml
36 - custom_types/serviceinstanceattribute.yaml
37 - custom_types/serviceinstancelink.yaml
38 - custom_types/slice.yaml
39 - custom_types/voltservice.yaml
40 - custom_types/vrouterservice.yaml
41 - custom_types/vsgservice.yaml
42 - custom_types/vtrservice.yaml
43
44topology_template:
45 node_templates:
46
47 {{ site_name }}:
48 type: tosca.nodes.Site
49 properties:
50 name: {{ site_name }}
51 must-exist: true
52
53 image#vsg-1.1:
54 type: tosca.nodes.Image
55 properties:
56 name: vsg-1.1
57
58# management networks, fully created in management-net.yaml
59 management:
60 type: tosca.nodes.Network
61 properties:
62 name: management
63 must-exist: true
64
65{% if use_management_hosts %}
66 management_hosts:
67 type: tosca.nodes.Network
68 properties:
69 must-exist: true
70{% endif %}
71
72 service#rcord:
73 type: tosca.nodes.Service
74 properties:
75 name: rcord
76
77 rcord_volt:
78 type: tosca.nodes.ServiceDependency
79 properties:
80 connect_method: None
81 requirements:
82 - subscriber_service:
83 node: service#rcord
84 relationship: tosca.relationships.BelongsToOne
85 - provider_service:
86 node: service#volt
87 relationship: tosca.relationships.BelongsToOne
88
89# ONOS_CORD, fully created in vtn.yaml
90 service#ONOS_CORD:
91 type: tosca.nodes.ONOSService
92 properties:
93 name: ONOS_CORD
94 must-exist: true
95
96# ONOS_Fabric, fully created in fabric.yaml
97 service#ONOS_Fabric:
98 type: tosca.nodes.ONOSService
99 properties:
100 name: ONOS_Fabric
101 must-exist: true
102
103# CORD Services
104 service#vtr:
105 type: tosca.nodes.VTRService
106 properties:
107 name: vtr
108 kind: rcord
109
110 service#volt:
111 type: tosca.nodes.VOLTService
112 properties:
113 name: volt
114 kind: rcord
115 public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/volt_rsa.pub') }}
116 private_key_fn: /opt/xos/services/volt/keys/volt_rsa
117
118 volt_vsg:
119 type: tosca.nodes.ServiceDependency
120 properties:
121 connect_method: None
122 requirements:
123 - subscriber_service:
124 node: service#volt
125 relationship: tosca.relationships.BelongsToOne
126 - provider_service:
127 node: service#vsg
128 relationship: tosca.relationships.BelongsToOne
129
130 addresses_vsg:
131 type: tosca.nodes.AddressPool
132 properties:
133 name: addresses_vsg
134 addresses: 10.7.1.0/24
135 gateway_ip: 10.7.1.1
136 gateway_mac: a4:23:05:06:01:01
137 requirements:
138 - service:
139 node: service#addressmanager
140 relationship: tosca.relationships.BelongsToOne
141
142 addresses_public:
143 type: tosca.nodes.AddressPool
144 properties:
145 name: addresses_public
146 addresses: 10.8.1.0/24
147 gateway_ip: 10.8.1.1
148 gateway_mac: a4:23:05:06:01:01
149 requirements:
150 - service:
151 node: service#addressmanager
152 relationship: tosca.relationships.BelongsToOne
153
154 label_vsg:
155 type: tosca.nodes.NodeLabel
156 properties:
157 name: label_vsg
158
159 service#vsg:
160 type: tosca.nodes.VSGService
161 properties:
162 name: vsg
163 # backend_network_label: hpc_client # what is this? can we drop it?
164 public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/vsg_rsa.pub') }}
165 private_key_fn: /opt/xos/services/vsg/keys/vsg_rsa
166 # node_label: label_vsg
167
168 vsg_vrouter:
169 type: tosca.nodes.ServiceDependency
170 properties:
171 connect_method: None
172 requirements:
173 - subscriber_service:
174 node: service#vsg
175 relationship: tosca.relationships.BelongsToOne
176 - provider_service:
177 node: service#vrouter
178 relationship: tosca.relationships.BelongsToOne
179
180 vsg_addressmanager:
181 type: tosca.nodes.ServiceDependency
182 properties:
183 connect_method: None
184 requirements:
185 - subscriber_service:
186 node: service#vsg
187 relationship: tosca.relationships.BelongsToOne
188 - provider_service:
189 node: service#addressmanager
190 relationship: tosca.relationships.BelongsToOne
191
192 service#addressmanager:
193 type: tosca.nodes.AddressManagerService
194 properties:
195 name: addressmanager
196
197 service#vrouter:
198 type: tosca.nodes.VRouterService
199 properties:
200 name: vrouter
201 rest_hostname: onos-fabric.{{ site_suffix }}
202 rest_port: 8181
203 rest_user: onos
204 rest_pass: rocks
205
206 vRouter_ONOS_app:
207 type: tosca.nodes.ONOSApp
208 requirements:
209 - owner:
210 node: service#ONOS_Fabric
211 relationship: tosca.relationships.BelongsToOne
212 properties:
213 name: vRouter_ONOS_app
214 dependencies: org.onosproject.fpm
215
216 vRouter_ONOS_app_autogenerate:
217 type: tosca.nodes.ServiceInstanceAttribute
218 requirements:
219 - service_instance:
220 node: vRouter_ONOS_app
221 relationship: tosca.relationships.BelongsToOne
222 properties:
223 name: autogenerate
224 value: vrouter-network-cfg
225
226 vRouter_ONOS_app_ONOS_CORD:
227 type: tosca.nodes.ServiceInstanceLink
228 requirements:
229 - provider_service_instance:
230 node: vRouter_ONOS_app
231 relationship: tosca.relationships.BelongsToOne
232 - subscriber_service:
233 node: service#vrouter
234 relationship: tosca.relationships.BelongsToOne
235
236 template#vsg:
237 type: tosca.nodes.NetworkTemplate
238 properties:
239 name: vsg
240 visibility: private
241 translation: none
242 vtn_kind: VSG
243
244 # Networks required by the CORD setup
245 {{ site_name }}_vsg-access:
246 type: tosca.nodes.Network
247 properties:
248 name: {{ site_name }}_vsg-access
249 # ip_version: 4
250 requirements:
251 - template:
252 node: template#vsg
253 relationship: tosca.relationships.BelongsToOne
254 - owner:
255 node: {{ site_name }}_vsg
256 relationship: tosca.relationships.BelongsToOne
257
258 networkslice#{{ site_name }}_vsg-access_to_{{ site_name }}_vsg:
259 type: tosca.nodes.NetworkSlice
260 requirements:
261 - network:
262 node: {{ site_name }}_vsg-access
263 relationship: tosca.relationships.BelongsToOne
264 - slice:
265 node: {{ site_name }}_vsg
266 relationship: tosca.relationships.BelongsToOne
267
268 # CORD Slices
269 {{ site_name }}_vsg:
270 description: vSG Controller Slice
271 type: tosca.nodes.Slice
272 properties:
273 network: noauto
274 name: {{ site_name }}_vsg
275 requirements:
276 - service:
277 node: service#vsg
278 relationship: tosca.relationships.BelongsToOne
279 - site:
280 node: {{ site_name }}
281 relationship: tosca.relationships.BelongsToOne
282 - default_image:
283 node: image#vsg-1.1
284 relationship: tosca.relationships.BelongsToOne
285
286 networkslice#management_to_{{ site_name }}_vsg:
287 type: tosca.nodes.NetworkSlice
288 requirements:
289 - network:
290 node: management
291 relationship: tosca.relationships.BelongsToOne
292 - slice:
293 node: {{ site_name }}_vsg
294 relationship: tosca.relationships.BelongsToOne
295
296{% if use_management_hosts %}
297 networkslice#management_hosts_to_{{ site_name }}_vsg:
298 type: tosca.nodes.NetworkSlice
299 requirements:
300 - network:
301 node: management_hosts
302 relationship: tosca.relationships.BelongsToOne
303 - slice:
304 node: {{ site_name }}_vsg
305 relationship: tosca.relationships.BelongsToOne
306{% endif %}
307
308 # TODO: migrate interfaces when we'll start using them
309 # in#lanside:
310 # type: tosca.nodes.InterfaceType
311 # properties:
312 # direction: in
313
314 # out#lanside:
315 # type: tosca.nodes.InterfaceType
316 # properties:
317 # direction: out
318
319 # in#wanside:
320 # type: tosca.nodes.InterfaceType
321 # properties:
322 # direction: in
323
324 # out#wanside:
325 # type: tosca.nodes.InterfaceType
326 # properties:
327 # direction: out
328
329 # volt_lanside:
330 # type: tosca.nodes.ServiceInterface
331 # requirements:
332 # - service:
333 # node: service#volt
334 # relationship: tosca.relationships.MemberOfService
335 # - interface:
336 # node: out#lanside
337 # relationship: tosca.relationships.IsType
338
339 # vsg_lanside:
340 # type: tosca.nodes.ServiceInterface
341 # requirements:
342 # - service:
343 # node: service#vsg
344 # relationship: tosca.relationships.MemberOfService
345 # - interface:
346 # node: in#lanside
347 # relationship: tosca.relationships.IsType
348
349 # vsg_wanside:
350 # type: tosca.nodes.ServiceInterface
351 # requirements:
352 # - service:
353 # node: service#vsg
354 # relationship: tosca.relationships.MemberOfService
355 # - interface:
356 # node: out#wanside
357 # relationship: tosca.relationships.IsType
358
359 # addressmanager_wanside:
360 # type: tosca.nodes.ServiceInterface
361 # requirements:
362 # - service:
363 # node: service#addressmanager
364 # relationship: tosca.relationships.MemberOfService
365 # - interface:
366 # node: in#wanside
367 # relationship: tosca.relationships.IsType