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 | |
| 18 | {{- define "rcord-lite.fabricAppTosca" -}} |
| 19 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 20 | imports: |
| 21 | - custom_types/onosapp.yaml |
| 22 | - custom_types/onosservice.yaml |
| 23 | description: ONOS service and app for fabric |
| 24 | topology_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" -}} |
| 76 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 77 | |
| 78 | imports: |
| 79 | - custom_types/onosapp.yaml |
| 80 | - custom_types/onosservice.yaml |
| 81 | - custom_types/serviceinstanceattribute.yaml |
| 82 | |
| 83 | description: Configures the VOLTHA ONOS service |
| 84 | |
| 85 | topology_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 Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 275 | {{- define "rcord-lite.basicFixturesTosca" -}} |
| 276 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 277 | description: Some basic fixtures |
| 278 | imports: |
| 279 | - custom_types/siterole.yaml |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 280 | - custom_types/deployment.yaml |
| 281 | topology_template: |
| 282 | node_templates: |
| 283 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 284 | # ---------------------------------------------------------------------------- |
| 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 Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 299 | |
| 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" -}} |
| 311 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 312 | imports: |
| 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 |
| 321 | description: rcord-lite service graph |
| 322 | topology_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 Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 333 | service#ONOS_VOLTHA: |
| 334 | type: tosca.nodes.ONOSService |
| 335 | properties: |
| 336 | name: ONOS_VOLTHA |
| 337 | must-exist: true |
| 338 | |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 339 | 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 Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 374 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 375 | requirements: |
| 376 | - subscriber_service: |
Scott Baker | e9ae048 | 2018-08-16 15:42:05 -0700 | [diff] [blame] | 377 | node: service#fabric |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 378 | relationship: tosca.relationships.BelongsToOne |
| 379 | - provider_service: |
Scott Baker | e9ae048 | 2018-08-16 15:42:05 -0700 | [diff] [blame] | 380 | node: service#ONOS_Fabric |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 381 | relationship: tosca.relationships.BelongsToOne |
| 382 | |
| 383 | service_dependency#rcord_volt: |
| 384 | type: tosca.nodes.ServiceDependency |
| 385 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 386 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 387 | 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 Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 395 | service_dependency#onos_voltha_volt: |
| 396 | type: tosca.nodes.ServiceDependency |
| 397 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 398 | connect_method: none |
Matteo Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 399 | 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 Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 407 | service_dependency#fabric_vrouter: |
| 408 | type: tosca.nodes.ServiceDependency |
| 409 | properties: |
Matteo Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 410 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 411 | 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 Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 422 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 423 | 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 Scandolo | 6a07ee7 | 2018-08-07 11:00:16 -0700 | [diff] [blame] | 434 | connect_method: none |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 435 | 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 Scandolo | a772b3c | 2018-06-11 17:38:42 -0700 | [diff] [blame] | 446 | constraints: '[[null, "rcord"], ["ONOS_VOLTHA", "volt"], ["ONOS_Fabric", "vsg-hw"], ["fabric", null], ["vrouter", null]]' |
Andy Bavier | e302328 | 2018-05-12 06:35:13 -0700 | [diff] [blame] | 447 | {{- end -}} |