blob: 7a8ec7142e6a2a61dd5ca7e2b3f008a0818333e4 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001{#
2Copyright 2017-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15#}
16
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080017tosca_definitions_version: tosca_simple_yaml_1_0
18
19description: Just enough Tosca to get the vEG slice running on the CORD POD, created by platform-install
20
21imports:
22 - custom_types/xos.yaml
23 - custom_types/veg.yaml
Zack Williams2020afb2017-09-29 07:58:45 -070024 - custom_types/addressmanager.yaml
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080025
26topology_template:
27 node_templates:
28
29# site, image, fully created in deployment.yaml
30 {{ site_name }}:
31 type: tosca.nodes.Site
32
Andrea Campanella0a34e232017-02-23 17:20:04 +010033 image#vsg-1.1:
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080034 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 Campanellabcfb2d62017-02-15 09:37:35 -080070 addresses_veg:
71 type: tosca.nodes.AddressPool
72 properties:
Andy Bavierd6c09af2017-08-23 17:57:51 -070073 addresses: 10.7.1.0/24
74 gateway_ip: 10.7.1.1
Jonathan Hart1cec1042017-08-21 17:28:36 -070075 gateway_mac: a4:23:05:06:01:01
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080076
77 addresses_public:
78 type: tosca.nodes.AddressPool
79 properties:
Andy Bavierd6c09af2017-08-23 17:57:51 -070080 addresses: 10.8.1.0/24
81 gateway_ip: 10.8.1.1
Jonathan Hart1cec1042017-08-21 17:28:36 -070082 gateway_mac: a4:23:05:06:01:01
Andrea Campanellabcfb2d62017-02-15 09:37:35 -080083
Zack Williams2020afb2017-09-29 07:58:45 -070084 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 Campanellabcfb2d62017-02-15 09:37:35 -080094 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] }
Scott Bakerd25f0e92017-10-13 14:27:37 -0700107 private_key_fn: /opt/xos/services/veg/keys/veg_rsa
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800108# node_label: label_veg
109 replaces: service_veg
110 artifacts:
Andrea Campanella4ef48392017-05-16 10:07:05 -0700111 pubkey: /opt/cord_profile/key_import/veg_rsa.pub
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800112
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 Williams2020afb2017-09-29 07:58:45 -0700136 dependencies: org.onosproject.fpm
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800137 autogenerate: vrouter-network-cfg
138
139 template#veg:
140 type: tosca.nodes.NetworkTemplate
141 properties:
142 visibility: private
143 translation: none
Scott Bakerd25f0e92017-10-13 14:27:37 -0700144 vtn_kind: VSG
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800145
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 Campanella0a34e232017-02-23 17:20:04 +0100184 node: image#vsg-1.1
Andrea Campanellabcfb2d62017-02-15 09:37:35 -0800185 relationship: tosca.relationships.DefaultImage
186
Zack Williams2020afb2017-09-29 07:58:45 -0700187 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