Unattended installations

Version 42 (Oliver Weinmann, 12/27/2011 05:07 am)

1 4 Ohad Levy
{{toc}}
2 4 Ohad Levy
3 1
h1. How do I use unattended installations (Kickstart, jumpstart, preseed)?
4 1
5 21 Ohad Levy
Foreman manages the host creation process by controlling a host's DHCP, DNS, TFTP boot files, Puppet CA and node classification. This is whole process is handled in the core foreman program and in several satellite proxies running at various locations within the organization. More details can be found on the [[Foreman_Architecture]] page. 
6 1
7 27 Ohad Levy
Foreman automates network boot processes using PXEboot, gPXE, (or native Solaris net:dhcp).
8 1
9 26 Ohad Levy
10 27 Ohad Levy
You probably want to look into installing the [[Smart-Proxy:Wiki|Smart Proxy]] (which could be on the same machine as well).
11 26 Ohad Levy
12 26 Ohad Levy
13 3 Ohad Levy
h2. Whats inside the provisioning templates (Kickstart / jumpstart /preseed, pxelinux etc) ?
14 3 Ohad Levy
15 1
These files are all generated dynamically based on the setting of each host in Foreman, things like partition tables and root password can be unique per server.
16 4 Ohad Levy
 
17 1
if you want to see the kickstart/preseed etc you may use the spoof parameter, just point your browser to:
18 1
19 28 Ohad Levy
<pre>http://foreman/unattended/provision?spoof=123.321.123.321</pre>
20 1
 
21 4 Ohad Levy
* 123.321.123.321 is the hosts IP Address (the one you want to build).
22 1
* usually you want to see the page source, the browser might display the file in html which will result in hard to read output.
23 1
24 1
h2. Modifying/Creating the template
25 1
26 18 Justin Sherrill
See [[TemplateWriting]]
27 5 Ohad Levy
28 22 Frank Sweetser
h3. Template association to hosts
29 22 Frank Sweetser
30 22 Frank Sweetser
The guiding principle within Foreman is that we don't want to associate templates with hosts directly.
31 22 Frank Sweetser
There are 4 ways to associate a template with a host
32 22 Frank Sweetser
33 22 Frank Sweetser
# Though a host group.
34 22 Frank Sweetser
# Though an environment.
35 22 Frank Sweetser
# Though a combination of a host group and an environment (such as web servers in development mode).
36 22 Frank Sweetser
# Though an operating system.
37 22 Frank Sweetser
38 22 Frank Sweetser
Therefore, there are few steps which are required in order to relate hosts and templates.
39 22 Frank Sweetser
40 22 Frank Sweetser
# Make sure you define at least one operating systems.
41 22 Frank Sweetser
# Create each template and associate the valid operating systems to it.
42 22 Frank Sweetser
# Optionally, associate the template with hostgroups and/or environments.
43 22 Frank Sweetser
# Edit the relevant operating system and define a default/fallback template for each relevant template type.
44 22 Frank Sweetser
45 22 Frank Sweetser
A special type of a template is called "PXE Default File" which is the default PXE template.
46 22 Frank Sweetser
The included example will setup PXE menus for each configured host group (allowing you to deploy hosts without puppet if you require that functionality).
47 22 Frank Sweetser
48 23 Paul Kelly
h3. Dynamic disk partitioning
49 5 Ohad Levy
50 10 Ohad Levy
It is possible to use a script (e.g a kickstart post script) instead of a static partition table.
51 10 Ohad Levy
see [[Dynamic disk partioning]]
52 20 Ohad Levy
53 20 Ohad Levy
*Note* Kickstart requires that Foreman port would be 80, therefor you should probably configure foreman using passenger or alternative technologies.
54 1
(Examples could be found in our reference "Foreman Puppet module":http://github.com/ohadlevy/puppet-foreman
55 23 Paul Kelly
56 35 Romain Vrignaud
h2. Specific distribution unattended installation details 
57 1
58 38 Romain Vrignaud
* [[Kickstart based unattended installation]]
59 38 Romain Vrignaud
* [[Preseed based unattended installation]]
60 38 Romain Vrignaud
* [[Solaris Unattended installation]]
61 42 Oliver Weinmann
* [[Yast based unattended installation]]
62 1
63 37 Romain Vrignaud
h2. [[gPXE]]
64 1
65 39 Romain Vrignaud
h2. Desactivation
66 1
67 37 Romain Vrignaud
Edit config/settings.yaml and add this line:
68 37 Romain Vrignaud
69 37 Romain Vrignaud
<pre>
70 37 Romain Vrignaud
:unattended: false
71 37 Romain Vrignaud
</pre>
72 37 Romain Vrignaud
73 37 Romain Vrignaud
and restart your foreman instance.
74 37 Romain Vrignaud
75 35 Romain Vrignaud
76 35 Romain Vrignaud
h2. See also :
77 33 Trey Dockendorf
78 33 Trey Dockendorf
see [[Provision KVM VM without DHCP]]
79 33 Trey Dockendorf
80 32 Trey Dockendorf
h2. Troubleshooting Flowchart
81 30 Corey Osman
82 31 Corey Osman
"Flowchart":http://www.gliffy.com/publish/3047598/