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