summaryrefslogtreecommitdiffstats
path: root/README
blob: 9e30fedbaf9a901d4976da30c048d35abc5db0c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
Steel Toe - Taking the pain out of kickstart

QUICKSTART

 1. Install steeltoe rpm or "make install"
 2. Modify /etc/steeltoe/steeltoe.xml for your environment
 3. steeltoe gendhcpd -o /etc/dhcpd.steeltoe.conf
 4. Modify /etc/dhcpd.conf to include /etc/dhcpd.steeltoe.conf
 5. Configure hosts to boot from hard disk before ethernet
 6. steeltoe install <tree> <host>

What does Steel Toe do?

  Steel Toe makes it easier to do kickstart installs on lots of hosts.
  It generates the config files needed to PXE install systems using
  kickstart.

What does Steel Toe not do?

  Steel Toe does not provide a way to retrieve the images that Steel Toe
  installs.  Mirroring distribution trees is a separate step that Steel Toe
  does not try to solve.

How does Steel Toe do it all?

  Steel Toe makes extensive use of XML and related technologies.  All
  data is stored in one flat XML file that can be spread out into
  multiple files using XInclude.  Data is pulled from the file using
  XPath expression.  Config files are generated using XSLT and XPath.
  Everything is tied together with a bash script.

  Steel Toe uses a unique TFTP directory organization method to keep
  things simple.  Each host has its own directory under the TFTP root
  directory to hold its bootloader, bootloader config, kickstart config,
  kernel, and initial ramdisk.

  Steel Toe works on the principle that systems should not have to check
  in with Steel Toe when they are done an install.  The systems should
  be configured to boot from the hard disk _before_ the network.  This
  means that when a system successfully installs it does not have to
  check in with Steel Toe to disable PXE booting.  It does mean that if
  an install fails, manual intervention may be required to get the
  system to retry the install.

  Steel Toe was not meant to be a finished solution.  It is supposed to
  be a starting point for automating kickstart installs.  The config
  files and templates are meant to be customized for each site.  That is
  why they are installed in /etc/steeltoe rather than
  /usr/share/steeltoe.

Steel Toe Configuration - /etc/steeltoe/steeltoe.xml

  Steel Toe uses one XML document for all configuration and data.  This
  includes all trees that can be installed and all hosts that can be
  installed to.  The document's root element should be <steeltoe>.

  Global Configuration
  
    The global configuration is contained in a <config> element which
    should be a child of the <steeltoe> element.  The following tags are
    currently used in Steel Toe.  You can define additional tags as
    needed to hold your configuration data.  To access these tags in a
    XML stylesheet use an XPath expression like "/steeltoe/config/foo."

    <tftpserver>

    This is the hostname of the TFTP server.

    <tftproot>

    This is the directory where all Steel Toe generated config files
    will go so hosts can access them through TFTP.

    <yabootetc>

    Yaboot insists that config files be put in /etc on the TFTP server.
    Set this value so Steel Toe can find this directory and place
    symlinks from here to the host's yaboot.conf in its directory.

    <tftpbase>

    This is the base directory that hosts will use to access files
    through the TFTP server.

    <kickstartbase>

    This is the base URL which hosts will use to find their kickstart
    file.  Steel Toe saves the generated kickstart file to the TFTP
    directory for each host, so this URL should point to the same
    directory as <tftpbase>, but using a method allowed in the ks=
    kernel argument.

    <remoteshell>

    This is the remote shell command to use when Steel Toe wants to run
    commands on the host.  This is used for configuring the boot loader or
    rebooting the host.

    <remotecopy>

    This is the remote copy command to use when Steel Toe wants to copy
    files to the host.  This is used for copying kernels and ramdisks to
    the host for auto-kickstart installing.

    <treeserver>

    This is the host name of the server that holds all trees.  It is
    used to generate the HTTP, FTP, or NFS URLs needed to install the
    trees.

    <bootloader>

    This is a list of boot loaders and their full path.  This is used by
    Steel Toe to link the bootloader for each host into its respective
    TFTP directory.  Example:
      
      <bootloader>
        <pxelinux.0>/tftpboot/pxelinux/pxelinux.0</pxelinux.0>
        <elilo.efi>/tftpboot/efi/elilo.efi</elilo.efi>
      </bootloader>

  Trees

    Trees are installable distribution trees.  They correspond to the
    "os" directory in a Red Hat Enterprise Linux build.  Each tree has a
    name, a path element, and a meta section.  The current templates
    expect that <path> should work for all access methods (local, NFS,
    HTTP, FTP, etc).  The names do not have to be unique.  meta/arch is
    used a lot to match hosts with the correct trees.

    Use one entry per path, so each arch and variant of a release will
    have its own entry.

      <tree name="RHEL4-U4">
        <path>/dist/released/RHEL-4/U4/AS/i386/tree</path>
        <meta>
          <family>RHELU4</family><variant>AS</variant><arch>i386</arch><kernel>2.6.9-42.EL</kernel>
        </meta>
      </tree>

  Hosts

    Hosts are systems that can be installed with Steel Toe.  Each host
    has a name, a set of options, and a set of kickstart options.

      <host name="dash-02">
        <macaddr>00:12:3F:2A:AF:96</macaddr>
        <fqdn>dash-02.lab.example.com</fqdn>
        <arch>x86_64</arch>
        <bootloader>pxelinux.0</bootloader>
        <kickstart>
          <ksparams>nostorage</ksparams>
          <ksdevice>eth0</ksdevice>
          
          <device type="scsi">ata_piix</device>
          <device type="scsi">qla2xxx</device>
          <rootdisk>sda</rootdisk>
        </kickstart>
      </host>

    name="foo"

    This is the short name for the host.  It will be used to select the
    host for installation.

    <macaddr>

    This is the MAC address of the ethernet card used for PXE booting.
    Steel Toe needs this to generate a dhcpd.conf snippet for the host.

    <fqdn>

    This is the Fully Qualified Domain Name of the host.

    <arch>

    This is the architecture of the host.  This is used to match against
    the meta/arch element of the trees.

    <bootloader>

    The bootloader used to network boot the host.  This should have a
    corresponding element in /steeltoe/config/bootloader.

    <kickstart>

    This section defines values used in the kickstart file.  Kickstart
    sections can specify a family to match against.  The select-ks.xsl
    file determines which kickstart section is used to generate the
    kickstart file.

    Inside the <kickstart> section are several elements that are used to
    modify how the kickstart file is generated and what kernel arguments
    are used.

      <ksparams>
      
      The kickstart parameters to pass to the kernel via the boot
      loader.

      <ksdevice>

      The ethernet device to use to fetch the kickstart file.

      <device type="scsi">

      The element corresponds directly to the device kickstart option.
      It allows you to specify the order in which scsi drivers are
      loaded.

      <rootdisk>

      The device to use as the root disk.

Steel Toe Command Line - steeltoe

  Steel Toe is held together with a single bash script called
  "steeltoe."  steeltoe provides subcommands which makes Steel Toe go.

  gendhcpd [ -o outputfile ]

  This command generates host declarations for all hosts defined in
  steeltoe.xml.  This can be included directly into an ISC DHCPD config
  file.  It does not generate subnet declarations for the hosts.  Modify
  dhcpd.conf to alter the output of this command.

  install [-r][-m http|ftp|nfs] tree host [host ...]

  Install the specified tree on the listed hosts.  This is the primary
  subcommand of steeltoe.  It creates the TFTP directory for each host
  and populates it with the bits required to install the specified tree.
  The -r option tells Steel Toe to reboot the node.  The -m option
  allows the user to specify what installation method to try.

  list [-v] <host|tree>

  This is a simple subcommand to list all of the trees or hosts in
  steeltoe.xml.  It needs work.

  genks [ -o outputfile ] host tree

  This command generates a kickstart file for the specified host and
  tree.  Host and tree should be in steeltoe.xml.  This command is used
  internally by the install subcommand.  Modify kickstart.xsl to alter
  the output of this command.

  genpxe [ -o outputfile ] host tree

  This command generates a PXELINUX config to install the specified tree
  on the specified host.  This command is used internally by the install
  subcommand.  Modify pxeconf.xsl to alter the output of this command.

  genelilo [ -o outputfile ] host tree

  This command generates a ELILO config to install the specified tree on
  the specified host.  This command is used internally by the install
  subcommand.  Modify eliloconf.xsl to alter the output of this command.

Steel Toe Helper Tools

  Steel Toe relies on two commands to help with processing XML files.
  These commands are part of the xpe package.

  gxpp - Global XPath Print

  This tool makes it trivial to extract information from an XML file.
  It is used to extract configuration information in steeltoe.sh and is
  useful for testing XPath expressions before they are added to .xsl
  files.  See built in help for usage.

  gxpm - Global XPath Merge

  This tool makes it trivial to add or remove sections of XML documents.
  It takes an XML document from standard input and attaches it to the
  specified document in the location specified.  This makes it easy for
  a tree mirroring script to generate the <tree> section and add it to
  steeltoe.xml.

Steel Toe Template files

  Steel Toe depends on XSL Transformations to function.  These .xsl
  files are meant to be customized to work for your environment.  Here
  is a guide to the .xsl files included in Steel Toe.

  dhcpd.xsl

  This is used by the gendhcpd subcommand to create a dhcpd.conf
  snippet.  It uses the tftpbase and tftpserver global config options
  and the name, macaddr, and bootloader host config options.

  select-ks.xsl

  This file is used by other templates to select the appropriate
  kickstart section from the host configuration.  It expects the XSLT
  variables $host and $dist to be set.  It in turn defines a $ks
  variable that references the correct kickstart section.

  eliloconf.xsl

  This is used by the genelilo subcommand to create a elilo.conf for
  systems that use ELILO to boot.  It makes use of two parameters which
  should be passed on the command line, hostname and treename.  It uses
  the kickstartbase global config option.

  pxeconf.xsl

  This is used by the genpxe subcommand to create a PXELINUX config
  file.  It makes use of two parameters which should be passed on the
  command line, hostname and treename.  It uses the kickstartbase global
  config option.

  yaboot.xsl

  This is used by the genyaboot subcommand to create a yaboot config
  file.

  autoks-args.xsl

  This is used to generate the kickstart arguments used during auto-
  kickstart installs.  It takes advantage of select-ks.xsl to get the
  parameters right for the selected tree.

  kickstart.xsl

  This is the template for making kickstart files.  This will probably
  be the file you customize the most.

  list.xsl

  This file is used to generate the list subcommand's output.  Look away
  before you go blind.


Configuring hosts for use with Steel Toe

  Steel Toe expects hosts to be configured in a certain way.  Here are
  settings to chanage on each host before using Steel Toe.

  All Hosts

  Steel Toe expects all hosts to boot from the hard disk before booting
  from the network.  The theory is that we only want to boot over the
  network when we need to reinstall the host.  Otherwise the host should
  happily boot from the local hard disk and continue running the
  installed environment.

  x86 and x86-64 PXE Bootable Hosts

  In the BIOS settings, set the hard disk to boot before the network
  interfaces.

  ia64 Hosts

  Network booting is handled through EFI on ia64 systems.  Create an EFI
  boot entry with the label "Steeltoe" which boots from the network.

  IBM pSeries hosts

  In the SMS menus, configure the system to boot from the hard disk,
  then the network.  

  Steel Toe requires yaboot 1.3.15 or later which includes the netboot
  fixes.  This allows Steel Toe to use yaboot config files instead of
  the "boot-file" nvram variable to set the kernel parameters.  You
  should clear the boot-file variable.

    nvsetenv boot-file ""

How to set up steeltoe

 1. Install the steeltoe package 

software requirements
  isc dhcpd

integrating with isc dhcpd

BIOS settings to use on nodes
  HDD before ethernet


Config files and stylesheets are meant to be customized

Getting boot loaders (pxelinux.0 from syslinux, elilo.efi)


Recommended Reading

XML Path Language (XPath) - http://www.w3.org/TR/xpath
XSL Transformations (XSLT) - http://www.w3.org/TR/xslt