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