updated templates and scripts for Airship 1.3
[yaml_builds.git] / site_type / sriov-a13 / templates / baremetal / nodes.j2
1 ---
2 # # Drydock BaremetalNode resources for a specific rack are stored in this file.
3 # #
4 # # NOTE: For new sites, you should complete the networks/physical/networks.yaml
5 # # file before working on this file.
6 # #
7 # # In this file, you should make the number of `drydock/BaremetalNode/v1`
8 # # resources equal the number of bare metal nodes you have, either by deleting
9 # # excess BaremetalNode definitions (if there are too many), or by copying and
10 # # pasting the last BaremetalNode in the file until you have the correct number
11 # # of baremetal nodes (if there are too few).
12 # #
13 # # Then in each file, address all additional NEWSITE-CHANGEME markers to update
14 # # the data in these files with the right values for your new site.
15 # #
16 # # *NOTE: The Genesis node is counted as one of the control plane nodes. Note
17 # # that the Genesis node does not appear on this bare metal list, because the
18 # # procedure to reprovision the Genesis host with MaaS has not yet been
19 # # implemented. Therefore there will be only three bare metal nodes in this file
20 # # with the 'masters' tag, as the genesis roles are assigned in a difference
21 # # place (profiles/genesis.yaml).
22 # # NOTE: The host profiles for the control plane are further divided into two
23 # # variants: primary and secondary. The only significance this has is that the
24 # # "primary" nodes are active Ceph nodes, whereas the "secondary" nodes are Ceph
25 # # standby nodes. For Ceph quorum, this means that the control plane split will
26 # # be 3 primary + 1 standby host profile, and the Genesis node counts toward one
27 # # of the 3 primary profiles. Other control plane services are not affected by
28 # # primary vs secondary designation.
29 # #
30 # # TODO: Include the hostname naming convention
31 # #
32 # schema: 'drydock/BaremetalNode/v1'
33 # metadata:
34   # schema: 'metadata/Document/v1'
35   # # NEWSITE-CHANGEME: Replace with the hostname of the first node in the rack,
36   # # after (excluding) genesis.
37   # name: cab23-r720-12
38   # layeringDefinition:
39     # abstract: false
40     # layer: site
41   # storagePolicy: cleartext
42 # data:
43   # # NEWSITE-CHANGEME: The IPv4 address assigned to each logical network on this
44   # # node. In the reference Airship deployment, this is all logical Networks defined
45   # # in networks/physical/networks.yaml. IP addresses are manually assigned, by-hand.
46   # # (what could possibly go wrong!) The instructions differ for each logical
47   # # network, which are laid out below.
48   # addressing:
49     # # The iDrac/iLo IP of the node. It's important that this match up with the
50     # # node's hostname above, so that the rack number and node position encoded
51     # # in the hostname are accurate and matching the node that IPMI operations
52     # # will be performed against (for poweron, poweroff, PXE boot to wipe disk or
53     # # reconfigure identity, etc - very important to get right for these reasons).
54     # # These addresses should already be assigned to nodes racked and stacked in
55     # # the environment; these are not addresses which MaaS assigns.
56     # - network: oob
57       # address: 10.23.104.12
58     # # The IP of the node on the PXE network. Refer to the static IP range
59     # # defined for the PXE network in networks/physical/networks.yaml. Begin allocating
60     # # IPs from this network, starting with the second IP (inclusive) from the
61     # # allocation range of this subnet (Genesis node will have the first IP).
62     # # Ex: If the start IP for the PXE "static" network is 10.23.20.11, then
63     # # genesis will have 10.23.20.11, this node will have 10.23.20.12, and
64     # # so on with incrementing IP addresses with each additional node.
65     # - network: pxe
66       # address: 10.23.20.12
67     # # Genesis node gets first IP, all other nodes increment IPs from there
68     # # within the allocation range defined for the network in
69     # # networks/physical/networks.yaml
70     # - network: oam
71       # address: 10.23.21.12
72     # # Genesis node gets first IP, all other nodes increment IPs from there
73     # # within the allocation range defined for the network in
74     # # networks/physical/networks.yaml
75     # - network: storage
76       # address: 10.23.23.12
77     # # Genesis node gets first IP, all other nodes increment IPs from there
78     # # within the allocation range defined for the network in
79     # # networks/physical/networks.yaml
80     # - network: overlay
81       # address: 10.23.24.12
82     # # Genesis node gets first IP, all other nodes increment IPs from there
83     # # within the allocation range defined for the network in
84     # # networks/physical/networks.yaml
85     # - network: calico
86       # address: 10.23.22.12
87   # # NEWSITE-CHANGEME: Set the host profile for the node.
88   # # Note that there are different host profiles depending if this is a control
89   # # plane vs data plane node, and different profiles that map to different types
90   # # hardware. Control plane host profiles are further broken down into "primary"
91   # # and "secondary" profiles (refer to the Notes section at the top of this doc).
92   # # Select the host profile that matches up to your type of
93   # # hardware and function. E.g., the r720 here refers to Dell R720 hardware, the
94   # # 'cp' refers to a control plane profile, and the "primary" means it will be
95   # # an active member in the ceph quorum. Refer to profiles/host/ for the list
96   # # of available host profiles specific to this site (otherwise, you may find
97   # # a general set of host profiles at the "type" or "global" layers/folders.
98   # # If you have hardware that is not on this list of profiles, you may need to
99   # # create a new host profile for that hardware.
100   # # Regarding control plane vs other data plane profiles, refer to the notes at
101   # # the beginning of this file. There should be one control plane node per rack,
102   # # including Genesis. Note Genesis won't actually be listed in this file as a
103   # # BaremetalNode, but the rest are.
104   # # This is the second "primary" control plane node after Genesis.
105   # host_profile: cp_r720-primary
106   # metadata:
107     # tags:
108       # # NEWSITE-CHANGEME: See previous comment. Apply 'masters' tag for control
109       # # plane node, and 'workers' tag for data plane hosts.
110       # - 'masters'
111     # # NEWSITE-CHANGEME: Refer to site engineering package or other supporting
112     # # documentation for the specific rack name. This should be a rack name that
113     # # is meaningful to data center personnel (i.e. a rack they could locate if
114     # # you gave them this rack designation).
115     # rack: cab23
116 # ...
117 {% for server in yaml.masters %}
118 {% if loop.index > 1 %}
119 ---
120 {% endif %}
121 schema: 'drydock/BaremetalNode/v1'
122 metadata:
123   schema: 'metadata/Document/v1'
124   # NEWSITE-CHANGEME: The next node's hostname
125   name: {{server.name}}
126   layeringDefinition:
127     abstract: false
128     layer: site
129   storagePolicy: cleartext
130 data:
131   # NEWSITE-CHANGEME: The next node's IPv4 addressing
132   addressing:
133     - network: oob
134       address: {{server.oob}}
135     - network: pxe
136       address: {{server.pxe}}
137     - network: oam
138       address: {{server.host}}
139     - network: storage
140       address: {{server.storage}}
141     - network: overlay
142       address: {{server.neutron}}
143     - network: calico
144       address: {{server.ksn}}
145   # NEWSITE-CHANGEME: The next node's host profile
146   host_profile: cp_r720-primary
147   metadata:
148     # NEWSITE-CHANGEME: The next node's rack designation
149     rack: cab23
150     # NEWSITE-CHANGEME: The next node's role desigatnion
151     tags:
152       - 'masters'
153 {% if 'platform' in yaml %}
154   platform:
155     kernel_params:
156 {% for key, value in yaml.platform.kernel_params.items() %}
157       {{key}}: '{{value}}'
158 {% endfor %}
159 {% if 'vcpu_pin_set' in yaml.platform %}
160       isolcpus: '{{yaml.platform.vcpu_pin_set}}'
161 {% endif %}
162 {% endif %}
163 ...
164 {% endfor %}
165 {% if 'workers' in yaml %}{% for server in yaml.workers %}
166 ---
167 schema: 'drydock/BaremetalNode/v1'
168 metadata:
169   schema: 'metadata/Document/v1'
170   # NEWSITE-CHANGEME: The next node's hostname
171   name: cab23-r720-14
172   layeringDefinition:
173     abstract: false
174     layer: site
175   storagePolicy: cleartext
176 data:
177   # NEWSITE-CHANGEME: The next node's IPv4 addressing
178   addressing:
179     - network: oob
180       address: {{server.oob}}
181     - network: pxe
182       address: {{server.pxe}}
183     - network: oam
184       address: {{server.host}}
185     - network: storage
186       address: {{server.storage}}
187     - network: overlay
188       address: {{server.neutron}}
189     - network: calico
190       address: {{server.ksn}}
191   # NEWSITE-CHANGEME: The next node's host profile
192   # This is the third "primary" control plane profile after genesis
193   host_profile: dp_r720
194   metadata:
195     # NEWSITE-CHANGEME: The next node's rack designation
196     rack: cab23
197     # NEWSITE-CHANGEME: The next node's role desigatnion
198     tags:
199       - 'workers'
200 {% if 'platform' in yaml %}
201   platform:
202     kernel_params:
203 {% for key, value in yaml.platform.kernel_params.items() %}
204       {{key}}: '{{value}}'
205 {% endfor %}
206 {% if 'vcpu_pin_set' in yaml.platform %}
207       isolcpus: '{{yaml.platform.vcpu_pin_set}}'
208 {% endif %}
209 {% endif %}
210 ...
211 {% endfor %}{% endif %}