blob: a555975a40a8c48777a374b91af56d1a0d122ad8 [file] [log] [blame]
Andy Baviere3023282018-05-12 06:35:13 -07001{{/* vim: set filetype=mustache: */}}
2{{/*
3Copyright 2018-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*/}}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070017
18{{- define "rcord-lite.fabricAppTosca" -}}
19tosca_definitions_version: tosca_simple_yaml_1_0
20imports:
21 - custom_types/onosapp.yaml
22 - custom_types/onosservice.yaml
23description: ONOS service and app for fabric
24topology_template:
25 node_templates:
26 service#ONOS_Fabric:
27 type: tosca.nodes.ONOSService
28 properties:
29 name: ONOS_Fabric
30 kind: data
31 rest_hostname: {{ .onosFabricRestService | quote }}
32 rest_port: 8181
33
34 onos_app#segmentrouting:
35 type: tosca.nodes.ONOSApp
36 properties:
37 name: org.onosproject.segmentrouting
38 app_id: org.onosproject.segmentrouting
39 requirements:
40 - owner:
41 node: service#ONOS_Fabric
42 relationship: tosca.relationships.BelongsToOne
43
44 onos_app#vrouter:
45 type: tosca.nodes.ONOSApp
46 properties:
47 name: org.onosproject.vrouter
48 app_id: org.onosproject.vrouter
49 requirements:
50 - owner:
51 node: service#ONOS_Fabric
52 relationship: tosca.relationships.BelongsToOne
53
54 onos_app#netcfghostprovider:
55 type: tosca.nodes.ONOSApp
56 properties:
57 name: org.onosproject.netcfghostprovider
58 app_id: org.onosproject.netcfghostprovider
59 requirements:
60 - owner:
61 node: service#ONOS_Fabric
62 relationship: tosca.relationships.BelongsToOne
63
64 onos_app#openflow:
65 type: tosca.nodes.ONOSApp
66 properties:
67 name: org.onosproject.openflow
68 app_id: org.onosproject.openflow
69 requirements:
70 - owner:
71 node: service#ONOS_Fabric
72 relationship: tosca.relationships.BelongsToOne
73{{- end -}}
74
75{{- define "rcord-lite.volthaOnosTosca" -}}
76tosca_definitions_version: tosca_simple_yaml_1_0
77
78imports:
79 - custom_types/onosapp.yaml
80 - custom_types/onosservice.yaml
81 - custom_types/serviceinstanceattribute.yaml
82
83description: Configures the VOLTHA ONOS service
84
85topology_template:
86 node_templates:
87
88 service#ONOS_VOLTHA:
89 type: tosca.nodes.ONOSService
90 properties:
91 name: ONOS_VOLTHA
92 kind: data
93 rest_hostname: {{ .onosVolthaRestService | quote }}
94 rest_port: 8181
95
96 onos_app#openflow-base:
97 type: tosca.nodes.ONOSApp
98 properties:
99 name: openflow-base
100 app_id: org.onosproject.openflow-base
101 requirements:
102 - owner:
103 node: service#ONOS_VOLTHA
104 relationship: tosca.relationships.BelongsToOne
105
106 onos_app#hostprovider:
107 type: tosca.nodes.ONOSApp
108 properties:
109 name: hostprovider
110 app_id: org.onosproject.hostprovider
111 requirements:
112 - owner:
113 node: service#ONOS_VOLTHA
114 relationship: tosca.relationships.BelongsToOne
115
116 onos_app#cord-config:
117 type: tosca.nodes.ONOSApp
118 properties:
119 name: cord-config
120 app_id: org.opencord.config
121 url: {{ .cordConfigAppURL }}
122 version: 1.4.0
123 requirements:
124 - owner:
125 node: service#ONOS_VOLTHA
126 relationship: tosca.relationships.BelongsToOne
127
128 onos_app#olt:
129 type: tosca.nodes.ONOSApp
130 properties:
131 name: olt
132 app_id: org.opencord.olt
133 url: {{ .oltAppUrl }}
134 version: 2.0.0.SNAPSHOT
135 dependencies: org.opencord.config
136 requirements:
137 - owner:
138 node: service#ONOS_VOLTHA
139 relationship: tosca.relationships.BelongsToOne
140
141 onos_app#sadis:
142 type: tosca.nodes.ONOSApp
143 properties:
144 name: sadis
145 app_id: org.opencord.sadis
146 url: {{ .sadisAppUrl }}
147 version: 2.1.0
148 requirements:
149 - owner:
150 node: service#ONOS_VOLTHA
151 relationship: tosca.relationships.BelongsToOne
152
153 onos_app#dhcpl2relay:
154 type: tosca.nodes.ONOSApp
155 properties:
156 name: dhcpl2relay
157 app_id: org.opencord.dhcpl2relay
158 url: {{ .dhcpl2relayAppUrl }}
159 version: 1.5.0.SNAPSHOT
160 dependencies: org.opencord.sadis
161 requirements:
162 - owner:
163 node: service#ONOS_VOLTHA
164 relationship: tosca.relationships.BelongsToOne
165
166 onos_app#aaa:
167 type: tosca.nodes.ONOSApp
168 properties:
169 name: aaa
170 app_id: org.opencord.aaa
171 url: {{ .aaaAppUrl }}
172 version: 1.8.0.SNAPSHOT
173 dependencies: org.opencord.sadis
174 requirements:
175 - owner:
176 node: service#ONOS_VOLTHA
177 relationship: tosca.relationships.BelongsToOne
178
179 onos_app#kafka:
180 type: tosca.nodes.ONOSApp
181 properties:
182 name: kafka
183 app_id: org.opencord.kafka
184 url: {{ .kafkaAppUrl }}
185 version: 1.0.0.SNAPSHOT
186 dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay
187 requirements:
188 - owner:
189 node: service#ONOS_VOLTHA
190 relationship: tosca.relationships.BelongsToOne
191
192 # CORD-Configuration
193 cord-config-attr:
194 type: tosca.nodes.ServiceInstanceAttribute
195 properties:
196 name: /onos/v1/network/configuration/apps/org.opencord.kafka
197 value: >
198 {
199 "kafka" : {
200 "bootstrapServers" : {{ .kafkaService | quote }}
201 }
202 }
203 requirements:
204 - service_instance:
205 node: onos_app#olt
206 relationship: tosca.relationships.BelongsToOne
207
208 olt-config-attr:
209 type: tosca.nodes.ServiceInstanceAttribute
210 properties:
211 name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
212 value: >
213 {
214 "enableDhcpOnProvisioning" : true
215 }
216 requirements:
217 - service_instance:
218 node: onos_app#olt
219 relationship: tosca.relationships.BelongsToOne
220
221 dhcpl2relay-config-attr:
222 type: tosca.nodes.ServiceInstanceAttribute
223 properties:
224 name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
225 value: >
226 {
227 "dhcpl2relay" : {
228 "useOltUplinkForServerPktInOut" : true
229 }
230 }
231 requirements:
232 - service_instance:
233 node: onos_app#dhcpl2relay
234 relationship: tosca.relationships.BelongsToOne
235
236 aaa-config-attr:
237 type: tosca.nodes.ServiceInstanceAttribute
238 properties:
239 name: /onos/v1/network/configuration/apps/org.opencord.aaa
240 value: >
241 {
242 "AAA" : {
243 "radiusConnectionType" : "socket",
244 "radiusHost" : "freeradius.voltha.svc.cluster.local",
245 "radiusServerPort" : "1812",
246 "radiusSecret" : "SECRET"
247 }
248 }
249 requirements:
250 - service_instance:
251 node: onos_app#aaa
252 relationship: tosca.relationships.BelongsToOne
253
254 sadis-config-attr:
255 type: tosca.nodes.ServiceInstanceAttribute
256 properties:
257 name: /onos/v1/network/configuration/apps/org.opencord.sadis
258 value: >
259 {
260 "sadis" : {
261 "integration" : {
262 "cache" : {
263 "maxsize" : 1000
264 },
265 "url" : "http://sadis-service:8000/subscriber/%s"
266 }
267 }
268 }
269 requirements:
270 - service_instance:
271 node: onos_app#sadis
272 relationship: tosca.relationships.BelongsToOne
273{{- end -}}
274
Andy Baviere3023282018-05-12 06:35:13 -0700275{{- define "rcord-lite.basicFixturesTosca" -}}
276tosca_definitions_version: tosca_simple_yaml_1_0
277description: Some basic fixtures
278imports:
279 - custom_types/siterole.yaml
Andy Baviere3023282018-05-12 06:35:13 -0700280 - custom_types/deployment.yaml
281topology_template:
282 node_templates:
283
Andy Baviere3023282018-05-12 06:35:13 -0700284# ----------------------------------------------------------------------------
285# Roles
286# ----------------------------------------------------------------------------
287 siterole#admin:
288 type: tosca.nodes.SiteRole
289 properties:
290 role: admin
291 siterole#pi:
292 type: tosca.nodes.SiteRole
293 properties:
294 role: pi
295 siterole#tech:
296 type: tosca.nodes.SiteRole
297 properties:
298 role: tech
Andy Baviere3023282018-05-12 06:35:13 -0700299
300# -----------------------------------------------------------------------------
301# Deployment
302# -----------------------------------------------------------------------------
303 MyDeployment:
304 type: tosca.nodes.Deployment
305 properties:
306 name: MyDeployment
307{{- end -}}
308
309
310{{- define "rcord-lite.serviceGraphTosca" -}}
311tosca_definitions_version: tosca_simple_yaml_1_0
312imports:
313 - custom_types/fabricservice.yaml
314 - custom_types/onosservice.yaml
315 - custom_types/rcordservice.yaml
316 - custom_types/vrouterservice.yaml
317 - custom_types/voltservice.yaml
318 - custom_types/vsghwservice.yaml
319 - custom_types/servicedependency.yaml
320 - custom_types/servicegraphconstraint.yaml
321description: rcord-lite service graph
322topology_template:
323 node_templates:
324
325# These services must be defined before loading the graph
326
327 service#ONOS_Fabric:
328 type: tosca.nodes.ONOSService
329 properties:
330 name: ONOS_Fabric
331 must-exist: true
332
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700333 service#ONOS_VOLTHA:
334 type: tosca.nodes.ONOSService
335 properties:
336 name: ONOS_VOLTHA
337 must-exist: true
338
Andy Baviere3023282018-05-12 06:35:13 -0700339 service#fabric:
340 type: tosca.nodes.FabricService
341 properties:
342 name: fabric
343 must-exist: true
344
345 service#rcord:
346 type: tosca.nodes.RCORDService
347 properties:
348 name: rcord
349 must-exist: true
350
351 service#vrouter:
352 type: tosca.nodes.VRouterService
353 properties:
354 name: vrouter
355 must-exist: true
356
357 service#volt:
358 type: tosca.nodes.VOLTService
359 properties:
360 name: volt
361 must-exist: true
362
363 service#vsg-hw:
364 type: tosca.nodes.VSGHWService
365 properties:
366 name: vsg-hw
367 must-exist: true
368
369# The rcord-lite service graph
370
371 service_dependency#onos-fabric_fabric:
372 type: tosca.nodes.ServiceDependency
373 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700374 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700375 requirements:
376 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700377 node: service#fabric
Andy Baviere3023282018-05-12 06:35:13 -0700378 relationship: tosca.relationships.BelongsToOne
379 - provider_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700380 node: service#ONOS_Fabric
Andy Baviere3023282018-05-12 06:35:13 -0700381 relationship: tosca.relationships.BelongsToOne
382
383 service_dependency#rcord_volt:
384 type: tosca.nodes.ServiceDependency
385 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700386 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700387 requirements:
388 - subscriber_service:
389 node: service#rcord
390 relationship: tosca.relationships.BelongsToOne
391 - provider_service:
392 node: service#volt
393 relationship: tosca.relationships.BelongsToOne
394
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700395 service_dependency#onos_voltha_volt:
396 type: tosca.nodes.ServiceDependency
397 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700398 connect_method: none
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700399 requirements:
400 - subscriber_service:
401 node: service#volt
402 relationship: tosca.relationships.BelongsToOne
403 - provider_service:
404 node: service#ONOS_VOLTHA
405 relationship: tosca.relationships.BelongsToOne
406
Andy Baviere3023282018-05-12 06:35:13 -0700407 service_dependency#fabric_vrouter:
408 type: tosca.nodes.ServiceDependency
409 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700410 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700411 requirements:
412 - subscriber_service:
413 node: service#fabric
414 relationship: tosca.relationships.BelongsToOne
415 - provider_service:
416 node: service#vrouter
417 relationship: tosca.relationships.BelongsToOne
418
419 service_dependency#volt_vsg-hw:
420 type: tosca.nodes.ServiceDependency
421 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700422 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700423 requirements:
424 - subscriber_service:
425 node: service#volt
426 relationship: tosca.relationships.BelongsToOne
427 - provider_service:
428 node: service#vsg-hw
429 relationship: tosca.relationships.BelongsToOne
430
431 service_dependency#onos_fabric_vsg-hw:
432 type: tosca.nodes.ServiceDependency
433 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700434 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700435 requirements:
436 - subscriber_service:
437 node: service#vsg-hw
438 relationship: tosca.relationships.BelongsToOne
439 - provider_service:
440 node: service#ONOS_Fabric
441 relationship: tosca.relationships.BelongsToOne
442
443 constraints:
444 type: tosca.nodes.ServiceGraphConstraint
445 properties:
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700446 constraints: '[[null, "rcord"], ["ONOS_VOLTHA", "volt"], ["ONOS_Fabric", "vsg-hw"], ["fabric", null], ["vrouter", null]]'
Andy Baviere3023282018-05-12 06:35:13 -0700447{{- end -}}