blob: 933f968ef8cb9e593f0a32eef63adb72e859e573 [file] [log] [blame]
Zack Williams2da41af2018-01-10 17:48:23 -07001---
Andy Bavier3ade4a52017-12-20 10:40:16 -07002{#
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
Andy Bavier3ade4a52017-12-20 10:40:16 -070018tosca_definitions_version: tosca_simple_yaml_1_0
19
Zack Williams2da41af2018-01-10 17:48:23 -070020description: Just enough Tosca to get the vSG slice running on the CORD POD, created by rcord profile
Andy Bavier3ade4a52017-12-20 10:40:16 -070021
22imports:
23 - custom_types/addressmanagerservice.yaml
24 - custom_types/addresspool.yaml
25 - custom_types/image.yaml
26 - custom_types/network.yaml
27 - custom_types/networkslice.yaml
28 - custom_types/networktemplate.yaml
29 - custom_types/nodelabel.yaml
30 - custom_types/onosapp.yaml
31 - custom_types/onosservice.yaml
32 - custom_types/site.yaml
33 - custom_types/service.yaml
34 - custom_types/servicedependency.yaml
35 - custom_types/serviceinstanceattribute.yaml
36 - custom_types/serviceinstancelink.yaml
37 - custom_types/slice.yaml
38 - custom_types/voltservice.yaml
39 - custom_types/vrouterservice.yaml
40 - custom_types/vsgservice.yaml
41 - custom_types/vtrservice.yaml
42
43topology_template:
44 node_templates:
45
46 {{ site_name }}:
47 type: tosca.nodes.Site
48 properties:
49 name: {{ site_name }}
50 must-exist: true
51
52 image#vsg-1.1:
53 type: tosca.nodes.Image
54 properties:
55 name: vsg-1.1
56
57# management networks, fully created in management-net.yaml
58 management:
59 type: tosca.nodes.Network
60 properties:
61 name: management
62 must-exist: true
63
Zack Williams2da41af2018-01-10 17:48:23 -070064{% if use_vtn_net_management_host %}
65 management_host:
Andy Bavier3ade4a52017-12-20 10:40:16 -070066 type: tosca.nodes.Network
67 properties:
Zack Williams2da41af2018-01-10 17:48:23 -070068 name: management_host
Andy Bavier3ade4a52017-12-20 10:40:16 -070069 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
Zack Williams2da41af2018-01-10 17:48:23 -0700130
Andy Bavier3ade4a52017-12-20 10:40:16 -0700131 addresses_vsg:
132 type: tosca.nodes.AddressPool
133 properties:
134 name: addresses_vsg
Zack Williams2da41af2018-01-10 17:48:23 -0700135 addresses: {{ addresspool_vsg_cidr }}
136 gateway_ip: {{ addresspool_vsg_cidr | ipaddr('1') | ipaddr('address') }}
Zack Williamsec79bac2018-02-06 18:00:05 -0700137 gateway_mac: {{ fabric_gateway_hwaddr }}
Andy Bavier3ade4a52017-12-20 10:40:16 -0700138 requirements:
139 - service:
140 node: service#addressmanager
141 relationship: tosca.relationships.BelongsToOne
142
143 addresses_public:
144 type: tosca.nodes.AddressPool
145 properties:
146 name: addresses_public
Zack Williams2da41af2018-01-10 17:48:23 -0700147 addresses: {{ addresspool_public_cidr }}
148 gateway_ip: {{ addresspool_public_cidr | ipaddr('1') | ipaddr('address') }}
Zack Williamsec79bac2018-02-06 18:00:05 -0700149 gateway_mac: {{ fabric_gateway_hwaddr }}
Andy Bavier3ade4a52017-12-20 10:40:16 -0700150 requirements:
151 - service:
152 node: service#addressmanager
153 relationship: tosca.relationships.BelongsToOne
154
155 label_vsg:
156 type: tosca.nodes.NodeLabel
157 properties:
158 name: label_vsg
159
160 service#vsg:
161 type: tosca.nodes.VSGService
162 properties:
163 name: vsg
164 # backend_network_label: hpc_client # what is this? can we drop it?
165 public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/vsg_rsa.pub') }}
166 private_key_fn: /opt/xos/services/vsg/keys/vsg_rsa
167 # node_label: label_vsg
168
169 vsg_vrouter:
170 type: tosca.nodes.ServiceDependency
171 properties:
172 connect_method: None
173 requirements:
174 - subscriber_service:
175 node: service#vsg
176 relationship: tosca.relationships.BelongsToOne
177 - provider_service:
178 node: service#vrouter
179 relationship: tosca.relationships.BelongsToOne
180
181 vsg_addressmanager:
182 type: tosca.nodes.ServiceDependency
183 properties:
184 connect_method: None
185 requirements:
186 - subscriber_service:
187 node: service#vsg
188 relationship: tosca.relationships.BelongsToOne
189 - provider_service:
190 node: service#addressmanager
191 relationship: tosca.relationships.BelongsToOne
192
193 service#addressmanager:
194 type: tosca.nodes.AddressManagerService
195 properties:
196 name: addressmanager
197
198 service#vrouter:
199 type: tosca.nodes.VRouterService
200 properties:
201 name: vrouter
202 rest_hostname: onos-fabric.{{ site_suffix }}
203 rest_port: 8181
204 rest_user: onos
205 rest_pass: rocks
206
207 vRouter_ONOS_app:
208 type: tosca.nodes.ONOSApp
209 requirements:
210 - owner:
211 node: service#ONOS_Fabric
212 relationship: tosca.relationships.BelongsToOne
213 properties:
214 name: vRouter_ONOS_app
215 dependencies: org.onosproject.fpm
216
217 vRouter_ONOS_app_autogenerate:
218 type: tosca.nodes.ServiceInstanceAttribute
219 requirements:
220 - service_instance:
221 node: vRouter_ONOS_app
222 relationship: tosca.relationships.BelongsToOne
223 properties:
224 name: autogenerate
225 value: vrouter-network-cfg
226
227 vRouter_ONOS_app_ONOS_CORD:
228 type: tosca.nodes.ServiceInstanceLink
229 requirements:
230 - provider_service_instance:
231 node: vRouter_ONOS_app
232 relationship: tosca.relationships.BelongsToOne
233 - subscriber_service:
234 node: service#vrouter
235 relationship: tosca.relationships.BelongsToOne
236
Zack Williams2da41af2018-01-10 17:48:23 -0700237 vsg_template:
Andy Bavier3ade4a52017-12-20 10:40:16 -0700238 type: tosca.nodes.NetworkTemplate
239 properties:
Zack Williams2da41af2018-01-10 17:48:23 -0700240 name: vsg_template
Andy Bavier3ade4a52017-12-20 10:40:16 -0700241 visibility: private
242 translation: none
243 vtn_kind: VSG
244
245 # Networks required by the CORD setup
246 {{ site_name }}_vsg-access:
247 type: tosca.nodes.Network
248 properties:
249 name: {{ site_name }}_vsg-access
250 # ip_version: 4
251 requirements:
252 - template:
Zack Williams2da41af2018-01-10 17:48:23 -0700253 node: vsg_template
Andy Bavier3ade4a52017-12-20 10:40:16 -0700254 relationship: tosca.relationships.BelongsToOne
255 - owner:
256 node: {{ site_name }}_vsg
257 relationship: tosca.relationships.BelongsToOne
258
259 networkslice#{{ site_name }}_vsg-access_to_{{ site_name }}_vsg:
260 type: tosca.nodes.NetworkSlice
261 requirements:
262 - network:
263 node: {{ site_name }}_vsg-access
264 relationship: tosca.relationships.BelongsToOne
265 - slice:
266 node: {{ site_name }}_vsg
267 relationship: tosca.relationships.BelongsToOne
268
269 # CORD Slices
270 {{ site_name }}_vsg:
271 description: vSG Controller Slice
272 type: tosca.nodes.Slice
273 properties:
274 network: noauto
275 name: {{ site_name }}_vsg
Zack Williams2da41af2018-01-10 17:48:23 -0700276 requirements:
Andy Bavier3ade4a52017-12-20 10:40:16 -0700277 - service:
278 node: service#vsg
279 relationship: tosca.relationships.BelongsToOne
280 - site:
281 node: {{ site_name }}
282 relationship: tosca.relationships.BelongsToOne
283 - default_image:
284 node: image#vsg-1.1
285 relationship: tosca.relationships.BelongsToOne
286
287 networkslice#management_to_{{ site_name }}_vsg:
288 type: tosca.nodes.NetworkSlice
289 requirements:
290 - network:
291 node: management
292 relationship: tosca.relationships.BelongsToOne
293 - slice:
294 node: {{ site_name }}_vsg
295 relationship: tosca.relationships.BelongsToOne
296
Zack Williams2da41af2018-01-10 17:48:23 -0700297{% if use_vtn_net_management_host %}
298 networkslice#management_host_to_{{ site_name }}_vsg:
Andy Bavier3ade4a52017-12-20 10:40:16 -0700299 type: tosca.nodes.NetworkSlice
300 requirements:
301 - network:
Zack Williams2da41af2018-01-10 17:48:23 -0700302 node: management_host
Andy Bavier3ade4a52017-12-20 10:40:16 -0700303 relationship: tosca.relationships.BelongsToOne
304 - slice:
Zack Williams2da41af2018-01-10 17:48:23 -0700305 node: {{ site_name }}_vsg
306 relationship: tosca.relationships.BelongsToOne
Andy Bavier3ade4a52017-12-20 10:40:16 -0700307{% endif %}
Zack Williams2da41af2018-01-10 17:48:23 -0700308
Andy Bavier3ade4a52017-12-20 10:40:16 -0700309 # TODO: migrate interfaces when we'll start using them
310 # in#lanside:
311 # type: tosca.nodes.InterfaceType
312 # properties:
313 # direction: in
314
315 # out#lanside:
316 # type: tosca.nodes.InterfaceType
317 # properties:
318 # direction: out
319
320 # in#wanside:
321 # type: tosca.nodes.InterfaceType
322 # properties:
323 # direction: in
324
325 # out#wanside:
326 # type: tosca.nodes.InterfaceType
327 # properties:
328 # direction: out
329
330 # volt_lanside:
331 # type: tosca.nodes.ServiceInterface
332 # requirements:
333 # - service:
334 # node: service#volt
335 # relationship: tosca.relationships.MemberOfService
336 # - interface:
337 # node: out#lanside
338 # relationship: tosca.relationships.IsType
339
340 # vsg_lanside:
341 # type: tosca.nodes.ServiceInterface
342 # requirements:
343 # - service:
344 # node: service#vsg
345 # relationship: tosca.relationships.MemberOfService
346 # - interface:
347 # node: in#lanside
348 # relationship: tosca.relationships.IsType
349
350 # vsg_wanside:
351 # type: tosca.nodes.ServiceInterface
352 # requirements:
353 # - service:
354 # node: service#vsg
355 # relationship: tosca.relationships.MemberOfService
356 # - interface:
357 # node: out#wanside
358 # relationship: tosca.relationships.IsType
359
360 # addressmanager_wanside:
361 # type: tosca.nodes.ServiceInterface
362 # requirements:
363 # - service:
364 # node: service#addressmanager
365 # relationship: tosca.relationships.MemberOfService
366 # - interface:
367 # node: in#wanside
Zack Williams2da41af2018-01-10 17:48:23 -0700368 # relationship: tosca.relationships.IsType
369