Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 1 | {{/* vim: set filetype=mustache: */}} |
| 2 | {{/* |
| 3 | Copyright 2018-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | */}} |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 17 | |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 18 | {{- define "rcord-lite.onosTosca" -}} |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 19 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 20 | imports: |
| 21 | - custom_types/onosapp.yaml |
| 22 | - custom_types/onosservice.yaml |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 23 | - custom_types/serviceinstanceattribute.yaml |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 24 | description: ONOS service and app for fabric |
| 25 | topology_template: |
| 26 | node_templates: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 27 | service#ONOS: |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 28 | type: tosca.nodes.ONOSService |
| 29 | properties: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 30 | name: ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 31 | kind: data |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 32 | rest_hostname: {{ .onosRestService | quote }} |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 33 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 42 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 43 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 52 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 53 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 62 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 63 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 72 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 73 | relationship: tosca.relationships.BelongsToOne |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 74 | |
| 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 82 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 83 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 92 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 93 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 104 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 105 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 117 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 118 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 129 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 130 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 142 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 143 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 155 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 156 | 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 Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 168 | node: service#ONOS |
Jonathan Hart | 9f638ff | 2018-08-22 18:19:15 -0700 | [diff] [blame] | 169 | 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 Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 254 | {{- define "rcord-lite.basicFixturesTosca" -}} |
| 255 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 256 | description: Some basic fixtures |
| 257 | imports: |
| 258 | - custom_types/siterole.yaml |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 259 | - custom_types/deployment.yaml |
| 260 | topology_template: |
| 261 | node_templates: |
| 262 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 263 | # ---------------------------------------------------------------------------- |
| 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 Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 278 | |
| 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" -}} |
| 290 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 291 | imports: |
| 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 |
| 300 | description: rcord-lite service graph |
| 301 | topology_template: |
| 302 | node_templates: |
| 303 | |
| 304 | # These services must be defined before loading the graph |
| 305 | |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 306 | service#ONOS: |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 307 | type: tosca.nodes.ONOSService |
| 308 | properties: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 309 | name: ONOS |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 310 | must-exist: true |
| 311 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 312 | 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 Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 347 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 348 | requirements: |
| 349 | - subscriber_service: |
Scott Baker | e9ae048 | 2018-08-16 15:42:05 -0700 | [diff] [blame] | 350 | node: service#fabric |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 351 | relationship: tosca.relationships.BelongsToOne |
| 352 | - provider_service: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 353 | node: service#ONOS |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 354 | relationship: tosca.relationships.BelongsToOne |
| 355 | |
| 356 | service_dependency#rcord_volt: |
| 357 | type: tosca.nodes.ServiceDependency |
| 358 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 359 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 360 | 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 Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 368 | service_dependency#onos_voltha_volt: |
| 369 | type: tosca.nodes.ServiceDependency |
| 370 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 371 | connect_method: none |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 372 | requirements: |
| 373 | - subscriber_service: |
| 374 | node: service#volt |
| 375 | relationship: tosca.relationships.BelongsToOne |
| 376 | - provider_service: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 377 | node: service#ONOS |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 378 | relationship: tosca.relationships.BelongsToOne |
| 379 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 380 | service_dependency#fabric_vrouter: |
| 381 | type: tosca.nodes.ServiceDependency |
| 382 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 383 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 384 | requirements: |
| 385 | - subscriber_service: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 386 | node: service#vrouter |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 387 | relationship: tosca.relationships.BelongsToOne |
| 388 | - provider_service: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 389 | node: service#fabric |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 390 | relationship: tosca.relationships.BelongsToOne |
| 391 | |
| 392 | service_dependency#volt_vsg-hw: |
| 393 | type: tosca.nodes.ServiceDependency |
| 394 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 395 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 396 | 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 Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 407 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 408 | requirements: |
| 409 | - subscriber_service: |
| 410 | node: service#vsg-hw |
| 411 | relationship: tosca.relationships.BelongsToOne |
| 412 | - provider_service: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 413 | node: service#ONOS |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 414 | relationship: tosca.relationships.BelongsToOne |
| 415 | |
| 416 | constraints: |
| 417 | type: tosca.nodes.ServiceGraphConstraint |
| 418 | properties: |
Matteo Scandolo | ec17b5a | 2018-08-29 14:58:05 -0700 | [diff] [blame] | 419 | constraints: '[[null, "rcord"], [null, "volt"], ["ONOS", "vsg-hw"], ["fabric", null], ["vrouter", null]]' |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 420 | {{- end -}} |