blob: 5fc5e6bc081cc462dc2cab5840c2b1d5438860c8 [file] [log] [blame]
Zack Williams4a830ed2018-01-18 09:55:27 -07001---
Andy Bavier01685f82017-12-21 14:06:54 -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
18tosca_definitions_version: tosca_simple_yaml_1_0
19
Zack Williams4a830ed2018-01-18 09:55:27 -070020description: Just enough Tosca to get the vEG slice running on the CORD POD, created by ecord profile
Andy Bavier01685f82017-12-21 14:06:54 -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
Scott Baker6c3e3ca2018-03-01 14:04:37 -080032 - custom_types/service.yaml
Andy Bavier01685f82017-12-21 14:06:54 -070033 - custom_types/servicedependency.yaml
34 - custom_types/serviceinstanceattribute.yaml
35 - custom_types/serviceinstancelink.yaml
36 - custom_types/site.yaml
37 - custom_types/slice.yaml
38 - custom_types/vegservice.yaml
39 - custom_types/vrouterservice.yaml
40
41topology_template:
42 node_templates:
43
44# site, image, fully created in deployment.yaml
45 {{ site_name }}:
46 type: tosca.nodes.Site
47 properties:
48 name: {{ site_name }}
49 must-exist: true
50
51 image#vsg-1.1:
52 type: tosca.nodes.Image
53 properties:
54 name: vsg-1.1
55
56# management networks, fully created in management-net.yaml
57 management:
58 type: tosca.nodes.Network
59 properties:
Andy Bavier01685f82017-12-21 14:06:54 -070060 must-exist: true
Zack Williams4a830ed2018-01-18 09:55:27 -070061 name: management
Andy Bavier01685f82017-12-21 14:06:54 -070062
Scott Baker6c3e3ca2018-03-01 14:04:37 -080063# service that holds ecord subscribers
64 service#ecord:
65 type: tosca.nodes.Service
66 properties:
67 name: ecord
68
Zack Williams4a830ed2018-01-18 09:55:27 -070069{% if use_vtn_net_management_host %}
70 management_host:
Andy Bavier01685f82017-12-21 14:06:54 -070071 type: tosca.nodes.Network
72 properties:
Zack Williams4a830ed2018-01-18 09:55:27 -070073 name: management_host
Andy Bavier01685f82017-12-21 14:06:54 -070074 must-exist: true
75{% endif %}
76
77# ONOS_CORD, fully created in vtn.yaml
78 service#ONOS_CORD:
79 type: tosca.nodes.ONOSService
80 properties:
81 name: ONOS_CORD
82 must-exist: true
83
84# ONOS_Fabric, fully created in fabric.yaml
85 service#ONOS_Fabric:
86 type: tosca.nodes.ONOSService
87 properties:
88 name: ONOS_Fabric
89 must-exist: true
90
91# CORD Services
Zack Williams4a830ed2018-01-18 09:55:27 -070092
93# Using same addresses as the r-cord VSG
Andy Bavier01685f82017-12-21 14:06:54 -070094 addresses_veg:
95 type: tosca.nodes.AddressPool
96 properties:
97 name: addresses_veg
Zack Williams4a830ed2018-01-18 09:55:27 -070098 addresses: {{ addresspool_vsg_cidr }}
99 gateway_ip: {{ addresspool_vsg_cidr | ipaddr('1') | ipaddr('address') }}
100 gateway_mac: {{ fabric_gateway_hwaddr }}
Andy Bavier01685f82017-12-21 14:06:54 -0700101 requirements:
102 - service:
103 node: service#addressmanager
104 relationship: tosca.relationships.BelongsToOne
105
106 addresses_public:
107 type: tosca.nodes.AddressPool
108 properties:
109 name: addresses_public
Zack Williams4a830ed2018-01-18 09:55:27 -0700110 addresses: {{ addresspool_public_cidr }}
111 gateway_ip: {{ addresspool_public_cidr | ipaddr('1') | ipaddr('address') }}
112 gateway_mac: {{ fabric_gateway_hwaddr }}
Andy Bavier01685f82017-12-21 14:06:54 -0700113 requirements:
114 - service:
115 node: service#addressmanager
116 relationship: tosca.relationships.BelongsToOne
117
118 service#addressmanager:
119 type: tosca.nodes.AddressManagerService
120 properties:
121 name: addressmanager
122
123 label_veg:
124 type: tosca.nodes.NodeLabel
125 properties:
126 name: label_veg
127
128 service#veg:
129 type: tosca.nodes.VEGService
130 properties:
131 name: veg
132 public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/veg_rsa.pub') }}
133 private_key_fn: /opt/xos/services/veg/keys/veg_rsa
134 # node_label: label_veg
135
136 veg_vrouter:
137 type: tosca.nodes.ServiceDependency
138 properties:
139 connect_method: None
140 requirements:
141 - subscriber_service:
142 node: service#veg
143 relationship: tosca.relationships.BelongsToOne
144 - provider_service:
145 node: service#vrouter
146 relationship: tosca.relationships.BelongsToOne
147
148 # NOTE are this connected?
149 veg_addressmanager:
150 type: tosca.nodes.ServiceDependency
151 properties:
152 connect_method: None
153 requirements:
154 - subscriber_service:
155 node: service#veg
156 relationship: tosca.relationships.BelongsToOne
157 - provider_service:
158 node: service#addressmanager
159 relationship: tosca.relationships.BelongsToOne
160
161 service#vrouter:
162 type: tosca.nodes.VRouterService
163 properties:
164 name: vrouter
165 rest_hostname: onos-fabric.{{ site_suffix }}
166 rest_port: 8181
167 rest_user: onos
168 rest_pass: rocks
169 # NOTE: shouldn't the addresses be attached to address_manager? I don't think vRouter is used now
170 # requirements:
171 # - addresses_veg:
172 # node: addresses_veg
173 # relationship: tosca.relationships.ProvidesAddresses
174 # - addresses_public:
175 # node: addresses_public
176 # relationship: tosca.relationships.ProvidesAddresses
177
178 vRouter_ONOS_app:
179 type: tosca.nodes.ONOSApp
180 requirements:
181 - owner:
182 node: service#ONOS_Fabric
183 relationship: tosca.relationships.BelongsToOne
184 properties:
185 name: vRouter_ONOS_app
186 dependencies: org.onosproject.fpm
187
188 vRouter_ONOS_app_autogenerate:
189 type: tosca.nodes.ServiceInstanceAttribute
190 requirements:
191 - service_instance:
192 node: vRouter_ONOS_app
193 relationship: tosca.relationships.BelongsToOne
194 properties:
195 name: autogenerate
196 value: vrouter-network-cfg
197
198 vRouter_ONOS_app_ONOS_CORD:
199 type: tosca.nodes.ServiceInstanceLink
200 requirements:
201 - provider_service_instance:
202 node: vRouter_ONOS_app
203 relationship: tosca.relationships.BelongsToOne
204 - subscriber_service:
205 node: service#vrouter
206 relationship: tosca.relationships.BelongsToOne
207
Zack Williams4a830ed2018-01-18 09:55:27 -0700208 veg_template:
Andy Bavier01685f82017-12-21 14:06:54 -0700209 type: tosca.nodes.NetworkTemplate
210 properties:
Zack Williams4a830ed2018-01-18 09:55:27 -0700211 name: veg_template
Andy Bavier01685f82017-12-21 14:06:54 -0700212 visibility: private
213 translation: none
214 vtn_kind: VSG
215
216 # Networks required by the CORD setup
217 {{ site_name }}_veg-access:
218 type: tosca.nodes.Network
219 properties:
220 name: {{ site_name }}_veg-access
221 # ip_version: 4
222 requirements:
223 - template:
Zack Williams4a830ed2018-01-18 09:55:27 -0700224 node: veg_template
Andy Bavier01685f82017-12-21 14:06:54 -0700225 relationship: tosca.relationships.BelongsToOne
226 - owner:
227 node: {{ site_name }}_veg
228 relationship: tosca.relationships.BelongsToOne
229
230 networkslice#{{ site_name }}_veg-access_to_{{ site_name }}_veg:
231 type: tosca.nodes.NetworkSlice
232 requirements:
233 - network:
234 node: {{ site_name }}_veg-access
235 relationship: tosca.relationships.BelongsToOne
236 - slice:
237 node: {{ site_name }}_veg
238 relationship: tosca.relationships.BelongsToOne
239
240 # CORD Slices
241 {{ site_name }}_veg:
242 description: vEG Controller Slice
243 type: tosca.nodes.Slice
244 properties:
245 network: noauto
246 name: {{ site_name }}_veg
247 requirements:
248 - service:
249 node: service#veg
250 relationship: tosca.relationships.BelongsToOne
251 - site:
252 node: {{ site_name }}
253 relationship: tosca.relationships.BelongsToOne
254 - default_image:
255 node: image#vsg-1.1
256 relationship: tosca.relationships.BelongsToOne
257
258 networkslice#management_to_{{ site_name }}_veg:
259 type: tosca.nodes.NetworkSlice
260 requirements:
261 - network:
262 node: management
263 relationship: tosca.relationships.BelongsToOne
264 - slice:
265 node: {{ site_name }}_veg
266 relationship: tosca.relationships.BelongsToOne
267
Zack Williams4a830ed2018-01-18 09:55:27 -0700268{% if use_vtn_net_management_host %}
269 networkslice#management_host_to_{{ site_name }}_veg:
Andy Bavier01685f82017-12-21 14:06:54 -0700270 type: tosca.nodes.NetworkSlice
271 requirements:
272 - network:
Zack Williams4a830ed2018-01-18 09:55:27 -0700273 node: management_host
Andy Bavier01685f82017-12-21 14:06:54 -0700274 relationship: tosca.relationships.BelongsToOne
275 - slice:
276 node: {{ site_name }}_veg
277 relationship: tosca.relationships.BelongsToOne
278{% endif %}
279
280 # TODO: migrate interfaces when we'll start using
281 # in#lanside:
282 # type: tosca.nodes.InterfaceType
283 # properties:
284 # direction: in
285
286 # out#lanside:
287 # type: tosca.nodes.InterfaceType
288 # properties:
289 # direction: out
290
291 # in#wanside:
292 # type: tosca.nodes.InterfaceType
293 # properties:
294 # direction: in
295
296 # out#wanside:
297 # type: tosca.nodes.InterfaceType
298 # properties:
299 # direction: out
300
301 # veg_lanside:
302 # type: tosca.nodes.ServiceInterface
303 # requirements:
304 # - service:
305 # node: service#veg
306 # relationship: tosca.relationships.MemberOfService
307 # - interface:
308 # node: in#lanside
309 # relationship: tosca.relationships.IsType
310
311 # veg_wanside:
312 # type: tosca.nodes.ServiceInterface
313 # requirements:
314 # - service:
315 # node: service#veg
316 # relationship: tosca.relationships.MemberOfService
317 # - interface:
318 # node: out#wanside
319 # relationship: tosca.relationships.IsType
320
321 # addressmanager_wanside:
322 # type: tosca.nodes.ServiceInterface
323 # requirements:
324 # - service:
325 # node: service#addressmanager
326 # relationship: tosca.relationships.MemberOfService
327 # - interface:
328 # node: in#wanside
329 # relationship: tosca.relationships.IsType
330