blob: ce8311fc5d539e7fc272cc4a3fb8c3c1feb3d3f0 [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
57
Zack Williams682450e2016-11-19 09:04:41 -070058# ONOS_CORD, fully created in vtn.yaml
59 service#ONOS_CORD:
60 type: tosca.nodes.ONOSService
61 properties:
62 no-delete: true
63 no-create: true
64 no-update: true
65
66# ONOS_Fabric, fully created in fabric.yaml
67 service#ONOS_Fabric:
68 type: tosca.nodes.ONOSService
69 properties:
70 no-delete: true
71 no-create: true
72 no-update: true
73
74# CORD Services
75 service#vtr:
Scott Baker3a5dea72017-03-06 23:01:01 -080076 type: tosca.nodes.VTRService
Zack Williams682450e2016-11-19 09:04:41 -070077 properties:
78 view_url: /admin/vtr/vtrservice/$id$/
79 kind: vTR
80 replaces: service_vtr
81
82 service#volt:
83 type: tosca.nodes.VOLTService
84 requirements:
85 - vsg_tenant:
86 node: service#vsg
87 relationship: tosca.relationships.TenantOfService
88 properties:
89 view_url: /admin/volt/voltservice/$id$/
90 kind: vOLT
91 replaces: service_volt
92 public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
93 private_key_fn: /opt/xos/services/volt/keys/volt_rsa
94 artifacts:
Scott Baker57196542017-04-11 15:48:17 -070095 pubkey: /opt/cord_profile/key_import/volt_rsa.pub
Zack Williams682450e2016-11-19 09:04:41 -070096
97 addresses_vsg:
98 type: tosca.nodes.AddressPool
99 properties:
Andy Bavierd6c09af2017-08-23 17:57:51 -0700100 addresses: 10.7.1.0/24
101 gateway_ip: 10.7.1.1
Jonathan Hart1cec1042017-08-21 17:28:36 -0700102 gateway_mac: a4:23:05:06:01:01
Zack Williams682450e2016-11-19 09:04:41 -0700103
104 addresses_public:
105 type: tosca.nodes.AddressPool
106 properties:
Andy Bavierd6c09af2017-08-23 17:57:51 -0700107 addresses: 10.8.1.0/24
108 gateway_ip: 10.8.1.1
Jonathan Hart1cec1042017-08-21 17:28:36 -0700109 gateway_mac: a4:23:05:06:01:01
Zack Williams682450e2016-11-19 09:04:41 -0700110
111 label_vsg:
112 type: tosca.nodes.NodeLabel
113
114 service#vsg:
115 type: tosca.nodes.VSGService
116 requirements:
Scott Baker7f95bc32017-08-21 09:40:10 -0700117 - addressing_tenant:
118 node: service#addressmanager
119 relationship: tosca.relationships.TenantOfService
Zack Williams682450e2016-11-19 09:04:41 -0700120 - vrouter_tenant:
121 node: service#vrouter
122 relationship: tosca.relationships.TenantOfService
123 properties:
124 view_url: /admin/vsg/vsgservice/$id$/
125 backend_network_label: hpc_client
126 public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
127 private_key_fn: /opt/xos/services/vsg/keys/vsg_rsa
128# node_label: label_vsg
129 replaces: service_vsg
130 artifacts:
Scott Baker57196542017-04-11 15:48:17 -0700131 pubkey: /opt/cord_profile/key_import/vsg_rsa.pub
Zack Williams682450e2016-11-19 09:04:41 -0700132
Scott Baker7f95bc32017-08-21 09:40:10 -0700133 service#addressmanager:
134 type: tosca.nodes.AddressManagerService
Zack Williams682450e2016-11-19 09:04:41 -0700135 requirements:
136 - addresses_vsg:
137 node: addresses_vsg
138 relationship: tosca.relationships.ProvidesAddresses
139 - addresses_public:
140 node: addresses_public
141 relationship: tosca.relationships.ProvidesAddresses
142
Scott Baker7f95bc32017-08-21 09:40:10 -0700143 service#vrouter:
144 type: tosca.nodes.VRouterService
145 properties:
146 view_url: /admin/vrouter/vrouterservice/$id$/
147 replaces: service_vrouter
148
Zack Williams682450e2016-11-19 09:04:41 -0700149 vRouter_ONOS_app:
150 type: tosca.nodes.ONOSvRouterApp
151 requirements:
152 - onos_tenant:
153 node: service#ONOS_Fabric
154 relationship: tosca.relationships.TenantOfService
155 - vrouter_service:
156 node: service#vrouter
157 relationship: tosca.relationships.UsedByService
158 properties:
Jonathan Harta383c7c2017-08-18 13:58:16 -0700159 dependencies: org.onosproject.fpm
Zack Williams682450e2016-11-19 09:04:41 -0700160 autogenerate: vrouter-network-cfg
161
162 template#vsg:
163 type: tosca.nodes.NetworkTemplate
164 properties:
165 visibility: private
166 translation: none
167 vtn_kind: VSG
168
169 # Networks required by the CORD setup
170 {{ site_name }}_vsg-access:
171 type: tosca.nodes.network.Network
172 properties:
173 ip_version: 4
174 requirements:
175 - network_template:
176 node: template#vsg
177 relationship: tosca.relationships.UsesNetworkTemplate
178 - owner:
179 node: {{ site_name }}_vsg
180 relationship: tosca.relationships.MemberOfSlice
181 - connection:
182 node: {{ site_name }}_vsg
183 relationship: tosca.relationships.ConnectsToSlice
184
185 # CORD Slices
186 {{ site_name }}_vsg:
187 description: vSG Controller Slice
188 type: tosca.nodes.Slice
189 properties:
190 network: noauto
191 requirements:
192 - vsg_service:
193 node: service#vsg
194 relationship: tosca.relationships.MemberOfService
195 - site:
196 node: {{ site_name }}
197 relationship: tosca.relationships.MemberOfSite
198 - management:
199 node: management
200 relationship: tosca.relationships.ConnectsToNetwork
Zack Williamsa2763112017-01-03 11:38:38 -0700201{% if use_management_hosts %}
202 - management_hosts:
203 node: management_hosts
204 relationship: tosca.relationships.ConnectsToNetwork
205{% endif %}
Zack Williams682450e2016-11-19 09:04:41 -0700206 - image:
207 node: image#vsg-1.1
208 relationship: tosca.relationships.DefaultImage
209
Scott Baker87207e32017-07-18 10:45:55 -0700210 in#lanside:
211 type: tosca.nodes.InterfaceType
212 properties:
213 direction: in
214
215 out#lanside:
216 type: tosca.nodes.InterfaceType
217 properties:
218 direction: out
219
220 in#wanside:
221 type: tosca.nodes.InterfaceType
222 properties:
223 direction: in
224
225 out#wanside:
226 type: tosca.nodes.InterfaceType
227 properties:
228 direction: out
229
230 volt_lanside:
231 type: tosca.nodes.ServiceInterface
232 requirements:
233 - service:
234 node: service#volt
235 relationship: tosca.relationships.MemberOfService
236 - interface:
237 node: out#lanside
238 relationship: tosca.relationships.IsType
239
240 vsg_lanside:
241 type: tosca.nodes.ServiceInterface
242 requirements:
243 - service:
244 node: service#vsg
245 relationship: tosca.relationships.MemberOfService
246 - interface:
247 node: in#lanside
248 relationship: tosca.relationships.IsType
249
250 vsg_wanside:
251 type: tosca.nodes.ServiceInterface
252 requirements:
253 - service:
254 node: service#vsg
255 relationship: tosca.relationships.MemberOfService
256 - interface:
257 node: out#wanside
258 relationship: tosca.relationships.IsType
259
Scott Baker7f95bc32017-08-21 09:40:10 -0700260 addressmanager_wanside:
Scott Baker87207e32017-07-18 10:45:55 -0700261 type: tosca.nodes.ServiceInterface
262 requirements:
263 - service:
Scott Baker7f95bc32017-08-21 09:40:10 -0700264 node: service#addressmanager
Scott Baker87207e32017-07-18 10:45:55 -0700265 relationship: tosca.relationships.MemberOfService
266 - interface:
267 node: in#wanside
268 relationship: tosca.relationships.IsType