blob: cbdc2bfb84de8d9a97f819e50f20c95e8274e78b [file] [log] [blame]
Andy Bavier01685f82017-12-21 14:06:54 -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
17tosca_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:
22 - 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
38
39topology_template:
40 node_templates:
41
42# site, image, fully created in deployment.yaml
43 {{ site_name }}:
44 type: tosca.nodes.Site
45 properties:
46 name: {{ site_name }}
47 must-exist: true
48
49 image#vsg-1.1:
50 type: tosca.nodes.Image
51 properties:
52 name: vsg-1.1
53
54# management networks, fully created in management-net.yaml
55 management:
56 type: tosca.nodes.Network
57 properties:
58 name: management
59 must-exist: true
60
61{% if use_management_hosts %}
62 management_hosts:
63 type: tosca.nodes.Network
64 properties:
65 must-exist: true
66{% endif %}
67
68# ONOS_CORD, fully created in vtn.yaml
69 service#ONOS_CORD:
70 type: tosca.nodes.ONOSService
71 properties:
72 name: ONOS_CORD
73 must-exist: true
74
75# ONOS_Fabric, fully created in fabric.yaml
76 service#ONOS_Fabric:
77 type: tosca.nodes.ONOSService
78 properties:
79 name: ONOS_Fabric
80 must-exist: true
81
82# CORD Services
83 addresses_veg:
84 type: tosca.nodes.AddressPool
85 properties:
86 name: addresses_veg
87 addresses: 10.7.1.0/24
88 gateway_ip: 10.7.1.1
89 gateway_mac: a4:23:05:06:01:01
90 requirements:
91 - service:
92 node: service#addressmanager
93 relationship: tosca.relationships.BelongsToOne
94
95 addresses_public:
96 type: tosca.nodes.AddressPool
97 properties:
98 name: addresses_public
99 addresses: 10.8.1.0/24
100 gateway_ip: 10.8.1.1
101 gateway_mac: a4:23:05:06:01:01
102 requirements:
103 - service:
104 node: service#addressmanager
105 relationship: tosca.relationships.BelongsToOne
106
107 service#addressmanager:
108 type: tosca.nodes.AddressManagerService
109 properties:
110 name: addressmanager
111
112 label_veg:
113 type: tosca.nodes.NodeLabel
114 properties:
115 name: label_veg
116
117 service#veg:
118 type: tosca.nodes.VEGService
119 properties:
120 name: veg
121 public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/veg_rsa.pub') }}
122 private_key_fn: /opt/xos/services/veg/keys/veg_rsa
123 # 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
149
150 service#vrouter:
151 type: tosca.nodes.VRouterService
152 properties:
153 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
166
167 vRouter_ONOS_app:
168 type: tosca.nodes.ONOSApp
169 requirements:
170 - owner:
171 node: service#ONOS_Fabric
172 relationship: tosca.relationships.BelongsToOne
173 properties:
174 name: vRouter_ONOS_app
175 dependencies: org.onosproject.fpm
176
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
196
197 template#veg:
198 type: tosca.nodes.NetworkTemplate
199 properties:
200 name: veg
201 visibility: private
202 translation: none
203 vtn_kind: VSG
204
205 # Networks required by the CORD setup
206 {{ site_name }}_veg-access:
207 type: tosca.nodes.Network
208 properties:
209 name: {{ site_name }}_veg-access
210 # ip_version: 4
211 requirements:
212 - template:
213 node: template#veg
214 relationship: tosca.relationships.BelongsToOne
215 - owner:
216 node: {{ site_name }}_veg
217 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:
226 node: {{ site_name }}_veg
227 relationship: tosca.relationships.BelongsToOne
228
229 # CORD Slices
230 {{ site_name }}_veg:
231 description: vEG Controller Slice
232 type: tosca.nodes.Slice
233 properties:
234 network: noauto
235 name: {{ site_name }}_veg
236 requirements:
237 - service:
238 node: service#veg
239 relationship: tosca.relationships.BelongsToOne
240 - site:
241 node: {{ site_name }}
242 relationship: tosca.relationships.BelongsToOne
243 - default_image:
244 node: image#vsg-1.1
245 relationship: tosca.relationships.BelongsToOne
246
247 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
256
257{% 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 %}
268
269 # TODO: migrate interfaces when we'll start using
270 # in#lanside:
271 # type: tosca.nodes.InterfaceType
272 # properties:
273 # direction: in
274
275 # out#lanside:
276 # type: tosca.nodes.InterfaceType
277 # properties:
278 # direction: out
279
280 # in#wanside:
281 # type: tosca.nodes.InterfaceType
282 # properties:
283 # direction: in
284
285 # out#wanside:
286 # type: tosca.nodes.InterfaceType
287 # properties:
288 # direction: out
289
290 # 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
319