Initial treasuremap/template for site_type ovsdpdk
[yaml_builds.git] / site_type / ovsdpdk / templates / baremetal / rack.j2
1 {% for server in yaml.masters %}
2 ---
3 ##############################################################################
4 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.        #
5 #                                                                            #
6 # Licensed under the Apache License, Version 2.0 (the "License"); you may    #
7 # not use this file except in compliance with the License.                   #
8 #                                                                            #
9 # You may obtain a copy of the License at                                    #
10 #       http://www.apache.org/licenses/LICENSE-2.0                           #
11 #                                                                            #
12 # Unless required by applicable law or agreed to in writing, software        #
13 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
14 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
15 # See the License for the specific language governing permissions and        #
16 # limitations under the License.                                             #
17 ##############################################################################
18 schema: 'drydock/BaremetalNode/v1'
19 metadata:
20   schema: 'metadata/Document/v1'
21   name: {{server.name}}
22   layeringDefinition:
23     abstract: false
24     layer: site
25   storagePolicy: cleartext
26 data:
27   host_profile: ControlPlane
28   # the hostname for a server, could be used in multiple DNS domains to
29   # represent different interfaces
30   addressing:
31       # Which network the address applies to. If a network appears in addressing
32       # that isn't assigned to an interface, design validation will fail
33     - network: oob
34       address: {{server.oob}}
35     - network: pxe
36       # The address assigned. Either a explicit IPv4 or IPv6 address
37       # or dhcp or slaac
38       address: {{server.pxe}}
39     - network: oam
40       address: {{server.host}}
41     - network: storage
42       address: {{server.storage}}
43     - network: overlay
44       address: {{server.neutron}}
45     - network: calico
46       address: {{server.ksn}}
47   metadata:
48     rack: RACK01
49     tags:
50       - 'masters'
51 {% endfor %}
52 {% if 'workers' in yaml %}{% for server in yaml.workers %}
53 ---
54 schema: 'drydock/BaremetalNode/v1'
55 metadata:
56   schema: 'metadata/Document/v1'
57   name: {{server.name}}
58   layeringDefinition:
59     abstract: false
60     layer: site
61   storagePolicy: cleartext
62 data:
63   host_profile: ComputePlane
64   # the hostname for a server, could be used in multiple DNS domains to
65   # represent different interfaces
66   addressing:
67       # Which network the address applies to. If a network appears in addressing
68       # that isn't assigned to an interface, design validation will fail
69     - network: oob
70       address: {{server.oob}}
71     - network: pxe
72       # The address assigned. Either a explicit IPv4 or IPv6 address
73       # or dhcp or slaac
74       address: {{server.pxe}}
75     - network: oam
76       address: {{server.host}}
77     - network: storage
78       address: {{server.storage}}
79     - network: overlay
80       address: {{server.neutron}}
81     - network: calico
82       address: {{server.ksn}}
83   metadata:
84     rack: RACK01
85     tags:
86       - 'workers'
87 {% endfor %}{% endif %}
88 ...