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