blob: 32ce6787da7f62d8ca4da2e843d9961ae9388bfa [file] [log] [blame]
Scott Bakerafff3082018-07-16 17:23:26 -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*/}}
Matteo Scandolo34dd2362018-12-12 15:16:25 -080017{{- define "seba-services.onosTosca" -}}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070018tosca_definitions_version: tosca_simple_yaml_1_0
19
20imports:
21 - custom_types/onosapp.yaml
22 - custom_types/onosservice.yaml
23 - custom_types/serviceinstanceattribute.yaml
24
25description: Configures the VOLTHA ONOS service
26
27topology_template:
28 node_templates:
29
30 service#onos:
31 type: tosca.nodes.ONOSService
32 properties:
33 name: onos
34 kind: data
35 rest_hostname: {{ .onosRestService | quote }}
36 rest_port: 8181
37
38 onos_app#openflow-base:
39 type: tosca.nodes.ONOSApp
40 properties:
41 name: openflow-base
42 app_id: org.onosproject.openflow-base
43 requirements:
44 - owner:
45 node: service#onos
46 relationship: tosca.relationships.BelongsToOne
47
48 onos_app#hostprovider:
49 type: tosca.nodes.ONOSApp
50 properties:
51 name: hostprovider
52 app_id: org.onosproject.hostprovider
53 requirements:
54 - owner:
55 node: service#onos
56 relationship: tosca.relationships.BelongsToOne
57
58 onos_app#olt:
59 type: tosca.nodes.ONOSApp
60 properties:
61 name: olt
62 app_id: org.opencord.olt
63 url: {{ .oltAppUrl }}
Matteo Scandolo9f68f902018-12-17 13:50:33 -080064 version: 2.1.0
Jonathan Hart9f638ff2018-08-22 18:19:15 -070065 dependencies: org.opencord.sadis
66 requirements:
67 - owner:
68 node: service#onos
69 relationship: tosca.relationships.BelongsToOne
70
71 onos_app#sadis:
72 type: tosca.nodes.ONOSApp
73 properties:
74 name: sadis
75 app_id: org.opencord.sadis
76 url: {{ .sadisAppUrl }}
Matteo Scandolod3df47d2018-12-17 15:47:33 -080077 version: 2.2.0
Jonathan Hart9f638ff2018-08-22 18:19:15 -070078 requirements:
79 - owner:
80 node: service#onos
81 relationship: tosca.relationships.BelongsToOne
82
83 onos_app#dhcpl2relay:
84 type: tosca.nodes.ONOSApp
85 properties:
86 name: dhcpl2relay
87 app_id: org.opencord.dhcpl2relay
88 url: {{ .dhcpl2relayAppUrl }}
Matteo Scandolo9f68f902018-12-17 13:50:33 -080089 version: 1.5.0
Jonathan Hart9f638ff2018-08-22 18:19:15 -070090 dependencies: org.opencord.sadis
91 requirements:
92 - owner:
93 node: service#onos
94 relationship: tosca.relationships.BelongsToOne
95
96 onos_app#aaa:
97 type: tosca.nodes.ONOSApp
98 properties:
99 name: aaa
100 app_id: org.opencord.aaa
101 url: {{ .aaaAppUrl }}
Matteo Scandolo9f68f902018-12-17 13:50:33 -0800102 version: 1.8.0
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700103 dependencies: org.opencord.sadis
104 requirements:
105 - owner:
106 node: service#onos
107 relationship: tosca.relationships.BelongsToOne
108
109 onos_app#kafka:
110 type: tosca.nodes.ONOSApp
111 properties:
112 name: kafka
113 app_id: org.opencord.kafka
114 url: {{ .kafkaAppUrl }}
Matteo Scandolo9f68f902018-12-17 13:50:33 -0800115 version: 1.0.0
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700116 dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay
117 requirements:
118 - owner:
119 node: service#onos
120 relationship: tosca.relationships.BelongsToOne
121
122 # CORD-Configuration
123 kafka-config-attr:
124 type: tosca.nodes.ServiceInstanceAttribute
125 properties:
126 name: /onos/v1/network/configuration/apps/org.opencord.kafka
127 value: >
128 {
129 "kafka" : {
130 "bootstrapServers" : {{ .kafkaService | quote }}
131 }
132 }
133 requirements:
134 - service_instance:
Andy Bavier1a24ced2018-09-15 11:49:14 -0700135 node: onos_app#kafka
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700136 relationship: tosca.relationships.BelongsToOne
137
138 olt-config-attr:
139 type: tosca.nodes.ServiceInstanceAttribute
140 properties:
141 name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
142 value: >
143 {
144 "enableDhcpOnProvisioning" : true
145 }
146 requirements:
147 - service_instance:
148 node: onos_app#olt
149 relationship: tosca.relationships.BelongsToOne
150
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700151 aaa-config-attr:
152 type: tosca.nodes.ServiceInstanceAttribute
153 properties:
154 name: /onos/v1/network/configuration/apps/org.opencord.aaa
155 value: >
156 {
157 "AAA" : {
158 "radiusConnectionType" : "socket",
159 "radiusHost" : "freeradius.voltha.svc.cluster.local",
160 "radiusServerPort" : "1812",
161 "radiusSecret" : "SECRET"
162 }
163 }
164 requirements:
165 - service_instance:
166 node: onos_app#aaa
167 relationship: tosca.relationships.BelongsToOne
168
169 sadis-config-attr:
170 type: tosca.nodes.ServiceInstanceAttribute
171 properties:
172 name: /onos/v1/network/configuration/apps/org.opencord.sadis
173 value: >
174 {
175 "sadis" : {
176 "integration" : {
177 "cache" : {
Matteo Scandolo4c481d12018-11-19 13:28:17 -0800178 "maxsize" : 1000,
179 "ttl": "PT300S"
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700180 },
181 "url" : "http://sadis-service:8000/subscriber/%s"
182 }
183 }
184 }
185 requirements:
186 - service_instance:
187 node: onos_app#sadis
188 relationship: tosca.relationships.BelongsToOne
189
190 onos_app#segmentrouting:
191 type: tosca.nodes.ONOSApp
192 properties:
193 name: org.onosproject.segmentrouting
194 app_id: org.onosproject.segmentrouting
195 requirements:
196 - owner:
197 node: service#onos
198 relationship: tosca.relationships.BelongsToOne
199
200 onos_app#netcfghostprovider:
201 type: tosca.nodes.ONOSApp
202 properties:
203 name: org.onosproject.netcfghostprovider
204 app_id: org.onosproject.netcfghostprovider
205 requirements:
206 - owner:
207 node: service#onos
208 relationship: tosca.relationships.BelongsToOne
209
210 onos_app#openflow:
211 type: tosca.nodes.ONOSApp
212 properties:
213 name: org.onosproject.openflow
214 app_id: org.onosproject.openflow
215 requirements:
216 - owner:
217 node: service#onos
218 relationship: tosca.relationships.BelongsToOne
219{{- end -}}
220
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800221{{- define "seba-services.basicFixturesTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700222tosca_definitions_version: tosca_simple_yaml_1_0
223description: Some basic fixtures
224imports:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700225 - custom_types/deployment.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700226 - custom_types/networkparametertype.yaml
227 - custom_types/networktemplate.yaml
Matteo Scandolo7607b522018-08-09 17:03:58 -0700228 - custom_types/siterole.yaml
Scott Bakerafff3082018-07-16 17:23:26 -0700229topology_template:
230 node_templates:
231
232# -----------------------------------------------------------------------------
233# Network Parameter Types
234# -----------------------------------------------------------------------------
235 s_tag:
236 type: tosca.nodes.NetworkParameterType
237 properties:
238 name: s_tag
239 c_tag:
240 type: tosca.nodes.NetworkParameterType
241 properties:
242 name: c_tag
243 next_hop:
244 type: tosca.nodes.NetworkParameterType
245 properties:
246 name: next_hop
247 device:
248 type: tosca.nodes.NetworkParameterType
249 properties:
250 name: device
251 bridge:
252 type: tosca.nodes.NetworkParameterType
253 properties:
254 name: bridge
255 neutron_port_name:
256 type: tosca.nodes.NetworkParameterType
257 properties:
258 name: neutron_port_name
259
260# ----------------------------------------------------------------------------
261# Roles
262# ----------------------------------------------------------------------------
263 siterole#admin:
264 type: tosca.nodes.SiteRole
265 properties:
266 role: admin
267 siterole#pi:
268 type: tosca.nodes.SiteRole
269 properties:
270 role: pi
271 siterole#tech:
272 type: tosca.nodes.SiteRole
273 properties:
274 role: tech
Scott Bakerafff3082018-07-16 17:23:26 -0700275
276# -----------------------------------------------------------------------------
277# Network Templates
278# -----------------------------------------------------------------------------
279 Private:
280 type: tosca.nodes.NetworkTemplate
281 properties:
282 name: Private
283 visibility: private
284 translation: none
285
286 Public shared IPv4:
287 type: tosca.nodes.NetworkTemplate
288 properties:
289 name: Public shared IPv4
290 visibility: private
291 translation: NAT
292 shared_network_name: nat-net
293
294 Public dedicated IPv4:
295 type: tosca.nodes.NetworkTemplate
296 properties:
297 name: Public dedicated IPv4
298 visibility: public
299 translation: none
300 shared_network_name: ext-net
301
302# -----------------------------------------------------------------------------
303# Deployment
304# -----------------------------------------------------------------------------
305 MyDeployment:
306 type: tosca.nodes.Deployment
307 properties:
308 name: MyDeployment
309{{- end -}}
310
311
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800312{{- define "seba-services.serviceGraphTosca" -}}
Scott Bakerafff3082018-07-16 17:23:26 -0700313tosca_definitions_version: tosca_simple_yaml_1_0
314imports:
315 - custom_types/fabricservice.yaml
316 - custom_types/onosservice.yaml
317 - custom_types/rcordservice.yaml
318 - custom_types/voltservice.yaml
319 - custom_types/fabriccrossconnectservice.yaml
320 - custom_types/servicedependency.yaml
321 - custom_types/servicegraphconstraint.yaml
Matteo Scandolo34dd2362018-12-12 15:16:25 -0800322description: seba service graph
Scott Bakerafff3082018-07-16 17:23:26 -0700323topology_template:
324 node_templates:
325
326# These services must be defined before loading the graph
327
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700328 service#onos:
Scott Bakerafff3082018-07-16 17:23:26 -0700329 type: tosca.nodes.ONOSService
330 properties:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700331 name: onos
Scott Bakerafff3082018-07-16 17:23:26 -0700332 must-exist: true
333
334 service#fabric:
335 type: tosca.nodes.FabricService
336 properties:
337 name: fabric
338 must-exist: true
339
340 service#rcord:
341 type: tosca.nodes.RCORDService
342 properties:
343 name: rcord
344 must-exist: true
345
346 service#volt:
347 type: tosca.nodes.VOLTService
348 properties:
349 name: volt
350 must-exist: true
351
352 service#fabric-crossconnect:
353 type: tosca.nodes.FabricCrossconnectService
354 properties:
355 name: fabric-crossconnect
356 must-exist: true
357
Scott Bakerafff3082018-07-16 17:23:26 -0700358 service_dependency#onos-fabric_fabric:
359 type: tosca.nodes.ServiceDependency
360 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700361 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700362 requirements:
363 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700364 node: service#fabric
Scott Bakerafff3082018-07-16 17:23:26 -0700365 relationship: tosca.relationships.BelongsToOne
366 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700367 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700368 relationship: tosca.relationships.BelongsToOne
369
370 service_dependency#rcord_volt:
371 type: tosca.nodes.ServiceDependency
372 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700373 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700374 requirements:
375 - subscriber_service:
376 node: service#rcord
377 relationship: tosca.relationships.BelongsToOne
378 - provider_service:
379 node: service#volt
380 relationship: tosca.relationships.BelongsToOne
381
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700382 service_dependency#onos_volt:
Scott Bakerafff3082018-07-16 17:23:26 -0700383 type: tosca.nodes.ServiceDependency
384 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700385 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700386 requirements:
387 - subscriber_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700388 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700389 relationship: tosca.relationships.BelongsToOne
390 - provider_service:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700391 node: service#volt
Scott Bakerafff3082018-07-16 17:23:26 -0700392 relationship: tosca.relationships.BelongsToOne
393
394 service_dependency#volt_fabric-crossconnect:
395 type: tosca.nodes.ServiceDependency
396 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700397 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700398 requirements:
399 - subscriber_service:
400 node: service#volt
401 relationship: tosca.relationships.BelongsToOne
402 - provider_service:
403 node: service#fabric-crossconnect
404 relationship: tosca.relationships.BelongsToOne
405
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700406 service_dependency#onos_fabric-crossconnect:
Scott Bakerafff3082018-07-16 17:23:26 -0700407 type: tosca.nodes.ServiceDependency
408 properties:
Matteo Scandolo7607b522018-08-09 17:03:58 -0700409 connect_method: none
Scott Bakerafff3082018-07-16 17:23:26 -0700410 requirements:
411 - subscriber_service:
412 node: service#fabric-crossconnect
413 relationship: tosca.relationships.BelongsToOne
414 - provider_service:
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700415 node: service#onos
Scott Bakerafff3082018-07-16 17:23:26 -0700416 relationship: tosca.relationships.BelongsToOne
417
418 constraints:
419 type: tosca.nodes.ServiceGraphConstraint
420 properties:
Matteo Scandolo83a4f1c2018-08-28 09:57:45 -0700421 constraints: '[[null, "rcord", null], [null, "volt", null], ["onos", "fabric-crossconnect", "att-workflow-driver"], ["fabric", null, null]]'
Scott Bakerafff3082018-07-16 17:23:26 -0700422{{- end -}}