blob: f1c9e1070cd3ea37eb803ef3c8928b06fac43345 [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
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070018{{- define "rcord-lite.onosTosca" -}}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070019tosca_definitions_version: tosca_simple_yaml_1_0
20imports:
21 - custom_types/onosapp.yaml
22 - custom_types/onosservice.yaml
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070023 - custom_types/serviceinstanceattribute.yaml
Jonathan Hart9f638ff2018-08-22 18:19:15 -070024description: ONOS service and app for fabric
25topology_template:
26 node_templates:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070027 service#ONOS:
Jonathan Hart9f638ff2018-08-22 18:19:15 -070028 type: tosca.nodes.ONOSService
29 properties:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070030 name: ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070031 kind: data
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070032 rest_hostname: {{ .onosRestService | quote }}
Jonathan Hart9f638ff2018-08-22 18:19:15 -070033 rest_port: 8181
34
35 onos_app#segmentrouting:
36 type: tosca.nodes.ONOSApp
37 properties:
38 name: org.onosproject.segmentrouting
39 app_id: org.onosproject.segmentrouting
40 requirements:
41 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070042 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070043 relationship: tosca.relationships.BelongsToOne
44
45 onos_app#vrouter:
46 type: tosca.nodes.ONOSApp
47 properties:
48 name: org.onosproject.vrouter
49 app_id: org.onosproject.vrouter
50 requirements:
51 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070052 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070053 relationship: tosca.relationships.BelongsToOne
54
55 onos_app#netcfghostprovider:
56 type: tosca.nodes.ONOSApp
57 properties:
58 name: org.onosproject.netcfghostprovider
59 app_id: org.onosproject.netcfghostprovider
60 requirements:
61 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070062 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070063 relationship: tosca.relationships.BelongsToOne
64
65 onos_app#openflow:
66 type: tosca.nodes.ONOSApp
67 properties:
68 name: org.onosproject.openflow
69 app_id: org.onosproject.openflow
70 requirements:
71 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070072 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070073 relationship: tosca.relationships.BelongsToOne
Jonathan Hart9f638ff2018-08-22 18:19:15 -070074
75 onos_app#openflow-base:
76 type: tosca.nodes.ONOSApp
77 properties:
78 name: openflow-base
79 app_id: org.onosproject.openflow-base
80 requirements:
81 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070082 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070083 relationship: tosca.relationships.BelongsToOne
84
85 onos_app#hostprovider:
86 type: tosca.nodes.ONOSApp
87 properties:
88 name: hostprovider
89 app_id: org.onosproject.hostprovider
90 requirements:
91 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -070092 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -070093 relationship: tosca.relationships.BelongsToOne
94
95 onos_app#cord-config:
96 type: tosca.nodes.ONOSApp
97 properties:
98 name: cord-config
99 app_id: org.opencord.config
100 url: {{ .cordConfigAppURL }}
101 version: 1.4.0
102 requirements:
103 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700104 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700105 relationship: tosca.relationships.BelongsToOne
106
107 onos_app#olt:
108 type: tosca.nodes.ONOSApp
109 properties:
110 name: olt
111 app_id: org.opencord.olt
112 url: {{ .oltAppUrl }}
113 version: 2.0.0.SNAPSHOT
114 dependencies: org.opencord.config
115 requirements:
116 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700117 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700118 relationship: tosca.relationships.BelongsToOne
119
120 onos_app#sadis:
121 type: tosca.nodes.ONOSApp
122 properties:
123 name: sadis
124 app_id: org.opencord.sadis
125 url: {{ .sadisAppUrl }}
126 version: 2.1.0
127 requirements:
128 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700129 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700130 relationship: tosca.relationships.BelongsToOne
131
132 onos_app#dhcpl2relay:
133 type: tosca.nodes.ONOSApp
134 properties:
135 name: dhcpl2relay
136 app_id: org.opencord.dhcpl2relay
137 url: {{ .dhcpl2relayAppUrl }}
138 version: 1.5.0.SNAPSHOT
139 dependencies: org.opencord.sadis
140 requirements:
141 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700142 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700143 relationship: tosca.relationships.BelongsToOne
144
145 onos_app#aaa:
146 type: tosca.nodes.ONOSApp
147 properties:
148 name: aaa
149 app_id: org.opencord.aaa
150 url: {{ .aaaAppUrl }}
151 version: 1.8.0.SNAPSHOT
152 dependencies: org.opencord.sadis
153 requirements:
154 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700155 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700156 relationship: tosca.relationships.BelongsToOne
157
158 onos_app#kafka:
159 type: tosca.nodes.ONOSApp
160 properties:
161 name: kafka
162 app_id: org.opencord.kafka
163 url: {{ .kafkaAppUrl }}
164 version: 1.0.0.SNAPSHOT
165 dependencies: org.opencord.olt,org.opencord.aaa,org.opencord.dhcpl2relay
166 requirements:
167 - owner:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700168 node: service#ONOS
Jonathan Hart9f638ff2018-08-22 18:19:15 -0700169 relationship: tosca.relationships.BelongsToOne
170
171 # CORD-Configuration
172 cord-config-attr:
173 type: tosca.nodes.ServiceInstanceAttribute
174 properties:
175 name: /onos/v1/network/configuration/apps/org.opencord.kafka
176 value: >
177 {
178 "kafka" : {
179 "bootstrapServers" : {{ .kafkaService | quote }}
180 }
181 }
182 requirements:
183 - service_instance:
184 node: onos_app#olt
185 relationship: tosca.relationships.BelongsToOne
186
187 olt-config-attr:
188 type: tosca.nodes.ServiceInstanceAttribute
189 properties:
190 name: /onos/v1/configuration/org.opencord.olt.impl.Olt?preset=true
191 value: >
192 {
193 "enableDhcpOnProvisioning" : true
194 }
195 requirements:
196 - service_instance:
197 node: onos_app#olt
198 relationship: tosca.relationships.BelongsToOne
199
200 dhcpl2relay-config-attr:
201 type: tosca.nodes.ServiceInstanceAttribute
202 properties:
203 name: /onos/v1/network/configuration/apps/org.opencord.dhcpl2relay
204 value: >
205 {
206 "dhcpl2relay" : {
207 "useOltUplinkForServerPktInOut" : true
208 }
209 }
210 requirements:
211 - service_instance:
212 node: onos_app#dhcpl2relay
213 relationship: tosca.relationships.BelongsToOne
214
215 aaa-config-attr:
216 type: tosca.nodes.ServiceInstanceAttribute
217 properties:
218 name: /onos/v1/network/configuration/apps/org.opencord.aaa
219 value: >
220 {
221 "AAA" : {
222 "radiusConnectionType" : "socket",
223 "radiusHost" : "freeradius.voltha.svc.cluster.local",
224 "radiusServerPort" : "1812",
225 "radiusSecret" : "SECRET"
226 }
227 }
228 requirements:
229 - service_instance:
230 node: onos_app#aaa
231 relationship: tosca.relationships.BelongsToOne
232
233 sadis-config-attr:
234 type: tosca.nodes.ServiceInstanceAttribute
235 properties:
236 name: /onos/v1/network/configuration/apps/org.opencord.sadis
237 value: >
238 {
239 "sadis" : {
240 "integration" : {
241 "cache" : {
242 "maxsize" : 1000
243 },
244 "url" : "http://sadis-service:8000/subscriber/%s"
245 }
246 }
247 }
248 requirements:
249 - service_instance:
250 node: onos_app#sadis
251 relationship: tosca.relationships.BelongsToOne
252{{- end -}}
253
Andy Baviere3023282018-05-12 06:35:13 -0700254{{- define "rcord-lite.basicFixturesTosca" -}}
255tosca_definitions_version: tosca_simple_yaml_1_0
256description: Some basic fixtures
257imports:
258 - custom_types/siterole.yaml
Andy Baviere3023282018-05-12 06:35:13 -0700259 - custom_types/deployment.yaml
260topology_template:
261 node_templates:
262
Andy Baviere3023282018-05-12 06:35:13 -0700263# ----------------------------------------------------------------------------
264# Roles
265# ----------------------------------------------------------------------------
266 siterole#admin:
267 type: tosca.nodes.SiteRole
268 properties:
269 role: admin
270 siterole#pi:
271 type: tosca.nodes.SiteRole
272 properties:
273 role: pi
274 siterole#tech:
275 type: tosca.nodes.SiteRole
276 properties:
277 role: tech
Andy Baviere3023282018-05-12 06:35:13 -0700278
279# -----------------------------------------------------------------------------
280# Deployment
281# -----------------------------------------------------------------------------
282 MyDeployment:
283 type: tosca.nodes.Deployment
284 properties:
285 name: MyDeployment
286{{- end -}}
287
288
289{{- define "rcord-lite.serviceGraphTosca" -}}
290tosca_definitions_version: tosca_simple_yaml_1_0
291imports:
292 - custom_types/fabricservice.yaml
293 - custom_types/onosservice.yaml
294 - custom_types/rcordservice.yaml
295 - custom_types/vrouterservice.yaml
296 - custom_types/voltservice.yaml
297 - custom_types/vsghwservice.yaml
298 - custom_types/servicedependency.yaml
299 - custom_types/servicegraphconstraint.yaml
300description: rcord-lite service graph
301topology_template:
302 node_templates:
303
304# These services must be defined before loading the graph
305
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700306 service#ONOS:
Andy Baviere3023282018-05-12 06:35:13 -0700307 type: tosca.nodes.ONOSService
308 properties:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700309 name: ONOS
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700310 must-exist: true
311
Andy Baviere3023282018-05-12 06:35:13 -0700312 service#fabric:
313 type: tosca.nodes.FabricService
314 properties:
315 name: fabric
316 must-exist: true
317
318 service#rcord:
319 type: tosca.nodes.RCORDService
320 properties:
321 name: rcord
322 must-exist: true
323
324 service#vrouter:
325 type: tosca.nodes.VRouterService
326 properties:
327 name: vrouter
328 must-exist: true
329
330 service#volt:
331 type: tosca.nodes.VOLTService
332 properties:
333 name: volt
334 must-exist: true
335
336 service#vsg-hw:
337 type: tosca.nodes.VSGHWService
338 properties:
339 name: vsg-hw
340 must-exist: true
341
342# The rcord-lite service graph
343
344 service_dependency#onos-fabric_fabric:
345 type: tosca.nodes.ServiceDependency
346 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700347 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700348 requirements:
349 - subscriber_service:
Scott Bakere9ae0482018-08-16 15:42:05 -0700350 node: service#fabric
Andy Baviere3023282018-05-12 06:35:13 -0700351 relationship: tosca.relationships.BelongsToOne
352 - provider_service:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700353 node: service#ONOS
Andy Baviere3023282018-05-12 06:35:13 -0700354 relationship: tosca.relationships.BelongsToOne
355
356 service_dependency#rcord_volt:
357 type: tosca.nodes.ServiceDependency
358 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700359 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700360 requirements:
361 - subscriber_service:
362 node: service#rcord
363 relationship: tosca.relationships.BelongsToOne
364 - provider_service:
365 node: service#volt
366 relationship: tosca.relationships.BelongsToOne
367
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700368 service_dependency#onos_voltha_volt:
369 type: tosca.nodes.ServiceDependency
370 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700371 connect_method: none
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700372 requirements:
373 - subscriber_service:
374 node: service#volt
375 relationship: tosca.relationships.BelongsToOne
376 - provider_service:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700377 node: service#ONOS
Matteo Scandoloa772b3c2018-06-11 17:38:42 -0700378 relationship: tosca.relationships.BelongsToOne
379
Andy Baviere3023282018-05-12 06:35:13 -0700380 service_dependency#fabric_vrouter:
381 type: tosca.nodes.ServiceDependency
382 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700383 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700384 requirements:
385 - subscriber_service:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700386 node: service#vrouter
Andy Baviere3023282018-05-12 06:35:13 -0700387 relationship: tosca.relationships.BelongsToOne
388 - provider_service:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700389 node: service#fabric
Andy Baviere3023282018-05-12 06:35:13 -0700390 relationship: tosca.relationships.BelongsToOne
391
392 service_dependency#volt_vsg-hw:
393 type: tosca.nodes.ServiceDependency
394 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700395 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700396 requirements:
397 - subscriber_service:
398 node: service#volt
399 relationship: tosca.relationships.BelongsToOne
400 - provider_service:
401 node: service#vsg-hw
402 relationship: tosca.relationships.BelongsToOne
403
404 service_dependency#onos_fabric_vsg-hw:
405 type: tosca.nodes.ServiceDependency
406 properties:
Matteo Scandolo6a07ee72018-08-07 11:00:16 -0700407 connect_method: none
Andy Baviere3023282018-05-12 06:35:13 -0700408 requirements:
409 - subscriber_service:
410 node: service#vsg-hw
411 relationship: tosca.relationships.BelongsToOne
412 - provider_service:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700413 node: service#ONOS
Andy Baviere3023282018-05-12 06:35:13 -0700414 relationship: tosca.relationships.BelongsToOne
415
416 constraints:
417 type: tosca.nodes.ServiceGraphConstraint
418 properties:
Matteo Scandoloec17b5a2018-08-29 14:58:05 -0700419 constraints: '[[null, "rcord"], [null, "volt"], ["ONOS", "vsg-hw"], ["fabric", null], ["vrouter", null]]'
Andy Baviere3023282018-05-12 06:35:13 -0700420{{- end -}}