blob: 3fd825adf350830186bf6a4e8f58a323104be6e9 [file] [log] [blame]
Matteo Scandolod246a872019-01-30 11:43:14 -08001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Matteo Scandolo5b728032019-01-30 13:58:48 -080015# curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @mcord-barcelona-fabric.yaml http://192.168.69.1:30007/run
Matteo Scandolod246a872019-01-30 11:43:14 -080016
17tosca_definitions_version: tosca_simple_yaml_1_0
18imports:
19 - custom_types/switch.yaml
20 - custom_types/switchport.yaml
21 - custom_types/portinterface.yaml
22 - custom_types/fabricipaddress.yaml
Matteo Scandoloa95ce022019-01-30 14:12:40 -080023 - custom_types/site.yaml
24 - custom_types/deployment.yaml
25 - custom_types/sitedeployment.yaml
26 - custom_types/node.yaml
27 - custom_types/vrouterservice.yaml
28 - custom_types/vrouterserviceinstance.yaml
Matteo Scandolod246a872019-01-30 11:43:14 -080029
Matteo Scandoloa95ce022019-01-30 14:12:40 -080030description: Configures the ONF SEBA POD with AT&T workflow
Matteo Scandolod246a872019-01-30 11:43:14 -080031
32topology_template:
33 node_templates:
34
Matteo Scandoloa95ce022019-01-30 14:12:40 -080035 # Site deployment
36 mySite:
37 type: tosca.nodes.Site
38 properties:
39 name: mysite
40 login_base: opencord
41 abbreviated_name: ms
42 site_url: http://opencord.org/
43 hosts_nodes: true
44
45 myDeployment:
46 type: tosca.nodes.Deployment
47 properties:
48 name: mydeployment
49
50 site_deployment:
51 type: tosca.nodes.SiteDeployment
52 requirements:
53 - site:
54 node: mySite
55 relationship: tosca.relationships.BelongsToOne
56 - deployment:
57 node: myDeployment
58 relationship: tosca.relationships.BelongsToOne
59
60 # compute nodes
61 node#node1:
62 type: tosca.nodes.Node
63 properties:
64 dataPlaneIntf: eth2
65 dataPlaneIp: 118.0.0.201
66 name: node1
67 requirements:
68 - site_deployment:
69 node: site_deployment
70 relationship: tosca.relationships.BelongsToOne
71
72 node#node2:
73 type: tosca.nodes.Node
74 properties:
75 dataPlaneIntf: eth2
76 dataPlaneIp: 118.0.0.202
77 name: node2
78 requirements:
79 - site_deployment:
80 node: site_deployment
81 relationship: tosca.relationships.BelongsToOne
82
83 node#node3:
84 type: tosca.nodes.Node
85 properties:
86 dataPlaneIntf: eth2
87 dataPlaneIp: 118.0.0.203
88 name: node3
89 requirements:
90 - site_deployment:
91 node: site_deployment
92 relationship: tosca.relationships.BelongsToOne
93
94 # static routes
95
96 service#vrouter:
97 type: tosca.nodes.VRouterService
98 properties:
99 name: vrouter
100 must-exist: true
101
102
103 vroutersi#calico:
104 type: tosca.nodes.VRouterServiceInstance
105 properties:
106 name: calico
107 requirements:
108 - owner:
109 node: service#vrouter
110 relationship: tosca.relationships.BelongsToOne
111
Matteo Scandolod246a872019-01-30 11:43:14 -0800112 # Fabric configuration
113 switch#leaf_1:
114 type: tosca.nodes.Switch
115 properties:
116 driver: ofdpa3
117 ipv4Loopback: 192.168.0.204
118 ipv4NodeSid: 214
119 isEdgeRouter: true
120 name: Agg Switch
121 ofId: of:0000000000000001
122 routerMac: 54:87:de:ad:be:ef
123
124 # Node1 Port
125 port#node_1_port:
126 type: tosca.nodes.SwitchPort
127 properties:
Matteo Scandolo7cb060b2019-01-30 11:57:41 -0800128 portId: 33
Matteo Scandolod246a872019-01-30 11:43:14 -0800129 requirements:
130 - switch:
131 node: switch#leaf_1
132 relationship: tosca.relationships.BelongsToOne
133
134 interface#port_1_interface:
135 type: tosca.nodes.PortInterface
136 properties:
137 vlanUntagged: 20
138 name: node_1
139 requirements:
140 - port:
141 node: port#node_1_port
142 relationship: tosca.relationships.BelongsToOne
143
144 ip#port_1_ip_1:
145 type: tosca.nodes.FabricIpAddress
146 properties:
147 ip: 13.1.1.0/24
148 description: node_1_ip_1
149 requirements:
150 - interface:
151 node: interface#port_1_interface
152 relationship: tosca.relationships.BelongsToOne
153
154 ip#port_1_ip_2:
155 type: tosca.nodes.FabricIpAddress
156 properties:
157 ip: 119.0.0.254/24
158 description: node_1_ip_2
159 requirements:
160 - interface:
161 node: interface#port_1_interface
162 relationship: tosca.relationships.BelongsToOne
163
164 # Node2 Port
165 port#node_2_port:
166 type: tosca.nodes.SwitchPort
167 properties:
Matteo Scandolo7cb060b2019-01-30 11:57:41 -0800168 portId: 34
Matteo Scandolod246a872019-01-30 11:43:14 -0800169 requirements:
170 - switch:
171 node: switch#leaf_1
172 relationship: tosca.relationships.BelongsToOne
173
174 interface#port_2_interface:
175 type: tosca.nodes.PortInterface
176 properties:
177 vlanUntagged: 20
178 name: node_2
179 requirements:
180 - port:
181 node: port#node_2_port
182 relationship: tosca.relationships.BelongsToOne
183
184 ip#port_2_ip_1:
185 type: tosca.nodes.FabricIpAddress
186 properties:
187 ip: 13.1.1.0/24
188 description: node_2_ip_1
189 requirements:
190 - interface:
191 node: interface#port_2_interface
192 relationship: tosca.relationships.BelongsToOne
193
194 ip#port_2_ip_2:
195 type: tosca.nodes.FabricIpAddress
196 properties:
197 ip: 119.0.0.254/24
198 description: node_2_ip_2
199 requirements:
200 - interface:
201 node: interface#port_2_interface
202 relationship: tosca.relationships.BelongsToOne
203
204 # Node3 Port
205 port#node_3_port:
206 type: tosca.nodes.SwitchPort
207 properties:
Matteo Scandolo7cb060b2019-01-30 11:57:41 -0800208 portId: 35
Matteo Scandolod246a872019-01-30 11:43:14 -0800209 requirements:
210 - switch:
211 node: switch#leaf_1
212 relationship: tosca.relationships.BelongsToOne
213
214 interface#port_3_interface:
215 type: tosca.nodes.PortInterface
216 properties:
217 vlanUntagged: 20
218 name: node_3
219 requirements:
220 - port:
221 node: port#node_3_port
222 relationship: tosca.relationships.BelongsToOne
223
224 ip#port_3_ip_1:
225 type: tosca.nodes.FabricIpAddress
226 properties:
227 ip: 13.1.1.0/24
228 description: node_3_ip_1
229 requirements:
230 - interface:
231 node: interface#port_3_interface
232 relationship: tosca.relationships.BelongsToOne
233
234 ip#port_3_ip_2:
235 type: tosca.nodes.FabricIpAddress
236 properties:
237 ip: 119.0.0.254/24
238 description: node_3_ip_2
239 requirements:
240 - interface:
241 node: interface#port_3_interface
242 relationship: tosca.relationships.BelongsToOne