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 | |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 19 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 20 | |
| 21 | description: Just enough Tosca to get the vEG slice running on the CORD POD, created by platform-install |
| 22 | |
| 23 | imports: |
| 24 | - custom_types/xos.yaml |
| 25 | - custom_types/veg.yaml |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 26 | - custom_types/vnodlocal.yaml |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [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 | |
Andrea Campanella | 0a34e23 | 2017-02-23 17:20:04 +0100 | [diff] [blame] | 35 | image#vsg-1.1: |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 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 | |
| 46 | {% if use_management_hosts %} |
| 47 | management_hosts: |
| 48 | type: tosca.nodes.network.Network.XOS |
| 49 | properties: |
| 50 | no-create: true |
| 51 | no-delete: true |
| 52 | no-update: true |
| 53 | {% endif %} |
| 54 | |
| 55 | # ONOS_CORD, fully created in vtn.yaml |
| 56 | service#ONOS_CORD: |
| 57 | type: tosca.nodes.ONOSService |
| 58 | properties: |
| 59 | no-delete: true |
| 60 | no-create: true |
| 61 | no-update: true |
| 62 | |
| 63 | # ONOS_Fabric, fully created in fabric.yaml |
| 64 | service#ONOS_Fabric: |
| 65 | type: tosca.nodes.ONOSService |
| 66 | properties: |
| 67 | no-delete: true |
| 68 | no-create: true |
| 69 | no-update: true |
| 70 | |
| 71 | # CORD Services |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 72 | addresses_veg: |
| 73 | type: tosca.nodes.AddressPool |
| 74 | properties: |
| 75 | addresses: 10.6.1.128/26 |
| 76 | gateway_ip: 10.6.1.129 |
| 77 | gateway_mac: 02:42:0a:06:01:01 |
| 78 | |
| 79 | addresses_public: |
| 80 | type: tosca.nodes.AddressPool |
| 81 | properties: |
| 82 | addresses: 10.6.1.192/26 |
| 83 | gateway_ip: 10.6.1.193 |
| 84 | gateway_mac: 02:42:0a:06:01:01 |
| 85 | |
| 86 | label_veg: |
| 87 | type: tosca.nodes.NodeLabel |
| 88 | |
| 89 | service#veg: |
| 90 | type: tosca.nodes.VEGService |
| 91 | requirements: |
| 92 | - vrouter_tenant: |
| 93 | node: service#vrouter |
| 94 | relationship: tosca.relationships.TenantOfService |
| 95 | properties: |
| 96 | view_url: /admin/vEG/vegservice/$id$/ |
| 97 | backend_network_label: hpc_client |
| 98 | public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] } |
Andrea Campanella | 4ef4839 | 2017-05-16 10:07:05 -0700 | [diff] [blame] | 99 | private_key_fn: /opt/cord_profile/key_import/veg_rsa |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 100 | # node_label: label_veg |
| 101 | replaces: service_veg |
| 102 | artifacts: |
Andrea Campanella | 4ef4839 | 2017-05-16 10:07:05 -0700 | [diff] [blame] | 103 | pubkey: /opt/cord_profile/key_import/veg_rsa.pub |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 104 | |
| 105 | service#vrouter: |
| 106 | type: tosca.nodes.VRouterService |
| 107 | properties: |
| 108 | view_url: /admin/vrouter/vrouterservice/$id$/ |
| 109 | replaces: service_vrouter |
| 110 | requirements: |
| 111 | - addresses_veg: |
| 112 | node: addresses_veg |
| 113 | relationship: tosca.relationships.ProvidesAddresses |
| 114 | - addresses_public: |
| 115 | node: addresses_public |
| 116 | relationship: tosca.relationships.ProvidesAddresses |
| 117 | |
| 118 | vRouter_ONOS_app: |
| 119 | type: tosca.nodes.ONOSvRouterApp |
| 120 | requirements: |
| 121 | - onos_tenant: |
| 122 | node: service#ONOS_Fabric |
| 123 | relationship: tosca.relationships.TenantOfService |
| 124 | - vrouter_service: |
| 125 | node: service#vrouter |
| 126 | relationship: tosca.relationships.UsedByService |
| 127 | properties: |
| 128 | dependencies: org.onosproject.vrouter |
| 129 | autogenerate: vrouter-network-cfg |
| 130 | |
| 131 | template#veg: |
| 132 | type: tosca.nodes.NetworkTemplate |
| 133 | properties: |
| 134 | visibility: private |
| 135 | translation: none |
| 136 | vtn_kind: VEG |
| 137 | |
Andrea Campanella | bd56e78 | 2017-02-23 15:43:21 +0100 | [diff] [blame] | 138 | service#vnodlocal: |
| 139 | type: tosca.nodes.VNodLocalService |
| 140 | properties: |
| 141 | requirements: |
| 142 | |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 143 | # Networks required by the CORD setup |
| 144 | {{ site_name }}_veg-access: |
| 145 | type: tosca.nodes.network.Network |
| 146 | properties: |
| 147 | ip_version: 4 |
| 148 | requirements: |
| 149 | - network_template: |
| 150 | node: template#veg |
| 151 | relationship: tosca.relationships.UsesNetworkTemplate |
| 152 | - owner: |
| 153 | node: {{ site_name }}_veg |
| 154 | relationship: tosca.relationships.MemberOfSlice |
| 155 | - connection: |
| 156 | node: {{ site_name }}_veg |
| 157 | relationship: tosca.relationships.ConnectsToSlice |
| 158 | |
| 159 | # CORD Slices |
| 160 | {{ site_name }}_veg: |
| 161 | description: vEG Controller Slice |
| 162 | type: tosca.nodes.Slice |
| 163 | properties: |
| 164 | network: noauto |
| 165 | requirements: |
| 166 | - veg_service: |
| 167 | node: service#veg |
| 168 | relationship: tosca.relationships.MemberOfService |
| 169 | - site: |
| 170 | node: {{ site_name }} |
| 171 | relationship: tosca.relationships.MemberOfSite |
| 172 | - management: |
| 173 | node: management |
| 174 | relationship: tosca.relationships.ConnectsToNetwork |
| 175 | {% if use_management_hosts %} |
| 176 | - management_hosts: |
| 177 | node: management_hosts |
| 178 | relationship: tosca.relationships.ConnectsToNetwork |
| 179 | {% endif %} |
| 180 | - image: |
Andrea Campanella | 0a34e23 | 2017-02-23 17:20:04 +0100 | [diff] [blame] | 181 | node: image#vsg-1.1 |
Andrea Campanella | bcfb2d6 | 2017-02-15 09:37:35 -0800 | [diff] [blame] | 182 | relationship: tosca.relationships.DefaultImage |
| 183 | |