Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 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 | |
| 18 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 19 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 20 | |
| 21 | description: Just enough Tosca to get the vSG slice running on the CORD POD, created by platform-install |
| 22 | |
| 23 | imports: |
| 24 | - custom_types/xos.yaml |
Scott Baker | 3a5dea7 | 2017-03-06 23:01:01 -0800 | [diff] [blame] | 25 | - custom_types/vtr.yaml |
Scott Baker | 7f95bc3 | 2017-08-21 09:40:10 -0700 | [diff] [blame] | 26 | - custom_types/addressmanager.yaml |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 27 | |
| 28 | topology_template: |
| 29 | node_templates: |
| 30 | |
| 31 | # site, image, fully created in deployment.yaml |
| 32 | {{ site_name }}: |
| 33 | type: tosca.nodes.Site |
| 34 | |
| 35 | image#vsg-1.1: |
| 36 | type: tosca.nodes.Image |
| 37 | |
| 38 | # management networks, fully created in management-net.yaml |
| 39 | management: |
| 40 | type: tosca.nodes.network.Network.XOS |
| 41 | properties: |
| 42 | no-create: true |
| 43 | no-delete: true |
| 44 | no-update: true |
| 45 | |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 46 | {% if use_management_hosts %} |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 47 | management_hosts: |
| 48 | type: tosca.nodes.network.Network.XOS |
| 49 | properties: |
| 50 | no-create: true |
| 51 | no-delete: true |
| 52 | no-update: true |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 53 | {% endif %} |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 54 | |
Scott Baker | 87207e3 | 2017-07-18 10:45:55 -0700 | [diff] [blame] | 55 | service#rcord: |
| 56 | type: tosca.nodes.Service |
Matteo Scandolo | 686f702 | 2017-11-27 09:50:42 -0800 | [diff] [blame] | 57 | requirements: |
| 58 | - rcord_tenant: |
| 59 | node: service#volt |
| 60 | relationship: tosca.relationships.TenantOfService |
Scott Baker | 87207e3 | 2017-07-18 10:45:55 -0700 | [diff] [blame] | 61 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 62 | # ONOS_CORD, fully created in vtn.yaml |
| 63 | service#ONOS_CORD: |
| 64 | type: tosca.nodes.ONOSService |
| 65 | properties: |
| 66 | no-delete: true |
| 67 | no-create: true |
| 68 | no-update: true |
| 69 | |
| 70 | # ONOS_Fabric, fully created in fabric.yaml |
| 71 | service#ONOS_Fabric: |
| 72 | type: tosca.nodes.ONOSService |
| 73 | properties: |
| 74 | no-delete: true |
| 75 | no-create: true |
| 76 | no-update: true |
| 77 | |
| 78 | # CORD Services |
| 79 | service#vtr: |
Scott Baker | 3a5dea7 | 2017-03-06 23:01:01 -0800 | [diff] [blame] | 80 | type: tosca.nodes.VTRService |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 81 | properties: |
| 82 | view_url: /admin/vtr/vtrservice/$id$/ |
| 83 | kind: vTR |
| 84 | replaces: service_vtr |
| 85 | |
| 86 | service#volt: |
| 87 | type: tosca.nodes.VOLTService |
| 88 | requirements: |
| 89 | - vsg_tenant: |
| 90 | node: service#vsg |
| 91 | relationship: tosca.relationships.TenantOfService |
| 92 | properties: |
| 93 | view_url: /admin/volt/voltservice/$id$/ |
| 94 | kind: vOLT |
| 95 | replaces: service_volt |
| 96 | public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] } |
| 97 | private_key_fn: /opt/xos/services/volt/keys/volt_rsa |
| 98 | artifacts: |
Scott Baker | 5719654 | 2017-04-11 15:48:17 -0700 | [diff] [blame] | 99 | pubkey: /opt/cord_profile/key_import/volt_rsa.pub |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 100 | |
| 101 | addresses_vsg: |
| 102 | type: tosca.nodes.AddressPool |
| 103 | properties: |
Andy Bavier | d6c09af | 2017-08-23 17:57:51 -0700 | [diff] [blame] | 104 | addresses: 10.7.1.0/24 |
| 105 | gateway_ip: 10.7.1.1 |
Jonathan Hart | 1cec104 | 2017-08-21 17:28:36 -0700 | [diff] [blame] | 106 | gateway_mac: a4:23:05:06:01:01 |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 107 | |
| 108 | addresses_public: |
| 109 | type: tosca.nodes.AddressPool |
| 110 | properties: |
Andy Bavier | d6c09af | 2017-08-23 17:57:51 -0700 | [diff] [blame] | 111 | addresses: 10.8.1.0/24 |
| 112 | gateway_ip: 10.8.1.1 |
Jonathan Hart | 1cec104 | 2017-08-21 17:28:36 -0700 | [diff] [blame] | 113 | gateway_mac: a4:23:05:06:01:01 |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 114 | |
| 115 | label_vsg: |
| 116 | type: tosca.nodes.NodeLabel |
| 117 | |
| 118 | service#vsg: |
| 119 | type: tosca.nodes.VSGService |
| 120 | requirements: |
Scott Baker | 7f95bc3 | 2017-08-21 09:40:10 -0700 | [diff] [blame] | 121 | - addressing_tenant: |
| 122 | node: service#addressmanager |
| 123 | relationship: tosca.relationships.TenantOfService |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 124 | - vrouter_tenant: |
| 125 | node: service#vrouter |
| 126 | relationship: tosca.relationships.TenantOfService |
| 127 | properties: |
| 128 | view_url: /admin/vsg/vsgservice/$id$/ |
| 129 | backend_network_label: hpc_client |
| 130 | public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] } |
| 131 | private_key_fn: /opt/xos/services/vsg/keys/vsg_rsa |
| 132 | # node_label: label_vsg |
| 133 | replaces: service_vsg |
| 134 | artifacts: |
Scott Baker | 5719654 | 2017-04-11 15:48:17 -0700 | [diff] [blame] | 135 | pubkey: /opt/cord_profile/key_import/vsg_rsa.pub |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 136 | |
Scott Baker | 7f95bc3 | 2017-08-21 09:40:10 -0700 | [diff] [blame] | 137 | service#addressmanager: |
| 138 | type: tosca.nodes.AddressManagerService |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 139 | requirements: |
| 140 | - addresses_vsg: |
| 141 | node: addresses_vsg |
| 142 | relationship: tosca.relationships.ProvidesAddresses |
| 143 | - addresses_public: |
| 144 | node: addresses_public |
| 145 | relationship: tosca.relationships.ProvidesAddresses |
| 146 | |
Scott Baker | 7f95bc3 | 2017-08-21 09:40:10 -0700 | [diff] [blame] | 147 | service#vrouter: |
| 148 | type: tosca.nodes.VRouterService |
| 149 | properties: |
| 150 | view_url: /admin/vrouter/vrouterservice/$id$/ |
| 151 | replaces: service_vrouter |
| 152 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 153 | vRouter_ONOS_app: |
| 154 | type: tosca.nodes.ONOSvRouterApp |
| 155 | requirements: |
| 156 | - onos_tenant: |
| 157 | node: service#ONOS_Fabric |
| 158 | relationship: tosca.relationships.TenantOfService |
| 159 | - vrouter_service: |
| 160 | node: service#vrouter |
| 161 | relationship: tosca.relationships.UsedByService |
| 162 | properties: |
Jonathan Hart | a383c7c | 2017-08-18 13:58:16 -0700 | [diff] [blame] | 163 | dependencies: org.onosproject.fpm |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 164 | autogenerate: vrouter-network-cfg |
| 165 | |
| 166 | template#vsg: |
| 167 | type: tosca.nodes.NetworkTemplate |
| 168 | properties: |
| 169 | visibility: private |
| 170 | translation: none |
| 171 | vtn_kind: VSG |
| 172 | |
| 173 | # Networks required by the CORD setup |
| 174 | {{ site_name }}_vsg-access: |
| 175 | type: tosca.nodes.network.Network |
| 176 | properties: |
| 177 | ip_version: 4 |
| 178 | requirements: |
| 179 | - network_template: |
| 180 | node: template#vsg |
| 181 | relationship: tosca.relationships.UsesNetworkTemplate |
| 182 | - owner: |
| 183 | node: {{ site_name }}_vsg |
| 184 | relationship: tosca.relationships.MemberOfSlice |
| 185 | - connection: |
| 186 | node: {{ site_name }}_vsg |
| 187 | relationship: tosca.relationships.ConnectsToSlice |
| 188 | |
| 189 | # CORD Slices |
| 190 | {{ site_name }}_vsg: |
| 191 | description: vSG Controller Slice |
| 192 | type: tosca.nodes.Slice |
| 193 | properties: |
| 194 | network: noauto |
| 195 | requirements: |
| 196 | - vsg_service: |
| 197 | node: service#vsg |
| 198 | relationship: tosca.relationships.MemberOfService |
| 199 | - site: |
| 200 | node: {{ site_name }} |
| 201 | relationship: tosca.relationships.MemberOfSite |
| 202 | - management: |
| 203 | node: management |
| 204 | relationship: tosca.relationships.ConnectsToNetwork |
Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 205 | {% if use_management_hosts %} |
| 206 | - management_hosts: |
| 207 | node: management_hosts |
| 208 | relationship: tosca.relationships.ConnectsToNetwork |
| 209 | {% endif %} |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 210 | - image: |
| 211 | node: image#vsg-1.1 |
| 212 | relationship: tosca.relationships.DefaultImage |
| 213 | |
Scott Baker | 87207e3 | 2017-07-18 10:45:55 -0700 | [diff] [blame] | 214 | in#lanside: |
| 215 | type: tosca.nodes.InterfaceType |
| 216 | properties: |
| 217 | direction: in |
| 218 | |
| 219 | out#lanside: |
| 220 | type: tosca.nodes.InterfaceType |
| 221 | properties: |
| 222 | direction: out |
| 223 | |
| 224 | in#wanside: |
| 225 | type: tosca.nodes.InterfaceType |
| 226 | properties: |
| 227 | direction: in |
| 228 | |
| 229 | out#wanside: |
| 230 | type: tosca.nodes.InterfaceType |
| 231 | properties: |
| 232 | direction: out |
| 233 | |
| 234 | volt_lanside: |
| 235 | type: tosca.nodes.ServiceInterface |
| 236 | requirements: |
| 237 | - service: |
| 238 | node: service#volt |
| 239 | relationship: tosca.relationships.MemberOfService |
| 240 | - interface: |
| 241 | node: out#lanside |
| 242 | relationship: tosca.relationships.IsType |
| 243 | |
| 244 | vsg_lanside: |
| 245 | type: tosca.nodes.ServiceInterface |
| 246 | requirements: |
| 247 | - service: |
| 248 | node: service#vsg |
| 249 | relationship: tosca.relationships.MemberOfService |
| 250 | - interface: |
| 251 | node: in#lanside |
| 252 | relationship: tosca.relationships.IsType |
| 253 | |
| 254 | vsg_wanside: |
| 255 | type: tosca.nodes.ServiceInterface |
| 256 | requirements: |
| 257 | - service: |
| 258 | node: service#vsg |
| 259 | relationship: tosca.relationships.MemberOfService |
| 260 | - interface: |
| 261 | node: out#wanside |
| 262 | relationship: tosca.relationships.IsType |
| 263 | |
Scott Baker | 7f95bc3 | 2017-08-21 09:40:10 -0700 | [diff] [blame] | 264 | addressmanager_wanside: |
Scott Baker | 87207e3 | 2017-07-18 10:45:55 -0700 | [diff] [blame] | 265 | type: tosca.nodes.ServiceInterface |
| 266 | requirements: |
| 267 | - service: |
Scott Baker | 7f95bc3 | 2017-08-21 09:40:10 -0700 | [diff] [blame] | 268 | node: service#addressmanager |
Scott Baker | 87207e3 | 2017-07-18 10:45:55 -0700 | [diff] [blame] | 269 | relationship: tosca.relationships.MemberOfService |
| 270 | - interface: |
| 271 | node: in#wanside |
| 272 | relationship: tosca.relationships.IsType |