blob: c3138fea9da785ba7d6c2ae5dac253e1ab509fdf [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001
2{#
3Copyright 2017-present Open Networking Foundation
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16#}
17
18
Zack Williams682450e2016-11-19 09:04:41 -070019tosca_definitions_version: tosca_simple_yaml_1_0
20
21description: Just enough Tosca to get the vSG slice running on the CORD POD, created by platform-install
22
23imports:
24 - custom_types/xos.yaml
Scott Baker3a5dea72017-03-06 23:01:01 -080025 - custom_types/vtr.yaml
Scott Baker7f95bc32017-08-21 09:40:10 -070026 - custom_types/addressmanager.yaml
Zack Williams682450e2016-11-19 09:04:41 -070027
28topology_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 Williamsa2763112017-01-03 11:38:38 -070046{% if use_management_hosts %}
Zack Williams682450e2016-11-19 09:04:41 -070047 management_hosts:
48 type: tosca.nodes.network.Network.XOS
49 properties:
50 no-create: true
51 no-delete: true
52 no-update: true
Zack Williamsa2763112017-01-03 11:38:38 -070053{% endif %}
Zack Williams682450e2016-11-19 09:04:41 -070054
Scott Baker87207e32017-07-18 10:45:55 -070055 service#rcord:
56 type: tosca.nodes.Service
Matteo Scandolo686f7022017-11-27 09:50:42 -080057 requirements:
58 - rcord_tenant:
59 node: service#volt
60 relationship: tosca.relationships.TenantOfService
Scott Baker87207e32017-07-18 10:45:55 -070061
Zack Williams682450e2016-11-19 09:04:41 -070062# 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 Baker3a5dea72017-03-06 23:01:01 -080080 type: tosca.nodes.VTRService
Zack Williams682450e2016-11-19 09:04:41 -070081 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 Baker57196542017-04-11 15:48:17 -070099 pubkey: /opt/cord_profile/key_import/volt_rsa.pub
Zack Williams682450e2016-11-19 09:04:41 -0700100
101 addresses_vsg:
102 type: tosca.nodes.AddressPool
103 properties:
Andy Bavierd6c09af2017-08-23 17:57:51 -0700104 addresses: 10.7.1.0/24
105 gateway_ip: 10.7.1.1
Jonathan Hart1cec1042017-08-21 17:28:36 -0700106 gateway_mac: a4:23:05:06:01:01
Zack Williams682450e2016-11-19 09:04:41 -0700107
108 addresses_public:
109 type: tosca.nodes.AddressPool
110 properties:
Andy Bavierd6c09af2017-08-23 17:57:51 -0700111 addresses: 10.8.1.0/24
112 gateway_ip: 10.8.1.1
Jonathan Hart1cec1042017-08-21 17:28:36 -0700113 gateway_mac: a4:23:05:06:01:01
Zack Williams682450e2016-11-19 09:04:41 -0700114
115 label_vsg:
116 type: tosca.nodes.NodeLabel
117
118 service#vsg:
119 type: tosca.nodes.VSGService
120 requirements:
Scott Baker7f95bc32017-08-21 09:40:10 -0700121 - addressing_tenant:
122 node: service#addressmanager
123 relationship: tosca.relationships.TenantOfService
Zack Williams682450e2016-11-19 09:04:41 -0700124 - 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 Baker57196542017-04-11 15:48:17 -0700135 pubkey: /opt/cord_profile/key_import/vsg_rsa.pub
Zack Williams682450e2016-11-19 09:04:41 -0700136
Scott Baker7f95bc32017-08-21 09:40:10 -0700137 service#addressmanager:
138 type: tosca.nodes.AddressManagerService
Zack Williams682450e2016-11-19 09:04:41 -0700139 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 Baker7f95bc32017-08-21 09:40:10 -0700147 service#vrouter:
148 type: tosca.nodes.VRouterService
149 properties:
150 view_url: /admin/vrouter/vrouterservice/$id$/
151 replaces: service_vrouter
152
Zack Williams682450e2016-11-19 09:04:41 -0700153 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 Harta383c7c2017-08-18 13:58:16 -0700163 dependencies: org.onosproject.fpm
Zack Williams682450e2016-11-19 09:04:41 -0700164 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 Williamsa2763112017-01-03 11:38:38 -0700205{% if use_management_hosts %}
206 - management_hosts:
207 node: management_hosts
208 relationship: tosca.relationships.ConnectsToNetwork
209{% endif %}
Zack Williams682450e2016-11-19 09:04:41 -0700210 - image:
211 node: image#vsg-1.1
212 relationship: tosca.relationships.DefaultImage
213
Scott Baker87207e32017-07-18 10:45:55 -0700214 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 Baker7f95bc32017-08-21 09:40:10 -0700264 addressmanager_wanside:
Scott Baker87207e32017-07-18 10:45:55 -0700265 type: tosca.nodes.ServiceInterface
266 requirements:
267 - service:
Scott Baker7f95bc32017-08-21 09:40:10 -0700268 node: service#addressmanager
Scott Baker87207e32017-07-18 10:45:55 -0700269 relationship: tosca.relationships.MemberOfService
270 - interface:
271 node: in#wanside
272 relationship: tosca.relationships.IsType