Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 1 | --- |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 2 | {# |
| 3 | Copyright 2017-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 | #} |
| 17 | |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 18 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 19 | |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 20 | description: Just enough Tosca to get the vSG slice running on the CORD POD, created by rcord profile |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 21 | |
| 22 | imports: |
| 23 | - custom_types/addressmanagerservice.yaml |
| 24 | - custom_types/addresspool.yaml |
| 25 | - custom_types/image.yaml |
| 26 | - custom_types/network.yaml |
| 27 | - custom_types/networkslice.yaml |
| 28 | - custom_types/networktemplate.yaml |
| 29 | - custom_types/nodelabel.yaml |
| 30 | - custom_types/onosapp.yaml |
| 31 | - custom_types/onosservice.yaml |
Matteo Scandolo | d1707b3 | 2018-05-04 12:42:53 -0700 | [diff] [blame] | 32 | - custom_types/rcordservice.yaml |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 33 | - custom_types/site.yaml |
| 34 | - custom_types/service.yaml |
| 35 | - custom_types/servicedependency.yaml |
| 36 | - custom_types/serviceinstanceattribute.yaml |
| 37 | - custom_types/serviceinstancelink.yaml |
| 38 | - custom_types/slice.yaml |
| 39 | - custom_types/voltservice.yaml |
| 40 | - custom_types/vrouterservice.yaml |
| 41 | - custom_types/vsgservice.yaml |
| 42 | - custom_types/vtrservice.yaml |
| 43 | |
| 44 | topology_template: |
| 45 | node_templates: |
| 46 | |
| 47 | {{ site_name }}: |
| 48 | type: tosca.nodes.Site |
| 49 | properties: |
| 50 | name: {{ site_name }} |
| 51 | must-exist: true |
| 52 | |
| 53 | image#vsg-1.1: |
| 54 | type: tosca.nodes.Image |
| 55 | properties: |
| 56 | name: vsg-1.1 |
| 57 | |
| 58 | # management networks, fully created in management-net.yaml |
| 59 | management: |
| 60 | type: tosca.nodes.Network |
| 61 | properties: |
| 62 | name: management |
| 63 | must-exist: true |
| 64 | |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 65 | {% if use_vtn_net_management_host %} |
| 66 | management_host: |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 67 | type: tosca.nodes.Network |
| 68 | properties: |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 69 | name: management_host |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 70 | must-exist: true |
| 71 | {% endif %} |
| 72 | |
| 73 | service#rcord: |
Matteo Scandolo | d1707b3 | 2018-05-04 12:42:53 -0700 | [diff] [blame] | 74 | type: tosca.nodes.RCORDService |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 75 | properties: |
| 76 | name: rcord |
| 77 | |
| 78 | rcord_volt: |
| 79 | type: tosca.nodes.ServiceDependency |
| 80 | properties: |
| 81 | connect_method: None |
| 82 | requirements: |
| 83 | - subscriber_service: |
| 84 | node: service#rcord |
| 85 | relationship: tosca.relationships.BelongsToOne |
| 86 | - provider_service: |
| 87 | node: service#volt |
| 88 | relationship: tosca.relationships.BelongsToOne |
| 89 | |
| 90 | # ONOS_CORD, fully created in vtn.yaml |
| 91 | service#ONOS_CORD: |
| 92 | type: tosca.nodes.ONOSService |
| 93 | properties: |
| 94 | name: ONOS_CORD |
| 95 | must-exist: true |
| 96 | |
| 97 | # ONOS_Fabric, fully created in fabric.yaml |
| 98 | service#ONOS_Fabric: |
| 99 | type: tosca.nodes.ONOSService |
| 100 | properties: |
| 101 | name: ONOS_Fabric |
| 102 | must-exist: true |
| 103 | |
| 104 | # CORD Services |
| 105 | service#vtr: |
| 106 | type: tosca.nodes.VTRService |
| 107 | properties: |
| 108 | name: vtr |
| 109 | kind: rcord |
| 110 | |
| 111 | service#volt: |
| 112 | type: tosca.nodes.VOLTService |
| 113 | properties: |
| 114 | name: volt |
| 115 | kind: rcord |
| 116 | public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/volt_rsa.pub') }} |
| 117 | private_key_fn: /opt/xos/services/volt/keys/volt_rsa |
Scott Baker | 02e731a | 2018-05-01 17:46:53 -0700 | [diff] [blame] | 118 | voltha_url: http://does.not.exist/ |
Matteo Scandolo | 4e9d7a2 | 2018-05-07 13:38:19 -0700 | [diff] [blame] | 119 | onos_voltha_url: http://does.not.exist/ |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 120 | |
| 121 | volt_vsg: |
| 122 | type: tosca.nodes.ServiceDependency |
| 123 | properties: |
| 124 | connect_method: None |
| 125 | requirements: |
| 126 | - subscriber_service: |
| 127 | node: service#volt |
| 128 | relationship: tosca.relationships.BelongsToOne |
| 129 | - provider_service: |
| 130 | node: service#vsg |
| 131 | relationship: tosca.relationships.BelongsToOne |
| 132 | |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 133 | |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 134 | addresses_vsg: |
| 135 | type: tosca.nodes.AddressPool |
| 136 | properties: |
| 137 | name: addresses_vsg |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 138 | addresses: {{ addresspool_vsg_cidr }} |
| 139 | gateway_ip: {{ addresspool_vsg_cidr | ipaddr('1') | ipaddr('address') }} |
Zack Williams | ec79bac | 2018-02-06 18:00:05 -0700 | [diff] [blame] | 140 | gateway_mac: {{ fabric_gateway_hwaddr }} |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 141 | requirements: |
| 142 | - service: |
| 143 | node: service#addressmanager |
| 144 | relationship: tosca.relationships.BelongsToOne |
| 145 | |
| 146 | addresses_public: |
| 147 | type: tosca.nodes.AddressPool |
| 148 | properties: |
| 149 | name: addresses_public |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 150 | addresses: {{ addresspool_public_cidr }} |
| 151 | gateway_ip: {{ addresspool_public_cidr | ipaddr('1') | ipaddr('address') }} |
Zack Williams | ec79bac | 2018-02-06 18:00:05 -0700 | [diff] [blame] | 152 | gateway_mac: {{ fabric_gateway_hwaddr }} |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 153 | requirements: |
| 154 | - service: |
| 155 | node: service#addressmanager |
| 156 | relationship: tosca.relationships.BelongsToOne |
| 157 | |
| 158 | label_vsg: |
| 159 | type: tosca.nodes.NodeLabel |
| 160 | properties: |
| 161 | name: label_vsg |
| 162 | |
| 163 | service#vsg: |
| 164 | type: tosca.nodes.VSGService |
| 165 | properties: |
| 166 | name: vsg |
| 167 | # backend_network_label: hpc_client # what is this? can we drop it? |
| 168 | public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/vsg_rsa.pub') }} |
| 169 | private_key_fn: /opt/xos/services/vsg/keys/vsg_rsa |
| 170 | # node_label: label_vsg |
| 171 | |
| 172 | vsg_vrouter: |
| 173 | type: tosca.nodes.ServiceDependency |
| 174 | properties: |
| 175 | connect_method: None |
| 176 | requirements: |
| 177 | - subscriber_service: |
| 178 | node: service#vsg |
| 179 | relationship: tosca.relationships.BelongsToOne |
| 180 | - provider_service: |
| 181 | node: service#vrouter |
| 182 | relationship: tosca.relationships.BelongsToOne |
| 183 | |
| 184 | vsg_addressmanager: |
| 185 | type: tosca.nodes.ServiceDependency |
| 186 | properties: |
| 187 | connect_method: None |
| 188 | requirements: |
| 189 | - subscriber_service: |
| 190 | node: service#vsg |
| 191 | relationship: tosca.relationships.BelongsToOne |
| 192 | - provider_service: |
| 193 | node: service#addressmanager |
| 194 | relationship: tosca.relationships.BelongsToOne |
| 195 | |
| 196 | service#addressmanager: |
| 197 | type: tosca.nodes.AddressManagerService |
| 198 | properties: |
| 199 | name: addressmanager |
| 200 | |
| 201 | service#vrouter: |
| 202 | type: tosca.nodes.VRouterService |
| 203 | properties: |
| 204 | name: vrouter |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 205 | |
| 206 | vRouter_ONOS_app: |
| 207 | type: tosca.nodes.ONOSApp |
| 208 | requirements: |
| 209 | - owner: |
| 210 | node: service#ONOS_Fabric |
| 211 | relationship: tosca.relationships.BelongsToOne |
| 212 | properties: |
| 213 | name: vRouter_ONOS_app |
| 214 | dependencies: org.onosproject.fpm |
| 215 | |
| 216 | vRouter_ONOS_app_autogenerate: |
| 217 | type: tosca.nodes.ServiceInstanceAttribute |
| 218 | requirements: |
| 219 | - service_instance: |
| 220 | node: vRouter_ONOS_app |
| 221 | relationship: tosca.relationships.BelongsToOne |
| 222 | properties: |
| 223 | name: autogenerate |
| 224 | value: vrouter-network-cfg |
| 225 | |
| 226 | vRouter_ONOS_app_ONOS_CORD: |
| 227 | type: tosca.nodes.ServiceInstanceLink |
| 228 | requirements: |
| 229 | - provider_service_instance: |
| 230 | node: vRouter_ONOS_app |
| 231 | relationship: tosca.relationships.BelongsToOne |
| 232 | - subscriber_service: |
| 233 | node: service#vrouter |
| 234 | relationship: tosca.relationships.BelongsToOne |
| 235 | |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 236 | vsg_template: |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 237 | type: tosca.nodes.NetworkTemplate |
| 238 | properties: |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 239 | name: vsg_template |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 240 | visibility: private |
| 241 | translation: none |
| 242 | vtn_kind: VSG |
| 243 | |
| 244 | # Networks required by the CORD setup |
| 245 | {{ site_name }}_vsg-access: |
| 246 | type: tosca.nodes.Network |
| 247 | properties: |
| 248 | name: {{ site_name }}_vsg-access |
| 249 | # ip_version: 4 |
| 250 | requirements: |
| 251 | - template: |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 252 | node: vsg_template |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 253 | relationship: tosca.relationships.BelongsToOne |
| 254 | - owner: |
| 255 | node: {{ site_name }}_vsg |
| 256 | relationship: tosca.relationships.BelongsToOne |
| 257 | |
| 258 | networkslice#{{ site_name }}_vsg-access_to_{{ site_name }}_vsg: |
| 259 | type: tosca.nodes.NetworkSlice |
| 260 | requirements: |
| 261 | - network: |
| 262 | node: {{ site_name }}_vsg-access |
| 263 | relationship: tosca.relationships.BelongsToOne |
| 264 | - slice: |
| 265 | node: {{ site_name }}_vsg |
| 266 | relationship: tosca.relationships.BelongsToOne |
| 267 | |
| 268 | # CORD Slices |
| 269 | {{ site_name }}_vsg: |
| 270 | description: vSG Controller Slice |
| 271 | type: tosca.nodes.Slice |
| 272 | properties: |
| 273 | network: noauto |
| 274 | name: {{ site_name }}_vsg |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 275 | requirements: |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 276 | - service: |
| 277 | node: service#vsg |
| 278 | relationship: tosca.relationships.BelongsToOne |
| 279 | - site: |
| 280 | node: {{ site_name }} |
| 281 | relationship: tosca.relationships.BelongsToOne |
| 282 | - default_image: |
| 283 | node: image#vsg-1.1 |
| 284 | relationship: tosca.relationships.BelongsToOne |
| 285 | |
| 286 | networkslice#management_to_{{ site_name }}_vsg: |
| 287 | type: tosca.nodes.NetworkSlice |
| 288 | requirements: |
| 289 | - network: |
| 290 | node: management |
| 291 | relationship: tosca.relationships.BelongsToOne |
| 292 | - slice: |
| 293 | node: {{ site_name }}_vsg |
| 294 | relationship: tosca.relationships.BelongsToOne |
| 295 | |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 296 | {% if use_vtn_net_management_host %} |
| 297 | networkslice#management_host_to_{{ site_name }}_vsg: |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 298 | type: tosca.nodes.NetworkSlice |
| 299 | requirements: |
| 300 | - network: |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 301 | node: management_host |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 302 | relationship: tosca.relationships.BelongsToOne |
| 303 | - slice: |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 304 | node: {{ site_name }}_vsg |
| 305 | relationship: tosca.relationships.BelongsToOne |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 306 | {% endif %} |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 307 | |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 308 | # TODO: migrate interfaces when we'll start using them |
Matteo Scandolo | 4e9d7a2 | 2018-05-07 13:38:19 -0700 | [diff] [blame] | 309 | |
Andy Bavier | 3ade4a5 | 2017-12-20 10:40:16 -0700 | [diff] [blame] | 310 | # in#lanside: |
| 311 | # type: tosca.nodes.InterfaceType |
| 312 | # properties: |
| 313 | # direction: in |
| 314 | |
| 315 | # out#lanside: |
| 316 | # type: tosca.nodes.InterfaceType |
| 317 | # properties: |
| 318 | # direction: out |
| 319 | |
| 320 | # in#wanside: |
| 321 | # type: tosca.nodes.InterfaceType |
| 322 | # properties: |
| 323 | # direction: in |
| 324 | |
| 325 | # out#wanside: |
| 326 | # type: tosca.nodes.InterfaceType |
| 327 | # properties: |
| 328 | # direction: out |
| 329 | |
| 330 | # volt_lanside: |
| 331 | # type: tosca.nodes.ServiceInterface |
| 332 | # requirements: |
| 333 | # - service: |
| 334 | # node: service#volt |
| 335 | # relationship: tosca.relationships.MemberOfService |
| 336 | # - interface: |
| 337 | # node: out#lanside |
| 338 | # relationship: tosca.relationships.IsType |
| 339 | |
| 340 | # vsg_lanside: |
| 341 | # type: tosca.nodes.ServiceInterface |
| 342 | # requirements: |
| 343 | # - service: |
| 344 | # node: service#vsg |
| 345 | # relationship: tosca.relationships.MemberOfService |
| 346 | # - interface: |
| 347 | # node: in#lanside |
| 348 | # relationship: tosca.relationships.IsType |
| 349 | |
| 350 | # vsg_wanside: |
| 351 | # type: tosca.nodes.ServiceInterface |
| 352 | # requirements: |
| 353 | # - service: |
| 354 | # node: service#vsg |
| 355 | # relationship: tosca.relationships.MemberOfService |
| 356 | # - interface: |
| 357 | # node: out#wanside |
| 358 | # relationship: tosca.relationships.IsType |
| 359 | |
| 360 | # addressmanager_wanside: |
| 361 | # type: tosca.nodes.ServiceInterface |
| 362 | # requirements: |
| 363 | # - service: |
| 364 | # node: service#addressmanager |
| 365 | # relationship: tosca.relationships.MemberOfService |
| 366 | # - interface: |
| 367 | # node: in#wanside |
Zack Williams | 2da41af | 2018-01-10 17:48:23 -0700 | [diff] [blame] | 368 | # relationship: tosca.relationships.IsType |
| 369 | |