blob: bc8a07f4b3cdd0ec50a18cd398042cf746c0e9c2 [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
Zack Williams682450e2016-11-19 09:04:41 -070026
27topology_template:
28 node_templates:
29
30# site, image, fully created in deployment.yaml
31 {{ site_name }}:
32 type: tosca.nodes.Site
33
34 image#vsg-1.1:
35 type: tosca.nodes.Image
36
37# management networks, fully created in management-net.yaml
38 management:
39 type: tosca.nodes.network.Network.XOS
40 properties:
41 no-create: true
42 no-delete: true
43 no-update: true
44
Zack Williamsa2763112017-01-03 11:38:38 -070045{% if use_management_hosts %}
Zack Williams682450e2016-11-19 09:04:41 -070046 management_hosts:
47 type: tosca.nodes.network.Network.XOS
48 properties:
49 no-create: true
50 no-delete: true
51 no-update: true
Zack Williamsa2763112017-01-03 11:38:38 -070052{% endif %}
Zack Williams682450e2016-11-19 09:04:41 -070053
Scott Baker87207e32017-07-18 10:45:55 -070054 service#rcord:
55 type: tosca.nodes.Service
56
Zack Williams682450e2016-11-19 09:04:41 -070057# ONOS_CORD, fully created in vtn.yaml
58 service#ONOS_CORD:
59 type: tosca.nodes.ONOSService
60 properties:
61 no-delete: true
62 no-create: true
63 no-update: true
64
65# ONOS_Fabric, fully created in fabric.yaml
66 service#ONOS_Fabric:
67 type: tosca.nodes.ONOSService
68 properties:
69 no-delete: true
70 no-create: true
71 no-update: true
72
73# CORD Services
74 service#vtr:
Scott Baker3a5dea72017-03-06 23:01:01 -080075 type: tosca.nodes.VTRService
Zack Williams682450e2016-11-19 09:04:41 -070076 properties:
77 view_url: /admin/vtr/vtrservice/$id$/
78 kind: vTR
79 replaces: service_vtr
80
81 service#volt:
82 type: tosca.nodes.VOLTService
83 requirements:
84 - vsg_tenant:
85 node: service#vsg
86 relationship: tosca.relationships.TenantOfService
87 properties:
88 view_url: /admin/volt/voltservice/$id$/
89 kind: vOLT
90 replaces: service_volt
91 public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
92 private_key_fn: /opt/xos/services/volt/keys/volt_rsa
93 artifacts:
Scott Baker57196542017-04-11 15:48:17 -070094 pubkey: /opt/cord_profile/key_import/volt_rsa.pub
Zack Williams682450e2016-11-19 09:04:41 -070095
96 addresses_vsg:
97 type: tosca.nodes.AddressPool
98 properties:
99 addresses: 10.6.1.128/26
100 gateway_ip: 10.6.1.129
101 gateway_mac: 02:42:0a:06:01:01
102
103 addresses_public:
104 type: tosca.nodes.AddressPool
105 properties:
106 addresses: 10.6.1.192/26
107 gateway_ip: 10.6.1.193
108 gateway_mac: 02:42:0a:06:01:01
109
110 label_vsg:
111 type: tosca.nodes.NodeLabel
112
113 service#vsg:
114 type: tosca.nodes.VSGService
115 requirements:
116 - vrouter_tenant:
117 node: service#vrouter
118 relationship: tosca.relationships.TenantOfService
119 properties:
120 view_url: /admin/vsg/vsgservice/$id$/
121 backend_network_label: hpc_client
122 public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
123 private_key_fn: /opt/xos/services/vsg/keys/vsg_rsa
124# node_label: label_vsg
125 replaces: service_vsg
126 artifacts:
Scott Baker57196542017-04-11 15:48:17 -0700127 pubkey: /opt/cord_profile/key_import/vsg_rsa.pub
Zack Williams682450e2016-11-19 09:04:41 -0700128
129 service#vrouter:
130 type: tosca.nodes.VRouterService
131 properties:
132 view_url: /admin/vrouter/vrouterservice/$id$/
133 replaces: service_vrouter
134 requirements:
135 - addresses_vsg:
136 node: addresses_vsg
137 relationship: tosca.relationships.ProvidesAddresses
138 - addresses_public:
139 node: addresses_public
140 relationship: tosca.relationships.ProvidesAddresses
141
142 vRouter_ONOS_app:
143 type: tosca.nodes.ONOSvRouterApp
144 requirements:
145 - onos_tenant:
146 node: service#ONOS_Fabric
147 relationship: tosca.relationships.TenantOfService
148 - vrouter_service:
149 node: service#vrouter
150 relationship: tosca.relationships.UsedByService
151 properties:
Jonathan Harta383c7c2017-08-18 13:58:16 -0700152 dependencies: org.onosproject.fpm
Zack Williams682450e2016-11-19 09:04:41 -0700153 autogenerate: vrouter-network-cfg
154
155 template#vsg:
156 type: tosca.nodes.NetworkTemplate
157 properties:
158 visibility: private
159 translation: none
160 vtn_kind: VSG
161
162 # Networks required by the CORD setup
163 {{ site_name }}_vsg-access:
164 type: tosca.nodes.network.Network
165 properties:
166 ip_version: 4
167 requirements:
168 - network_template:
169 node: template#vsg
170 relationship: tosca.relationships.UsesNetworkTemplate
171 - owner:
172 node: {{ site_name }}_vsg
173 relationship: tosca.relationships.MemberOfSlice
174 - connection:
175 node: {{ site_name }}_vsg
176 relationship: tosca.relationships.ConnectsToSlice
177
178 # CORD Slices
179 {{ site_name }}_vsg:
180 description: vSG Controller Slice
181 type: tosca.nodes.Slice
182 properties:
183 network: noauto
184 requirements:
185 - vsg_service:
186 node: service#vsg
187 relationship: tosca.relationships.MemberOfService
188 - site:
189 node: {{ site_name }}
190 relationship: tosca.relationships.MemberOfSite
191 - management:
192 node: management
193 relationship: tosca.relationships.ConnectsToNetwork
Zack Williamsa2763112017-01-03 11:38:38 -0700194{% if use_management_hosts %}
195 - management_hosts:
196 node: management_hosts
197 relationship: tosca.relationships.ConnectsToNetwork
198{% endif %}
Zack Williams682450e2016-11-19 09:04:41 -0700199 - image:
200 node: image#vsg-1.1
201 relationship: tosca.relationships.DefaultImage
202
Scott Baker87207e32017-07-18 10:45:55 -0700203 in#lanside:
204 type: tosca.nodes.InterfaceType
205 properties:
206 direction: in
207
208 out#lanside:
209 type: tosca.nodes.InterfaceType
210 properties:
211 direction: out
212
213 in#wanside:
214 type: tosca.nodes.InterfaceType
215 properties:
216 direction: in
217
218 out#wanside:
219 type: tosca.nodes.InterfaceType
220 properties:
221 direction: out
222
223 volt_lanside:
224 type: tosca.nodes.ServiceInterface
225 requirements:
226 - service:
227 node: service#volt
228 relationship: tosca.relationships.MemberOfService
229 - interface:
230 node: out#lanside
231 relationship: tosca.relationships.IsType
232
233 vsg_lanside:
234 type: tosca.nodes.ServiceInterface
235 requirements:
236 - service:
237 node: service#vsg
238 relationship: tosca.relationships.MemberOfService
239 - interface:
240 node: in#lanside
241 relationship: tosca.relationships.IsType
242
243 vsg_wanside:
244 type: tosca.nodes.ServiceInterface
245 requirements:
246 - service:
247 node: service#vsg
248 relationship: tosca.relationships.MemberOfService
249 - interface:
250 node: out#wanside
251 relationship: tosca.relationships.IsType
252
253 vrouter_wanside:
254 type: tosca.nodes.ServiceInterface
255 requirements:
256 - service:
257 node: service#vrouter
258 relationship: tosca.relationships.MemberOfService
259 - interface:
260 node: in#wanside
261 relationship: tosca.relationships.IsType