Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | {# |
| 2 | Copyright 2017-present Open Networking Foundation |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | #} |
| 16 | |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 17 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 18 | |
| 19 | description: Just enough Tosca to get the vEG slice running on the CORD POD, created by platform-install |
| 20 | |
| 21 | imports: |
| 22 | - custom_types/xos.yaml |
| 23 | - custom_types/veg.yaml |
Zack Williams | 2020afb | 2017-09-29 07:58:45 -0700 | [diff] [blame^] | 24 | - custom_types/addressmanager.yaml |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 25 | |
| 26 | topology_template: |
| 27 | node_templates: |
| 28 | |
| 29 | # site, image, fully created in deployment.yaml |
| 30 | {{ site_name }}: |
| 31 | type: tosca.nodes.Site |
| 32 | |
Andrea Campanella | 0a34e23 | 2017-02-23 17:20:04 +0100 | [diff] [blame] | 33 | image#vsg-1.1: |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 34 | type: tosca.nodes.Image |
| 35 | |
| 36 | # management networks, fully created in management-net.yaml |
| 37 | management: |
| 38 | type: tosca.nodes.network.Network.XOS |
| 39 | properties: |
| 40 | no-create: true |
| 41 | no-delete: true |
| 42 | no-update: true |
| 43 | |
| 44 | {% if use_management_hosts %} |
| 45 | management_hosts: |
| 46 | type: tosca.nodes.network.Network.XOS |
| 47 | properties: |
| 48 | no-create: true |
| 49 | no-delete: true |
| 50 | no-update: true |
| 51 | {% endif %} |
| 52 | |
| 53 | # ONOS_CORD, fully created in vtn.yaml |
| 54 | service#ONOS_CORD: |
| 55 | type: tosca.nodes.ONOSService |
| 56 | properties: |
| 57 | no-delete: true |
| 58 | no-create: true |
| 59 | no-update: true |
| 60 | |
| 61 | # ONOS_Fabric, fully created in fabric.yaml |
| 62 | service#ONOS_Fabric: |
| 63 | type: tosca.nodes.ONOSService |
| 64 | properties: |
| 65 | no-delete: true |
| 66 | no-create: true |
| 67 | no-update: true |
| 68 | |
| 69 | # CORD Services |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 70 | addresses_veg: |
| 71 | type: tosca.nodes.AddressPool |
| 72 | properties: |
Andy Bavier | d6c09af | 2017-08-23 17:57:51 -0700 | [diff] [blame] | 73 | addresses: 10.7.1.0/24 |
| 74 | gateway_ip: 10.7.1.1 |
Jonathan Hart | 1cec104 | 2017-08-21 17:28:36 -0700 | [diff] [blame] | 75 | gateway_mac: a4:23:05:06:01:01 |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 76 | |
| 77 | addresses_public: |
| 78 | type: tosca.nodes.AddressPool |
| 79 | properties: |
Andy Bavier | d6c09af | 2017-08-23 17:57:51 -0700 | [diff] [blame] | 80 | addresses: 10.8.1.0/24 |
| 81 | gateway_ip: 10.8.1.1 |
Jonathan Hart | 1cec104 | 2017-08-21 17:28:36 -0700 | [diff] [blame] | 82 | gateway_mac: a4:23:05:06:01:01 |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 83 | |
Zack Williams | 2020afb | 2017-09-29 07:58:45 -0700 | [diff] [blame^] | 84 | service#addressmanager: |
| 85 | type: tosca.nodes.AddressManagerService |
| 86 | requirements: |
| 87 | - addresses_veg: |
| 88 | node: addresses_veg |
| 89 | relationship: tosca.relationships.ProvidesAddresses |
| 90 | - addresses_public: |
| 91 | node: addresses_public |
| 92 | relationship: tosca.relationships.ProvidesAddresses |
| 93 | |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 94 | label_veg: |
| 95 | type: tosca.nodes.NodeLabel |
| 96 | |
| 97 | service#veg: |
| 98 | type: tosca.nodes.VEGService |
| 99 | requirements: |
| 100 | - vrouter_tenant: |
| 101 | node: service#vrouter |
| 102 | relationship: tosca.relationships.TenantOfService |
| 103 | properties: |
| 104 | view_url: /admin/vEG/vegservice/$id$/ |
| 105 | backend_network_label: hpc_client |
| 106 | public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] } |
Andrea Campanella | 4ef4839 | 2017-05-16 10:07:05 -0700 | [diff] [blame] | 107 | private_key_fn: /opt/cord_profile/key_import/veg_rsa |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 108 | # node_label: label_veg |
| 109 | replaces: service_veg |
| 110 | artifacts: |
Andrea Campanella | 4ef4839 | 2017-05-16 10:07:05 -0700 | [diff] [blame] | 111 | pubkey: /opt/cord_profile/key_import/veg_rsa.pub |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 112 | |
| 113 | service#vrouter: |
| 114 | type: tosca.nodes.VRouterService |
| 115 | properties: |
| 116 | view_url: /admin/vrouter/vrouterservice/$id$/ |
| 117 | replaces: service_vrouter |
| 118 | requirements: |
| 119 | - addresses_veg: |
| 120 | node: addresses_veg |
| 121 | relationship: tosca.relationships.ProvidesAddresses |
| 122 | - addresses_public: |
| 123 | node: addresses_public |
| 124 | relationship: tosca.relationships.ProvidesAddresses |
| 125 | |
| 126 | vRouter_ONOS_app: |
| 127 | type: tosca.nodes.ONOSvRouterApp |
| 128 | requirements: |
| 129 | - onos_tenant: |
| 130 | node: service#ONOS_Fabric |
| 131 | relationship: tosca.relationships.TenantOfService |
| 132 | - vrouter_service: |
| 133 | node: service#vrouter |
| 134 | relationship: tosca.relationships.UsedByService |
| 135 | properties: |
Zack Williams | 2020afb | 2017-09-29 07:58:45 -0700 | [diff] [blame^] | 136 | dependencies: org.onosproject.fpm |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 137 | autogenerate: vrouter-network-cfg |
| 138 | |
| 139 | template#veg: |
| 140 | type: tosca.nodes.NetworkTemplate |
| 141 | properties: |
| 142 | visibility: private |
| 143 | translation: none |
| 144 | vtn_kind: VEG |
| 145 | |
| 146 | # Networks required by the CORD setup |
| 147 | {{ site_name }}_veg-access: |
| 148 | type: tosca.nodes.network.Network |
| 149 | properties: |
| 150 | ip_version: 4 |
| 151 | requirements: |
| 152 | - network_template: |
| 153 | node: template#veg |
| 154 | relationship: tosca.relationships.UsesNetworkTemplate |
| 155 | - owner: |
| 156 | node: {{ site_name }}_veg |
| 157 | relationship: tosca.relationships.MemberOfSlice |
| 158 | - connection: |
| 159 | node: {{ site_name }}_veg |
| 160 | relationship: tosca.relationships.ConnectsToSlice |
| 161 | |
| 162 | # CORD Slices |
| 163 | {{ site_name }}_veg: |
| 164 | description: vEG Controller Slice |
| 165 | type: tosca.nodes.Slice |
| 166 | properties: |
| 167 | network: noauto |
| 168 | requirements: |
| 169 | - veg_service: |
| 170 | node: service#veg |
| 171 | relationship: tosca.relationships.MemberOfService |
| 172 | - site: |
| 173 | node: {{ site_name }} |
| 174 | relationship: tosca.relationships.MemberOfSite |
| 175 | - management: |
| 176 | node: management |
| 177 | relationship: tosca.relationships.ConnectsToNetwork |
| 178 | {% if use_management_hosts %} |
| 179 | - management_hosts: |
| 180 | node: management_hosts |
| 181 | relationship: tosca.relationships.ConnectsToNetwork |
| 182 | {% endif %} |
| 183 | - image: |
Andrea Campanella | 0a34e23 | 2017-02-23 17:20:04 +0100 | [diff] [blame] | 184 | node: image#vsg-1.1 |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 185 | relationship: tosca.relationships.DefaultImage |
| 186 | |
Zack Williams | 2020afb | 2017-09-29 07:58:45 -0700 | [diff] [blame^] | 187 | in#lanside: |
| 188 | type: tosca.nodes.InterfaceType |
| 189 | properties: |
| 190 | direction: in |
| 191 | |
| 192 | out#lanside: |
| 193 | type: tosca.nodes.InterfaceType |
| 194 | properties: |
| 195 | direction: out |
| 196 | |
| 197 | in#wanside: |
| 198 | type: tosca.nodes.InterfaceType |
| 199 | properties: |
| 200 | direction: in |
| 201 | |
| 202 | out#wanside: |
| 203 | type: tosca.nodes.InterfaceType |
| 204 | properties: |
| 205 | direction: out |
| 206 | |
| 207 | veg_lanside: |
| 208 | type: tosca.nodes.ServiceInterface |
| 209 | requirements: |
| 210 | - service: |
| 211 | node: service#veg |
| 212 | relationship: tosca.relationships.MemberOfService |
| 213 | - interface: |
| 214 | node: in#lanside |
| 215 | relationship: tosca.relationships.IsType |
| 216 | |
| 217 | veg_wanside: |
| 218 | type: tosca.nodes.ServiceInterface |
| 219 | requirements: |
| 220 | - service: |
| 221 | node: service#veg |
| 222 | relationship: tosca.relationships.MemberOfService |
| 223 | - interface: |
| 224 | node: out#wanside |
| 225 | relationship: tosca.relationships.IsType |
| 226 | |
| 227 | addressmanager_wanside: |
| 228 | type: tosca.nodes.ServiceInterface |
| 229 | requirements: |
| 230 | - service: |
| 231 | node: service#addressmanager |
| 232 | relationship: tosca.relationships.MemberOfService |
| 233 | - interface: |
| 234 | node: in#wanside |
| 235 | relationship: tosca.relationships.IsType |
| 236 | |