Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 1 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 2 | |
| 3 | description: Setup CORD-related services -- vOLT, vCPE, vBNG. |
| 4 | |
| 5 | imports: |
| 6 | - custom_types/xos.yaml |
| 7 | |
| 8 | topology_template: |
| 9 | node_templates: |
| 10 | |
| 11 | addresses_vsg: |
| 12 | type: tosca.nodes.AddressPool |
| 13 | properties: |
| 14 | addresses: 10.168.0.0/24 |
| 15 | gateway_ip: 10.168.0.1 |
| 16 | gateway_mac: 02:42:0a:a8:00:01 |
| 17 | |
| 18 | addresses_exampleservice-public: |
| 19 | type: tosca.nodes.AddressPool |
| 20 | properties: |
| 21 | addresses: 10.168.1.0/24 |
| 22 | gateway_ip: 10.168.1.1 |
| 23 | gateway_mac: 02:42:0a:a8:00:01 |
| 24 | |
| 25 | # CORD Services |
| 26 | service_volt: |
| 27 | type: tosca.nodes.Service |
| 28 | requirements: |
| 29 | - vcpe_tenant: |
| 30 | node: service_vsg |
| 31 | relationship: tosca.relationships.TenantOfService |
| 32 | - lan_network: |
| 33 | node: lan_network |
| 34 | relationship: tosca.relationships.UsesNetwork |
| 35 | - wan_network: |
| 36 | node: wan_network |
| 37 | relationship: tosca.relationships.UsesNetwork |
| 38 | properties: |
| 39 | view_url: /admin/cord/voltservice/$id$/ |
| 40 | kind: vOLT |
| 41 | |
| 42 | service_vrouter: |
| 43 | type: tosca.nodes.VRouterService |
| 44 | properties: |
| 45 | view_url: /admin/vrouter/vrouterservice/$id$/ |
| 46 | requirements: |
| 47 | - addresses_vsg: |
| 48 | node: addresses_vsg |
| 49 | relationship: tosca.relationships.ProvidesAddresses |
| 50 | - addresses_service1: |
| 51 | node: addresses_exampleservice-public |
| 52 | relationship: tosca.relationships.ProvidesAddresses |
| 53 | |
| 54 | service_vsg: |
| 55 | type: tosca.nodes.VSGService |
| 56 | requirements: |
| 57 | - vrouter_tenant: |
| 58 | node: service_vrouter |
| 59 | relationship: tosca.relationships.TenantOfService |
| 60 | properties: |
| 61 | view_url: /admin/cord/vsgservice/$id$/ |
| 62 | backend_network_label: hpc_client |
| 63 | #public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] } |
| 64 | #private_key_fn: /opt/xos/synchronizers/vcpe/vcpe_private_key |
| 65 | #artifacts: |
| 66 | #pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key |
| 67 | |
| 68 | service_vbng: |
| 69 | type: tosca.nodes.VBNGService |
| 70 | properties: |
| 71 | view_url: /admin/cord/vbngservice/$id$/ |
| 72 | # if unspecified, vbng observer will look for an ONOSApp Tenant and |
| 73 | # generate a URL from its IP address |
| 74 | # vbng_url: http://10.11.10.24:8181/onos/virtualbng/ |
| 75 | |
| 76 | service_ONOS_vBNG: |
| 77 | type: tosca.nodes.ONOSService |
| 78 | requirements: |
| 79 | properties: |
| 80 | kind: onos |
| 81 | view_url: /admin/onos/onosservice/$id$/ |
| 82 | #public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] } |
| 83 | #artifacts: |
| 84 | #pubkey: /opt/xos/synchronizers/onos/onos_key.pub |
| 85 | |
| 86 | # |
| 87 | # To actually bring up the vBNG app |
| 88 | # - Set up the dataplane using the ansible script |
| 89 | # - Log into the vBNG ONOS and run 'devices' to get switch dpID |
| 90 | # - Change the dpID values in vBNG ONOS app in XOS GUI |
| 91 | # - (Synchronizer should copy the files to ONOS container immediately) |
| 92 | # - Log into service_ONOS_vBNG VM and restart ONOS Docker container |
| 93 | # (Should roll this step into a Synchronizer) |
| 94 | #f |
| 95 | vBNG_ONOS_app: |
| 96 | type: tosca.nodes.ONOSvBNGApp |
| 97 | requirements: |
| 98 | - onos_tenant: |
| 99 | node: service_ONOS_vBNG |
| 100 | relationship: tosca.relationships.TenantOfService |
| 101 | - vbng_service: |
| 102 | node: service_vbng |
| 103 | relationship: tosca.relationships.UsedByService |
| 104 | properties: |
| 105 | dependencies: org.onosproject.proxyarp, org.onosproject.virtualbng, org.onosproject.openflow, org.onosproject.fwd |
| 106 | config_network-cfg.json: > |
| 107 | { |
| 108 | "ports" : { |
| 109 | "of:0000000000000001/1" : { |
| 110 | "interfaces" : [ |
| 111 | { |
| 112 | "ips" : [ "10.0.1.253/24" ], |
| 113 | "mac" : "00:00:00:00:00:99" |
| 114 | } |
| 115 | ] |
| 116 | }, |
| 117 | "of:0000000000000001/2" : { |
| 118 | "interfaces" : [ |
| 119 | { |
| 120 | "ips" : [ "10.254.0.2/24" ], |
| 121 | "mac" : "00:00:00:00:00:98" |
| 122 | } |
| 123 | ] |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | #config_virtualbng.json: { get_artifact: [ SELF, virtualbng_json, LOCAL_FILE] } |
| 128 | #artifacts: |
| 129 | #virtualbng_json: /root/setup/virtualbng.json |
| 130 | |
| 131 | service_ONOS_vOLT: |
| 132 | type: tosca.nodes.ONOSService |
| 133 | requirements: |
| 134 | properties: |
| 135 | kind: onos |
| 136 | view_url: /admin/onos/onosservice/$id$/ |
| 137 | #public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] } |
| 138 | rest_onos/v1/network/configuration/: > |
| 139 | { |
| 140 | "devices" : { |
| 141 | "of:0000000000000001" : { |
| 142 | "accessDevice" : { |
| 143 | "uplink" : "2", |
| 144 | "vlan" : "222", |
| 145 | "defaultVlan" : "1" |
| 146 | }, |
| 147 | "basic" : { |
| 148 | "driver" : "pmc-olt" |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | #artifacts: |
| 154 | #pubkey: /opt/xos/synchronizers/onos/onos_key.pub |
| 155 | |
| 156 | |
| 157 | vOLT_ONOS_app: |
| 158 | type: tosca.nodes.ONOSvOLTApp |
| 159 | requirements: |
| 160 | - onos_tenant: |
| 161 | node: service_ONOS_vOLT |
| 162 | relationship: tosca.relationships.TenantOfService |
| 163 | - volt_service: |
| 164 | node: service_volt |
| 165 | relationship: tosca.relationships.UsedByService |
| 166 | properties: |
| 167 | install_dependencies: onos-ext-notifier-1.0-SNAPSHOT.oar, onos-ext-volt-event-publisher-1.0-SNAPSHOT.oar |
| 168 | dependencies: org.onosproject.openflow-base, org.onosproject.olt, org.ciena.onos.ext_notifier, org.ciena.onos.volt_event_publisher |
| 169 | component_config: > |
| 170 | { |
| 171 | "org.ciena.onos.ext_notifier.KafkaNotificationBridge":{ |
| 172 | "rabbit.user": "<rabbit_user>", |
| 173 | "rabbit.password": "<rabbit_password>", |
| 174 | "rabbit.host": "<rabbit_host>", |
| 175 | "publish.rabbit": "true", |
| 176 | "volt.events.rabbit.topic": "notifications.info", |
| 177 | "volt.events.rabbit.exchange": "voltlistener", |
| 178 | "volt.events.opaque.info": "{project_id: <keystone_tenant_id>, user_id: <keystone_user_id>}", |
| 179 | "publish.volt.events": "true" |
| 180 | } |
| 181 | } |
| 182 | # config_network-cfg.json: > |
| 183 | # { |
| 184 | # "devices" : { |
| 185 | # "of:0000000000000001" : { |
| 186 | # "accessDevice" : { |
| 187 | # "uplink" : "2", |
| 188 | # "vlan" : "222", |
| 189 | # "defaultVlan" : "1" |
| 190 | # }, |
| 191 | # "basic" : { |
| 192 | # "driver" : "default" |
| 193 | # } |
| 194 | # } |
| 195 | # } |
| 196 | # } |
| 197 | |
| 198 | # Network templates |
| 199 | Private: |
| 200 | type: tosca.nodes.NetworkTemplate |
| 201 | |
| 202 | Public network hack: |
| 203 | type: tosca.nodes.NetworkTemplate |
| 204 | properties: |
| 205 | visibility: private |
| 206 | translation: NAT |
| 207 | shared_network_name: tun0-net |
| 208 | |
| 209 | |
| 210 | # Networks required by the CORD setup |
| 211 | lan_network: |
| 212 | type: tosca.nodes.network.Network |
| 213 | properties: |
| 214 | ip_version: 4 |
| 215 | requirements: |
| 216 | - network_template: |
| 217 | node: Private |
| 218 | relationship: tosca.relationships.UsesNetworkTemplate |
| 219 | - owner: |
| 220 | node: mysite_vcpe |
| 221 | relationship: tosca.relationships.MemberOfSlice |
| 222 | - connection: |
| 223 | node: mysite_vcpe |
| 224 | relationship: tosca.relationships.ConnectsToSlice |
| 225 | - connection: |
| 226 | node: mysite_volt |
| 227 | relationship: tosca.relationships.ConnectsToSlice |
| 228 | |
| 229 | wan_network: |
| 230 | type: tosca.nodes.network.Network |
| 231 | properties: |
| 232 | ip_version: 4 |
| 233 | requirements: |
| 234 | - network_template: |
| 235 | node: Private |
| 236 | relationship: tosca.relationships.UsesNetworkTemplate |
| 237 | - owner: |
| 238 | node: mysite_vcpe |
| 239 | relationship: tosca.relationships.MemberOfSlice |
| 240 | - connection: |
| 241 | node: mysite_vcpe |
| 242 | relationship: tosca.relationships.ConnectsToSlice |
| 243 | - connection: |
| 244 | node: mysite_vbng |
| 245 | relationship: tosca.relationships.ConnectsToSlice |
| 246 | |
| 247 | Private-Direct: |
| 248 | type: tosca.nodes.NetworkTemplate |
| 249 | properties: |
| 250 | access: direct |
| 251 | |
| 252 | Private-Indirect: |
| 253 | type: tosca.nodes.NetworkTemplate |
| 254 | properties: |
| 255 | access: indirect |
| 256 | |
| 257 | subscriber_network: |
| 258 | type: tosca.nodes.network.Network |
| 259 | properties: |
| 260 | ip_version: 4 |
| 261 | requirements: |
| 262 | - network_template: |
| 263 | node: Private |
| 264 | relationship: tosca.relationships.UsesNetworkTemplate |
| 265 | - owner: |
| 266 | node: mysite_volt |
| 267 | relationship: tosca.relationships.MemberOfSlice |
| 268 | - connection: |
| 269 | node: mysite_volt |
| 270 | relationship: tosca.relationships.ConnectsToSlice |
| 271 | - connection: |
| 272 | node: mysite_clients |
| 273 | relationship: tosca.relationships.ConnectsToSlice |
| 274 | |
| 275 | public_network: |
| 276 | type: tosca.nodes.network.Network |
| 277 | properties: |
| 278 | requirements: |
| 279 | - network_template: |
| 280 | node: Public network hack |
| 281 | relationship: tosca.relationships.UsesNetworkTemplate |
| 282 | - owner: |
| 283 | node: mysite_vbng |
| 284 | relationship: tosca.relationships.MemberOfSlice |
| 285 | - connection: |
| 286 | node: mysite_vbng |
| 287 | relationship: tosca.relationships.ConnectsToSlice |
| 288 | |
| 289 | |
| 290 | mysite: |
| 291 | type: tosca.nodes.Site |
| 292 | |
| 293 | |
| 294 | # CORD Slices |
| 295 | mysite_vcpe: |
| 296 | description: vCPE Controller Slice |
| 297 | type: tosca.nodes.Slice |
| 298 | requirements: |
| 299 | - vcpe_service: |
| 300 | node: service_vsg |
| 301 | relationship: tosca.relationships.MemberOfService |
| 302 | - site: |
| 303 | node: mysite |
| 304 | relationship: tosca.relationships.MemberOfSite |
| 305 | - vcpe_docker_image: |
| 306 | node: docker-vcpe |
| 307 | relationship: tosca.relationships.UsesImage |
| 308 | # properties: |
| 309 | # default_isolation: container |
| 310 | |
| 311 | mysite_onos_vbng: |
| 312 | description: ONOS Controller Slice for vBNG |
| 313 | type: tosca.nodes.Slice |
| 314 | requirements: |
| 315 | - ONOS: |
| 316 | node: service_ONOS_vBNG |
| 317 | relationship: tosca.relationships.MemberOfService |
| 318 | - site: |
| 319 | node: mysite |
| 320 | relationship: tosca.relationships.MemberOfSite |
| 321 | |
| 322 | mysite_onos_volt: |
| 323 | description: ONOS Controller Slice for vOLT |
| 324 | type: tosca.nodes.Slice |
| 325 | requirements: |
| 326 | - ONOS: |
| 327 | node: service_ONOS_vOLT |
| 328 | relationship: tosca.relationships.MemberOfService |
| 329 | - site: |
| 330 | node: mysite |
| 331 | relationship: tosca.relationships.MemberOfSite |
| 332 | |
| 333 | mysite_vbng: |
| 334 | description: slice running OVS controlled by vBNG |
| 335 | type: tosca.nodes.Slice |
| 336 | requirements: |
| 337 | - site: |
| 338 | node: mysite |
| 339 | relationship: tosca.relationships.MemberOfSite |
| 340 | |
| 341 | mysite_volt: |
| 342 | description: OVS controlled by vOLT |
| 343 | type: tosca.nodes.Slice |
| 344 | requirements: |
| 345 | - site: |
| 346 | node: mysite |
| 347 | relationship: tosca.relationships.MemberOfSite |
| 348 | |
| 349 | mysite_clients: |
| 350 | description: slice for clients at the subscriber |
| 351 | type: tosca.nodes.Slice |
| 352 | requirements: |
| 353 | - site: |
| 354 | node: mysite |
| 355 | relationship: tosca.relationships.MemberOfSite |
| 356 | |
| 357 | |
| 358 | # Virtual machines |
| 359 | onos_app_1: |
| 360 | type: tosca.nodes.Compute |
| 361 | capabilities: |
| 362 | # Host container properties |
| 363 | host: |
| 364 | properties: |
| 365 | num_cpus: 1 |
| 366 | disk_size: 10 GB |
| 367 | mem_size: 4 MB |
| 368 | # Guest Operating System properties |
| 369 | os: |
| 370 | properties: |
| 371 | # host Operating System image properties |
| 372 | architecture: x86_64 |
| 373 | type: linux |
| 374 | distribution: Ubuntu |
| 375 | version: 14.10 |
| 376 | requirements: |
| 377 | - slice: |
| 378 | node: mysite_onos_vbng |
| 379 | relationship: tosca.relationships.MemberOfSlice |
| 380 | |
| 381 | onos_app_2: |
| 382 | type: tosca.nodes.Compute |
| 383 | capabilities: |
| 384 | # Host container properties |
| 385 | host: |
| 386 | properties: |
| 387 | num_cpus: 1 |
| 388 | disk_size: 10 GB |
| 389 | mem_size: 4 MB |
| 390 | # Guest Operating System properties |
| 391 | os: |
| 392 | properties: |
| 393 | # host Operating System image properties |
| 394 | architecture: x86_64 |
| 395 | type: linux |
| 396 | distribution: Ubuntu |
| 397 | version: 14.10 |
| 398 | requirements: |
| 399 | - slice: |
| 400 | node: mysite_onos_volt |
| 401 | relationship: tosca.relationships.MemberOfSlice |
| 402 | |
| 403 | # VM for running the OVS controlled by vBNG |
| 404 | ovs_vbng: |
| 405 | type: tosca.nodes.Compute |
| 406 | capabilities: |
| 407 | # Host container properties |
| 408 | host: |
| 409 | properties: |
| 410 | num_cpus: 1 |
| 411 | disk_size: 10 GB |
| 412 | mem_size: 4 MB |
| 413 | # Guest Operating System properties |
| 414 | os: |
| 415 | properties: |
| 416 | # host Operating System image properties |
| 417 | architecture: x86_64 |
| 418 | type: linux |
| 419 | distribution: ubuntu |
| 420 | version: 14.04 |
| 421 | requirements: |
| 422 | - slice: |
| 423 | node: mysite_vbng |
| 424 | relationship: tosca.relationships.MemberOfSlice |
| 425 | |
| 426 | # VM for running the OVS controlled by vOLT |
| 427 | ovs_volt: |
| 428 | type: tosca.nodes.Compute |
| 429 | capabilities: |
| 430 | # Host container properties |
| 431 | host: |
| 432 | properties: |
| 433 | num_cpus: 1 |
| 434 | disk_size: 10 GB |
| 435 | mem_size: 4 MB |
| 436 | # Guest Operating System properties |
| 437 | os: |
| 438 | properties: |
| 439 | # host Operating System image properties |
| 440 | architecture: x86_64 |
| 441 | type: linux |
| 442 | distribution: ubuntu |
| 443 | version: 14.04 |
| 444 | requirements: |
| 445 | - slice: |
| 446 | node: mysite_volt |
| 447 | relationship: tosca.relationships.MemberOfSlice |
| 448 | |
| 449 | # A subscriber client VM |
| 450 | client1: |
| 451 | type: tosca.nodes.Compute |
| 452 | capabilities: |
| 453 | # Host container properties |
| 454 | host: |
| 455 | properties: |
| 456 | num_cpus: 1 |
| 457 | disk_size: 10 GB |
| 458 | mem_size: 4 MB |
| 459 | # Guest Operating System properties |
| 460 | os: |
| 461 | properties: |
| 462 | # host Operating System image properties |
| 463 | architecture: x86_64 |
| 464 | type: linux |
| 465 | distribution: ubuntu |
| 466 | version: 14.04 |
| 467 | requirements: |
| 468 | - slice: |
| 469 | node: mysite_clients |
| 470 | relationship: tosca.relationships.MemberOfSlice |
| 471 | |
| 472 | # docker image for vcpe containers |
| 473 | docker-vcpe: |
| 474 | # TODO: need to attach this to mydeployment |
| 475 | type: tosca.nodes.Image |
| 476 | properties: |
| 477 | kind: container |
| 478 | container_format: na |
| 479 | disk_format: na |
| 480 | path: andybavier/docker-vcpe |
| 481 | tag: develop |
| 482 | |
| 483 | # Let's add a user who can be administrator of the household |
| 484 | johndoe@myhouse.com: |
| 485 | type: tosca.nodes.User |
| 486 | properties: |
| 487 | password: letmein |
| 488 | firstname: john |
| 489 | lastname: doe |
| 490 | requirements: |
| 491 | - site: |
| 492 | node: mysite |
| 493 | relationship: tosca.relationships.MemberOfSite |
| 494 | |
| 495 | # A subscriber |
| 496 | My House: |
| 497 | type: tosca.nodes.CORDSubscriber |
| 498 | properties: |
| 499 | service_specific_id: 123 |
| 500 | firewall_enable: false |
| 501 | cdn_enable: false |
| 502 | url_filter_enable: false |
| 503 | url_filter_level: R |
| 504 | requirements: |
| 505 | - house_admin: |
| 506 | node: johndoe@myhouse.com |
| 507 | relationship: tosca.relationships.AdminPrivilege |
| 508 | |
| 509 | Mom's PC: |
| 510 | type: tosca.nodes.CORDUser |
| 511 | properties: |
| 512 | mac: 01:02:03:04:05:06 |
| 513 | level: PG_13 |
| 514 | requirements: |
| 515 | - household: |
| 516 | node: My House |
| 517 | relationship: tosca.relationships.SubscriberDevice |
| 518 | |
| 519 | Dad's PC: |
| 520 | type: tosca.nodes.CORDUser |
| 521 | properties: |
| 522 | mac: 90:E2:BA:82:F9:75 |
| 523 | level: PG_13 |
| 524 | requirements: |
| 525 | - household: |
| 526 | node: My House |
| 527 | relationship: tosca.relationships.SubscriberDevice |
| 528 | |
| 529 | Jack's Laptop: |
| 530 | type: tosca.nodes.CORDUser |
| 531 | properties: |
| 532 | mac: 68:5B:35:9D:91:D5 |
| 533 | level: PG_13 |
| 534 | requirements: |
| 535 | - household: |
| 536 | node: My House |
| 537 | relationship: tosca.relationships.SubscriberDevice |
| 538 | |
| 539 | Jill's Laptop: |
| 540 | type: tosca.nodes.CORDUser |
| 541 | properties: |
| 542 | mac: 34:36:3B:C9:B6:A6 |
| 543 | level: PG_13 |
| 544 | requirements: |
| 545 | - household: |
| 546 | node: My House |
| 547 | relationship: tosca.relationships.SubscriberDevice |
| 548 | |
| 549 | My Volt: |
| 550 | type: tosca.nodes.VOLTTenant |
| 551 | properties: |
| 552 | service_specific_id: 123 |
| 553 | s_tag: 222 |
| 554 | c_tag: 432 |
| 555 | requirements: |
| 556 | - provider_service: |
| 557 | node: service_volt |
| 558 | relationship: tosca.relationships.MemberOfService |
| 559 | - subscriber: |
| 560 | node: My House |
| 561 | relationship: tosca.relationships.BelongsToSubscriber |