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