Yast based unattended installation » History » Version 6
Oliver Weinmann, 12/23/2011 06:45 AM
1 | 1 | Oliver Weinmann | h1. Autoyast based unattended installation |
---|---|---|---|
2 | |||
3 | h2. Media notes |
||
4 | |||
5 | Installation media can be accessed via nfs,ftp or http. The path to the installation media differs from SLES9 and SLES10/11. So you have to create two separate installation media entries in foreman. |
||
6 | |||
7 | h3. SLES9 |
||
8 | |||
9 | ftp://server/SLES/$major.$minor_$arch |
||
10 | |||
11 | h3. SLES10/11 |
||
12 | |||
13 | ftp://server/SLES/$major.$minor_$arch/CD1 |
||
14 | |||
15 | h2. Autoyast files |
||
16 | |||
17 | 4 | Oliver Weinmann | The Yast2 provisioning templates provided by foreman are working fine for OpenSUSE but not really for SLES. Below is a complete provisioning template tested on SLES 11.1. |
18 | 3 | Oliver Weinmann | |
19 | 4 | Oliver Weinmann | h2. Puppet Version |
20 | 1 | Oliver Weinmann | |
21 | 4 | Oliver Weinmann | The included version of puppet is way to old, even on SLES 11.1. One way to install a more recent version is to download a patch from Novell's website. The patch can be put on a additional installation source and included in the installation process. |
22 | |||
23 | 3 | Oliver Weinmann | h3. SLES 11 |
24 | |||
25 | Download the patch from Novell's website. Please note that you need a valid support contract to download the patch. Create a minimal installation source that can be added during the installation process. This will ensure that a later version of puppet is installed during deployment with foreman. You can find very good instructions on how to create an installation source here: |
||
26 | |||
27 | 1 | Oliver Weinmann | http://en.opensuse.org/SDB:Creating_YaST_installation_sources#repomd.2Frpm_md.2FYUM_sources |
28 | 3 | Oliver Weinmann | |
29 | 4 | Oliver Weinmann | Once you have the install source ready, create a new provision template in forman: |
30 | 1 | Oliver Weinmann | |
31 | 4 | Oliver Weinmann | Name: YaST2 SLES 11.1 Repos |
32 | Snippet: YES |
||
33 | 1 | Oliver Weinmann | |
34 | 4 | Oliver Weinmann | <pre> |
35 | <listentry> |
||
36 | <media_url>ftp://server/SLES/11.1_Updates/</media_url> |
||
37 | <product>VEGA</product> |
||
38 | <product_dir>/</product_dir> |
||
39 | </listentry> |
||
40 | </pre> |
||
41 | |||
42 | 5 | Oliver Weinmann | h2. Additional installation sources e.g. SDK |
43 | 4 | Oliver Weinmann | |
44 | Many important packages are not included in the default installation media. In case you would like to add the SDK (Software Development Kit) install sources create another provision template. |
||
45 | |||
46 | Name: YaST2 SLES 11.1 SDK |
||
47 | Snippet: YES |
||
48 | |||
49 | <pre> |
||
50 | <listentry> |
||
51 | <media_url>ftp://server/SLES/11.1_SDK/</media_url> |
||
52 | <product>VEGA</product> |
||
53 | <product_dir>/</product_dir> |
||
54 | </listentry> |
||
55 | </pre> |
||
56 | |||
57 | 6 | Oliver Weinmann | h2. Software Packages |
58 | 1 | Oliver Weinmann | |
59 | 6 | Oliver Weinmann | If you don't specify any software packages autoyast will assume a minimal installation. This means no GUI but a very small footprint on the installed system. In case you want a default Installation with GUI and so on, create one more provisioning template to hold the package definitions. |
60 | |||
61 | Name: Yast SLES 11.1 Packages |
||
62 | Snippet: YES |
||
63 | |||
64 | 1 | Oliver Weinmann | <pre> |
65 | 6 | Oliver Weinmann | <base>default</base> |
66 | <packages config:type="list"> |
||
67 | <package>ConsoleKit-32bit</package> |
||
68 | <package>Mesa-32bit</package> |
||
69 | <package>PolicyKit-32bit</package> |
||
70 | <package>PolicyKit-gnome-libs-32bit</package> |
||
71 | <package>aspell-32bit</package> |
||
72 | <package>at-spi-32bit</package> |
||
73 | <package>audiofile-32bit</package> |
||
74 | <package>audit-libs-32bit</package> |
||
75 | <package>bind-libs-32bit</package> |
||
76 | <package>cpufrequtils-32bit</package> |
||
77 | <package>cracklib-32bit</package> |
||
78 | <package>cryptconfig-32bit</package> |
||
79 | <package>cyrus-sasl-32bit</package> |
||
80 | <package>cyrus-sasl-gssapi-32bit</package> |
||
81 | <package>cyrus-sasl-plain-32bit</package> |
||
82 | <package>dbus-1-32bit</package> |
||
83 | <package>dbus-1-glib-32bit</package> |
||
84 | <package>device-mapper-32bit</package> |
||
85 | <package>evolution-data-server-32bit</package> |
||
86 | <package>fam-32bit</package> |
||
87 | <package>file-32bit</package> |
||
88 | <package>freeglut-32bit</package> |
||
89 | <package>freetype-32bit</package> |
||
90 | <package>fribidi-32bit</package> |
||
91 | <package>gconf2-32bit</package> |
||
92 | <package>gdbm-32bit</package> |
||
93 | <package>gettext-runtime-32bit</package> |
||
94 | <package>giflib-32bit</package> |
||
95 | <package>glibc-locale-32bit</package> |
||
96 | <package>gnome-keyring-32bit</package> |
||
97 | <package>gnome-panel-32bit</package> |
||
98 | <package>gnome-vfs2-32bit</package> |
||
99 | <package>gpm-32bit</package> |
||
100 | <package>hal-32bit</package> |
||
101 | <package>hunspell-32bit</package> |
||
102 | <package>libFLAC8-32bit</package> |
||
103 | <package>libHX13-32bit</package> |
||
104 | <package>libacl-32bit</package> |
||
105 | <package>libaio-32bit</package> |
||
106 | <package>libart_lgpl-32bit</package> |
||
107 | <package>libattr-32bit</package> |
||
108 | <package>libavahi-client3-32bit</package> |
||
109 | <package>libavahi-common3-32bit</package> |
||
110 | <package>libavahi-glib1-32bit</package> |
||
111 | <package>libbonobo-32bit</package> |
||
112 | <package>libbonoboui-32bit</package> |
||
113 | <package>libbz2-1-32bit</package> |
||
114 | <package>libcanberra-gtk-32bit</package> |
||
115 | <package>libcanberra-gtk0-32bit</package> |
||
116 | <package>libcanberra0-32bit</package> |
||
117 | <package>libcap2-32bit</package> |
||
118 | <package>libcroco-0_6-3-32bit</package> |
||
119 | <package>libcurl4-32bit</package> |
||
120 | <package>libdb-4_5-32bit</package> |
||
121 | <package>libdrm-32bit</package> |
||
122 | <package>libesd0-32bit</package> |
||
123 | <package>libfreebl3-32bit</package> |
||
124 | <package>libgcrypt11-32bit</package> |
||
125 | <package>libglade2-32bit</package> |
||
126 | <package>libgnome-32bit</package> |
||
127 | <package>libgnome-desktop-2-11-32bit</package> |
||
128 | <package>libgnomecanvas-32bit</package> |
||
129 | <package>libgnutls26-32bit</package> |
||
130 | <package>libgpg-error0-32bit</package> |
||
131 | <package>libgsf-1-114-32bit</package> |
||
132 | <package>libgstreamer-0_10-0-32bit</package> |
||
133 | <package>libgthread-2_0-0-32bit</package> |
||
134 | <package>libgweather1-32bit</package> |
||
135 | <package>libical0-32bit</package> |
||
136 | <package>libidl-32bit</package> |
||
137 | <package>libidn-32bit</package> |
||
138 | <package>liblcms1-32bit</package> |
||
139 | <package>libldap-2_4-2-32bit</package> |
||
140 | <package>libltdl7-32bit</package> |
||
141 | <package>libmng-32bit</package> |
||
142 | <package>libnetpbm10-32bit</package> |
||
143 | <package>libnscd-32bit</package> |
||
144 | <package>libnsssharedhelper0-32bit</package> |
||
145 | <package>libogg0-32bit</package> |
||
146 | <package>libopenct1-32bit</package> |
||
147 | <package>libopensc2-32bit</package> |
||
148 | <package>libproxy0-32bit</package> |
||
149 | <package>libproxy0-config-gnome</package> |
||
150 | <package>libpulse0-32bit</package> |
||
151 | <package>libqt4-32bit</package> |
||
152 | <package>libqt4-qt3support-32bit</package> |
||
153 | <package>libqt4-sql-32bit</package> |
||
154 | <package>libqt4-x11-32bit</package> |
||
155 | <package>libreiserfs-32bit</package> |
||
156 | <package>librsvg-32bit</package> |
||
157 | <package>libsepol1-32bit</package> |
||
158 | <package>libsmbclient0-32bit</package> |
||
159 | <package>libsmbios2-32bit</package> |
||
160 | <package>libsndfile-32bit</package> |
||
161 | <package>libsoup-2_4-1-32bit</package> |
||
162 | <package>libsqlite3-0-32bit</package> |
||
163 | <package>libstdc++33-32bit</package> |
||
164 | <package>libtalloc1-32bit</package> |
||
165 | <package>libtasn1-3-32bit</package> |
||
166 | <package>libtdb1-32bit</package> |
||
167 | <package>libtool-32bit</package> |
||
168 | <package>libvorbis-32bit</package> |
||
169 | <package>libwbclient0-32bit</package> |
||
170 | <package>libwnck-1-22-32bit</package> |
||
171 | <package>libxcrypt-32bit</package> |
||
172 | <package>libxml2-32bit</package> |
||
173 | <package>libxslt-32bit</package> |
||
174 | <package>mozilla-nspr-32bit</package> |
||
175 | <package>mozilla-nss-32bit</package> |
||
176 | <package>mozilla-xulrunner191-32bit</package> |
||
177 | <package>nautilus-32bit</package> |
||
178 | <package>nautilus-cd-burner-32bit</package> |
||
179 | <package>opensc-32bit</package> |
||
180 | <package>openslp-32bit</package> |
||
181 | <package>opie-32bit</package> |
||
182 | <package>orbit2-32bit</package> |
||
183 | <package>pam-32bit</package> |
||
184 | <package>pam-modules-32bit</package> |
||
185 | <package>pam_mount-32bit</package> |
||
186 | <package>parted-32bit</package> |
||
187 | <package>pciutils-32bit</package> |
||
188 | <package>pcsc-lite-32bit</package> |
||
189 | <package>perl-32bit</package> |
||
190 | <package>popt-32bit</package> |
||
191 | <package>qt3-32bit</package> |
||
192 | <package>rpm-32bit</package> |
||
193 | <package>samba-32bit</package> |
||
194 | <package>samba-client-32bit</package> |
||
195 | <package>startup-notification-32bit</package> |
||
196 | <package>strace-32bit</package> |
||
197 | <package>sysfsutils-32bit</package> |
||
198 | <package>tcl-32bit</package> |
||
199 | <package>tcpd-32bit</package> |
||
200 | <package>tk-32bit</package> |
||
201 | <package>utempter-32bit</package> |
||
202 | <package>xaw3d-32bit</package> |
||
203 | <package>xorg-x11-driver-video-radeonhd</package> |
||
204 | <package>yast2-trans-en_GB</package> |
||
205 | </packages> |
||
206 | <patterns config:type="list"> |
||
207 | <pattern>Minimal</pattern> |
||
208 | <pattern>WBEM</pattern> |
||
209 | <pattern>apparmor</pattern> |
||
210 | <pattern>base</pattern> |
||
211 | <pattern>documentation</pattern> |
||
212 | <pattern>gnome</pattern> |
||
213 | <pattern>print_server</pattern> |
||
214 | <pattern>x11</pattern> |
||
215 | </patterns> |
||
216 | </pre> |
||
217 | |||
218 | This is the default package selection of a fresh installed SLES 11.1 system. I'm not sure but maybe just defining the patterns is enough. |
||
219 | |||
220 | h2. Provisioning template |
||
221 | |||
222 | And finally a good and minimal provisioning template, tested on SLES 11.1: |
||
223 | |||
224 | <pre> |
||
225 | 1 | Oliver Weinmann | <?xml version="1.0" encoding="UTF-8"?> |
226 | <!DOCTYPE profile> |
||
227 | <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> |
||
228 | <general> |
||
229 | <mode> |
||
230 | <confirm config:type="boolean">false</confirm> |
||
231 | <final_reboot config:type="boolean">true</final_reboot> |
||
232 | </mode> |
||
233 | <%25= snippets "YaST2 Signature-Handling" -%25> |
||
234 | </general> |
||
235 | <networking> |
||
236 | <dns> |
||
237 | <hostname><%25= @host.name %25></hostname> |
||
238 | <resolv_conf_policy>auto</resolv_conf_policy> |
||
239 | </dns> |
||
240 | <interfaces config:type="list"> |
||
241 | <interface> |
||
242 | <bootproto>dhcp</bootproto> |
||
243 | <device>eth0</device> |
||
244 | <startmode>auto</startmode> |
||
245 | <usercontrol>no</usercontrol> |
||
246 | </interface> |
||
247 | </interfaces> |
||
248 | </networking> |
||
249 | <ntp-client> |
||
250 | <configure_dhcp config:type="boolean">false</configure_dhcp> |
||
251 | <peers config:type="list"> |
||
252 | <peer> |
||
253 | <address>ntp</address> |
||
254 | <initial_sync config:type="boolean">true</initial_sync> |
||
255 | <options></options> |
||
256 | <type>server</type> |
||
257 | </peer> |
||
258 | </peers> |
||
259 | <start_at_boot config:type="boolean">true</start_at_boot> |
||
260 | <start_in_chroot config:type="boolean">true</start_in_chroot> |
||
261 | </ntp-client> |
||
262 | <%25= @host.diskLayout %25> |
||
263 | <runlevel> |
||
264 | <default>5</default> |
||
265 | </runlevel> |
||
266 | <add-on> |
||
267 | <add_on_products config:type="list"> |
||
268 | <%25= snippets "YaST2 SLES 11.1 SDK" -%25> |
||
269 | <%25= snippets "YaST2 SLES 11.1 Repos" -%25> |
||
270 | </add_on_products> |
||
271 | </add-on> |
||
272 | <software> |
||
273 | 6 | Oliver Weinmann | <%25= snippets "YaST2 SLES 11.1 Packages" -%25> |
274 | </software> |
||
275 | 1 | Oliver Weinmann | <x11> |
276 | <color_depth config:type="integer">16</color_depth> |
||
277 | <display_manager>gdm</display_manager> |
||
278 | <enable_3d config:type="boolean">false</enable_3d> |
||
279 | <enable_xgl config:type="boolean">false</enable_xgl> |
||
280 | <resolution>1280x1024 (SXGA)</resolution> |
||
281 | <window_manager>gnome</window_manager> |
||
282 | </x11> |
||
283 | <users config:type="list"> |
||
284 | <user> |
||
285 | <username>root</username> |
||
286 | <encrypted config:type="boolean">true</encrypted> |
||
287 | <fullname>root</fullname> |
||
288 | <gid>0</gid> |
||
289 | <home>/root</home> |
||
290 | <shell>/bin/bash</shell> |
||
291 | <uid>0</uid> |
||
292 | <user_password><%25= root_pass %25></user_password> |
||
293 | </user> |
||
294 | </users> |
||
295 | <scripts> |
||
296 | <post-scripts config:type="list"> |
||
297 | <script> |
||
298 | <filename>post.sh</filename> |
||
299 | <interpreter>shell</interpreter> |
||
300 | <network_needed config:type="boolean">true</network_needed> |
||
301 | <notification>Setting up Puppet / Foreman ...</notification> |
||
302 | <debug config:type="boolean">true</debug> |
||
303 | <source><![CDATA[ |
||
304 | cat > /etc/puppet/puppet.conf << EOF |
||
305 | <%25= snippets "puppet.conf" -%25> |
||
306 | EOF |
||
307 | /usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags no_such_tag --server puppet --no-daemonize |
||
308 | /usr/bin/wget -q -O /dev/null --no-check-certificate <%25= foreman_url %25> |
||
309 | /sbin/chkconfig puppet on -f |
||
310 | ]]> |
||
311 | </source> |
||
312 | </script> |
||
313 | </post-scripts> |
||
314 | </scripts> |
||
315 | </profile> |
||
316 | 2 | Oliver Weinmann | </pre> |