blob: 0fb51710baddad3e844214a5056830509992908b [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
21description: Just enough Tosca to get the vSG slice running on the CORD POD, created by platform-install
22
23imports:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080024 - 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
Zack Williams682450e2016-11-19 09:04:41 -070043
44topology_template:
45 node_templates:
46
Zack Williams682450e2016-11-19 09:04:41 -070047 {{ site_name }}:
48 type: tosca.nodes.Site
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080049 properties:
50 name: {{ site_name }}
51 must-exist: true
Zack Williams682450e2016-11-19 09:04:41 -070052
53 image#vsg-1.1:
54 type: tosca.nodes.Image
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080055 properties:
56 name: vsg-1.1
Zack Williams682450e2016-11-19 09:04:41 -070057
58# management networks, fully created in management-net.yaml
59 management:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080060 type: tosca.nodes.Network
Zack Williams682450e2016-11-19 09:04:41 -070061 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080062 name: management
63 must-exist: true
Zack Williams682450e2016-11-19 09:04:41 -070064
Zack Williamsa2763112017-01-03 11:38:38 -070065{% if use_management_hosts %}
Zack Williams682450e2016-11-19 09:04:41 -070066 management_hosts:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080067 type: tosca.nodes.Network
Zack Williams682450e2016-11-19 09:04:41 -070068 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080069 must-exist: true
Zack Williamsa2763112017-01-03 11:38:38 -070070{% endif %}
Zack Williams682450e2016-11-19 09:04:41 -070071
Scott Baker87207e32017-07-18 10:45:55 -070072 service#rcord:
73 type: tosca.nodes.Service
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080074 properties:
75 name: rcord
76
77 rcord_volt:
78 type: tosca.nodes.ServiceDependency
79 properties:
80 connect_method: None
Matteo Scandolo686f7022017-11-27 09:50:42 -080081 requirements:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080082 - subscriber_service:
83 node: service#rcord
84 relationship: tosca.relationships.BelongsToOne
85 - provider_service:
Matteo Scandolo686f7022017-11-27 09:50:42 -080086 node: service#volt
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080087 relationship: tosca.relationships.BelongsToOne
Scott Baker87207e32017-07-18 10:45:55 -070088
Zack Williams682450e2016-11-19 09:04:41 -070089# ONOS_CORD, fully created in vtn.yaml
90 service#ONOS_CORD:
91 type: tosca.nodes.ONOSService
92 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080093 name: ONOS_CORD
94 must-exist: true
Zack Williams682450e2016-11-19 09:04:41 -070095
96# ONOS_Fabric, fully created in fabric.yaml
97 service#ONOS_Fabric:
98 type: tosca.nodes.ONOSService
99 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800100 name: ONOS_Fabric
101 must-exist: true
Zack Williams682450e2016-11-19 09:04:41 -0700102
103# CORD Services
104 service#vtr:
Scott Baker3a5dea72017-03-06 23:01:01 -0800105 type: tosca.nodes.VTRService
Zack Williams682450e2016-11-19 09:04:41 -0700106 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800107 name: vtr
108 kind: rcord
Zack Williams682450e2016-11-19 09:04:41 -0700109
110 service#volt:
111 type: tosca.nodes.VOLTService
Zack Williams682450e2016-11-19 09:04:41 -0700112 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800113 name: volt
114 kind: rcord
115 public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/volt_rsa.pub') }}
Zack Williams682450e2016-11-19 09:04:41 -0700116 private_key_fn: /opt/xos/services/volt/keys/volt_rsa
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800117
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
Zack Williams682450e2016-11-19 09:04:41 -0700129
130 addresses_vsg:
131 type: tosca.nodes.AddressPool
132 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800133 name: addresses_vsg
Andy Bavierd6c09af2017-08-23 17:57:51 -0700134 addresses: 10.7.1.0/24
135 gateway_ip: 10.7.1.1
Jonathan Hart1cec1042017-08-21 17:28:36 -0700136 gateway_mac: a4:23:05:06:01:01
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800137 requirements:
138 - service:
139 node: service#addressmanager
140 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -0700141
142 addresses_public:
143 type: tosca.nodes.AddressPool
144 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800145 name: addresses_public
Andy Bavierd6c09af2017-08-23 17:57:51 -0700146 addresses: 10.8.1.0/24
147 gateway_ip: 10.8.1.1
Jonathan Hart1cec1042017-08-21 17:28:36 -0700148 gateway_mac: a4:23:05:06:01:01
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800149 requirements:
150 - service:
151 node: service#addressmanager
152 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -0700153
154 label_vsg:
155 type: tosca.nodes.NodeLabel
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800156 properties:
157 name: label_vsg
Zack Williams682450e2016-11-19 09:04:41 -0700158
159 service#vsg:
160 type: tosca.nodes.VSGService
Zack Williams682450e2016-11-19 09:04:41 -0700161 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800162 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') }}
Zack Williams682450e2016-11-19 09:04:41 -0700165 private_key_fn: /opt/xos/services/vsg/keys/vsg_rsa
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800166 # 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
Zack Williams682450e2016-11-19 09:04:41 -0700191
Scott Baker7f95bc32017-08-21 09:40:10 -0700192 service#addressmanager:
193 type: tosca.nodes.AddressManagerService
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800194 properties:
195 name: addressmanager
Zack Williams682450e2016-11-19 09:04:41 -0700196
Scott Baker7f95bc32017-08-21 09:40:10 -0700197 service#vrouter:
198 type: tosca.nodes.VRouterService
199 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800200 name: vrouter
201 rest_hostname: onos-fabric.{{ site_suffix }}
202 rest_port: 8181
203 rest_user: onos
204 rest_pass: rocks
Scott Baker7f95bc32017-08-21 09:40:10 -0700205
Zack Williams682450e2016-11-19 09:04:41 -0700206 vRouter_ONOS_app:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800207 type: tosca.nodes.ONOSApp
Zack Williams682450e2016-11-19 09:04:41 -0700208 requirements:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800209 - owner:
Zack Williams682450e2016-11-19 09:04:41 -0700210 node: service#ONOS_Fabric
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800211 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -0700212 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800213 name: vRouter_ONOS_app
Jonathan Harta383c7c2017-08-18 13:58:16 -0700214 dependencies: org.onosproject.fpm
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800215
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
Zack Williams682450e2016-11-19 09:04:41 -0700235
236 template#vsg:
237 type: tosca.nodes.NetworkTemplate
238 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800239 name: vsg
Zack Williams682450e2016-11-19 09:04:41 -0700240 visibility: private
241 translation: none
242 vtn_kind: VSG
243
244 # Networks required by the CORD setup
245 {{ site_name }}_vsg-access:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800246 type: tosca.nodes.Network
Zack Williams682450e2016-11-19 09:04:41 -0700247 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800248 name: {{ site_name }}_vsg-access
249 # ip_version: 4
Zack Williams682450e2016-11-19 09:04:41 -0700250 requirements:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800251 - template:
Zack Williams682450e2016-11-19 09:04:41 -0700252 node: template#vsg
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800253 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -0700254 - owner:
255 node: {{ site_name }}_vsg
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800256 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
Zack Williams682450e2016-11-19 09:04:41 -0700267
268 # CORD Slices
269 {{ site_name }}_vsg:
270 description: vSG Controller Slice
271 type: tosca.nodes.Slice
272 properties:
273 network: noauto
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800274 name: {{ site_name }}_vsg
275 requirements:
276 - service:
Zack Williams682450e2016-11-19 09:04:41 -0700277 node: service#vsg
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800278 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -0700279 - site:
280 node: {{ site_name }}
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800281 relationship: tosca.relationships.BelongsToOne
282 - default_image:
Zack Williams682450e2016-11-19 09:04:41 -0700283 node: image#vsg-1.1
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800284 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -0700285
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800286 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
Scott Baker87207e32017-07-18 10:45:55 -0700295
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800296{% 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
Scott Baker87207e32017-07-18 10:45:55 -0700313
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800314 # out#lanside:
315 # type: tosca.nodes.InterfaceType
316 # properties:
317 # direction: out
Scott Baker87207e32017-07-18 10:45:55 -0700318
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800319 # in#wanside:
320 # type: tosca.nodes.InterfaceType
321 # properties:
322 # direction: in
Scott Baker87207e32017-07-18 10:45:55 -0700323
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800324 # out#wanside:
325 # type: tosca.nodes.InterfaceType
326 # properties:
327 # direction: out
Scott Baker87207e32017-07-18 10:45:55 -0700328
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800329 # 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
Scott Baker87207e32017-07-18 10:45:55 -0700338
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800339 # 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
Scott Baker87207e32017-07-18 10:45:55 -0700348
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800349 # 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