blob: cbdc2bfb84de8d9a97f819e50f20c95e8274e78b [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001{#
2Copyright 2017-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15#}
16
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080017tosca_definitions_version: tosca_simple_yaml_1_0
18
19description: Just enough Tosca to get the vEG slice running on the CORD POD, created by platform-install
20
21imports:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080022 - custom_types/addressmanagerservice.yaml
23 - custom_types/addresspool.yaml
24 - custom_types/image.yaml
25 - custom_types/network.yaml
26 - custom_types/networkslice.yaml
27 - custom_types/networktemplate.yaml
28 - custom_types/nodelabel.yaml
29 - custom_types/onosapp.yaml
30 - custom_types/onosservice.yaml
31 - custom_types/servicedependency.yaml
32 - custom_types/serviceinstanceattribute.yaml
33 - custom_types/serviceinstancelink.yaml
34 - custom_types/site.yaml
35 - custom_types/slice.yaml
36 - custom_types/vegservice.yaml
37 - custom_types/vrouterservice.yaml
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080038
39topology_template:
40 node_templates:
41
42# site, image, fully created in deployment.yaml
43 {{ site_name }}:
44 type: tosca.nodes.Site
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080045 properties:
46 name: {{ site_name }}
47 must-exist: true
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080048
Andrea Campanella0a34e232017-02-23 17:20:04 +010049 image#vsg-1.1:
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080050 type: tosca.nodes.Image
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080051 properties:
52 name: vsg-1.1
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080053
54# management networks, fully created in management-net.yaml
55 management:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080056 type: tosca.nodes.Network
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080057 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080058 name: management
59 must-exist: true
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080060
61{% if use_management_hosts %}
62 management_hosts:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080063 type: tosca.nodes.Network
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080064 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080065 must-exist: true
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080066{% endif %}
67
68# ONOS_CORD, fully created in vtn.yaml
69 service#ONOS_CORD:
70 type: tosca.nodes.ONOSService
71 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080072 name: ONOS_CORD
73 must-exist: true
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080074
75# ONOS_Fabric, fully created in fabric.yaml
76 service#ONOS_Fabric:
77 type: tosca.nodes.ONOSService
78 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080079 name: ONOS_Fabric
80 must-exist: true
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080081
82# CORD Services
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080083 addresses_veg:
84 type: tosca.nodes.AddressPool
85 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080086 name: addresses_veg
Andy Bavierd6c09af2017-08-23 17:57:51 -070087 addresses: 10.7.1.0/24
88 gateway_ip: 10.7.1.1
Jonathan Hart1cec1042017-08-21 17:28:36 -070089 gateway_mac: a4:23:05:06:01:01
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080090 requirements:
91 - service:
92 node: service#addressmanager
93 relationship: tosca.relationships.BelongsToOne
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080094
95 addresses_public:
96 type: tosca.nodes.AddressPool
97 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080098 name: addresses_public
Andy Bavierd6c09af2017-08-23 17:57:51 -070099 addresses: 10.8.1.0/24
100 gateway_ip: 10.8.1.1
Jonathan Hart1cec1042017-08-21 17:28:36 -0700101 gateway_mac: a4:23:05:06:01:01
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800102 requirements:
103 - service:
104 node: service#addressmanager
105 relationship: tosca.relationships.BelongsToOne
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800106
Zack Williams2020afb2017-09-29 07:58:45 -0700107 service#addressmanager:
108 type: tosca.nodes.AddressManagerService
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800109 properties:
110 name: addressmanager
Zack Williams2020afb2017-09-29 07:58:45 -0700111
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800112 label_veg:
113 type: tosca.nodes.NodeLabel
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800114 properties:
115 name: label_veg
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800116
117 service#veg:
118 type: tosca.nodes.VEGService
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800119 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800120 name: veg
121 public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/veg_rsa.pub') }}
Scott Bakerd25f0e92017-10-13 14:27:37 -0700122 private_key_fn: /opt/xos/services/veg/keys/veg_rsa
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800123 # node_label: label_veg
124
125 veg_vrouter:
126 type: tosca.nodes.ServiceDependency
127 properties:
128 connect_method: None
129 requirements:
130 - subscriber_service:
131 node: service#veg
132 relationship: tosca.relationships.BelongsToOne
133 - provider_service:
134 node: service#vrouter
135 relationship: tosca.relationships.BelongsToOne
136
137 # NOTE are this connected?
138 veg_addressmanager:
139 type: tosca.nodes.ServiceDependency
140 properties:
141 connect_method: None
142 requirements:
143 - subscriber_service:
144 node: service#veg
145 relationship: tosca.relationships.BelongsToOne
146 - provider_service:
147 node: service#addressmanager
148 relationship: tosca.relationships.BelongsToOne
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800149
150 service#vrouter:
151 type: tosca.nodes.VRouterService
152 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800153 name: vrouter
154 rest_hostname: onos-fabric.{{ site_suffix }}
155 rest_port: 8181
156 rest_user: onos
157 rest_pass: rocks
158 # NOTE: shouldn't the addresses be attached to address_manager? I don't think vRouter is used now
159 # requirements:
160 # - addresses_veg:
161 # node: addresses_veg
162 # relationship: tosca.relationships.ProvidesAddresses
163 # - addresses_public:
164 # node: addresses_public
165 # relationship: tosca.relationships.ProvidesAddresses
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800166
167 vRouter_ONOS_app:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800168 type: tosca.nodes.ONOSApp
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800169 requirements:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800170 - owner:
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800171 node: service#ONOS_Fabric
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800172 relationship: tosca.relationships.BelongsToOne
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800173 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800174 name: vRouter_ONOS_app
Zack Williams2020afb2017-09-29 07:58:45 -0700175 dependencies: org.onosproject.fpm
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800176
177 vRouter_ONOS_app_autogenerate:
178 type: tosca.nodes.ServiceInstanceAttribute
179 requirements:
180 - service_instance:
181 node: vRouter_ONOS_app
182 relationship: tosca.relationships.BelongsToOne
183 properties:
184 name: autogenerate
185 value: vrouter-network-cfg
186
187 vRouter_ONOS_app_ONOS_CORD:
188 type: tosca.nodes.ServiceInstanceLink
189 requirements:
190 - provider_service_instance:
191 node: vRouter_ONOS_app
192 relationship: tosca.relationships.BelongsToOne
193 - subscriber_service:
194 node: service#vrouter
195 relationship: tosca.relationships.BelongsToOne
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800196
197 template#veg:
198 type: tosca.nodes.NetworkTemplate
199 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800200 name: veg
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800201 visibility: private
202 translation: none
Scott Bakerd25f0e92017-10-13 14:27:37 -0700203 vtn_kind: VSG
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800204
205 # Networks required by the CORD setup
206 {{ site_name }}_veg-access:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800207 type: tosca.nodes.Network
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800208 properties:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800209 name: {{ site_name }}_veg-access
210 # ip_version: 4
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800211 requirements:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800212 - template:
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800213 node: template#veg
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800214 relationship: tosca.relationships.BelongsToOne
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800215 - owner:
216 node: {{ site_name }}_veg
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800217 relationship: tosca.relationships.BelongsToOne
218
219 networkslice#{{ site_name }}_veg-access_to_{{ site_name }}_veg:
220 type: tosca.nodes.NetworkSlice
221 requirements:
222 - network:
223 node: {{ site_name }}_veg-access
224 relationship: tosca.relationships.BelongsToOne
225 - slice:
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800226 node: {{ site_name }}_veg
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800227 relationship: tosca.relationships.BelongsToOne
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800228
229 # CORD Slices
230 {{ site_name }}_veg:
231 description: vEG Controller Slice
232 type: tosca.nodes.Slice
233 properties:
234 network: noauto
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800235 name: {{ site_name }}_veg
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800236 requirements:
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800237 - service:
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800238 node: service#veg
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800239 relationship: tosca.relationships.BelongsToOne
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800240 - site:
241 node: {{ site_name }}
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800242 relationship: tosca.relationships.BelongsToOne
243 - default_image:
Andrea Campanella0a34e232017-02-23 17:20:04 +0100244 node: image#vsg-1.1
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800245 relationship: tosca.relationships.BelongsToOne
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800246
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800247 networkslice#management_to_{{ site_name }}_veg:
248 type: tosca.nodes.NetworkSlice
249 requirements:
250 - network:
251 node: management
252 relationship: tosca.relationships.BelongsToOne
253 - slice:
254 node: {{ site_name }}_veg
255 relationship: tosca.relationships.BelongsToOne
Zack Williams2020afb2017-09-29 07:58:45 -0700256
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800257{% if use_management_hosts %}
258 networkslice#management_hosts_to_{{ site_name }}_veg:
259 type: tosca.nodes.NetworkSlice
260 requirements:
261 - network:
262 node: management_hosts
263 relationship: tosca.relationships.BelongsToOne
264 - slice:
265 node: {{ site_name }}_veg
266 relationship: tosca.relationships.BelongsToOne
267{% endif %}
Zack Williams2020afb2017-09-29 07:58:45 -0700268
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800269 # TODO: migrate interfaces when we'll start using
270 # in#lanside:
271 # type: tosca.nodes.InterfaceType
272 # properties:
273 # direction: in
Zack Williams2020afb2017-09-29 07:58:45 -0700274
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800275 # out#lanside:
276 # type: tosca.nodes.InterfaceType
277 # properties:
278 # direction: out
Zack Williams2020afb2017-09-29 07:58:45 -0700279
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800280 # in#wanside:
281 # type: tosca.nodes.InterfaceType
282 # properties:
283 # direction: in
Zack Williams2020afb2017-09-29 07:58:45 -0700284
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800285 # out#wanside:
286 # type: tosca.nodes.InterfaceType
287 # properties:
288 # direction: out
Zack Williams2020afb2017-09-29 07:58:45 -0700289
Matteo Scandolo1ed76b82017-12-05 13:58:22 -0800290 # veg_lanside:
291 # type: tosca.nodes.ServiceInterface
292 # requirements:
293 # - service:
294 # node: service#veg
295 # relationship: tosca.relationships.MemberOfService
296 # - interface:
297 # node: in#lanside
298 # relationship: tosca.relationships.IsType
299
300 # veg_wanside:
301 # type: tosca.nodes.ServiceInterface
302 # requirements:
303 # - service:
304 # node: service#veg
305 # relationship: tosca.relationships.MemberOfService
306 # - interface:
307 # node: out#wanside
308 # relationship: tosca.relationships.IsType
309
310 # addressmanager_wanside:
311 # type: tosca.nodes.ServiceInterface
312 # requirements:
313 # - service:
314 # node: service#addressmanager
315 # relationship: tosca.relationships.MemberOfService
316 # - interface:
317 # node: in#wanside
318 # relationship: tosca.relationships.IsType
Zack Williams2020afb2017-09-29 07:58:45 -0700319