Yast based unattended installation » History » Version 1
Oliver Weinmann, 12/23/2011 05:46 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 | The Yast2 provisioning templates provided by foreman are working fine for OpenSUSE but not really for SLES. A good and minimal provisioning template tested on SLES 11.1: |
||
18 | |||
19 | <?xml version="1.0" encoding="UTF-8"?> |
||
20 | <!DOCTYPE profile> |
||
21 | <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> |
||
22 | <general> |
||
23 | <mode> |
||
24 | <confirm config:type="boolean">false</confirm> |
||
25 | <final_reboot config:type="boolean">true</final_reboot> |
||
26 | </mode> |
||
27 | <%25= snippets "YaST2 Signature-Handling" -%25> |
||
28 | </general> |
||
29 | <networking> |
||
30 | <dns> |
||
31 | <hostname><%25= @host.name %25></hostname> |
||
32 | <resolv_conf_policy>auto</resolv_conf_policy> |
||
33 | </dns> |
||
34 | <interfaces config:type="list"> |
||
35 | <interface> |
||
36 | <bootproto>dhcp</bootproto> |
||
37 | <device>eth0</device> |
||
38 | <startmode>auto</startmode> |
||
39 | <usercontrol>no</usercontrol> |
||
40 | </interface> |
||
41 | </interfaces> |
||
42 | </networking> |
||
43 | <ntp-client> |
||
44 | <configure_dhcp config:type="boolean">false</configure_dhcp> |
||
45 | <peers config:type="list"> |
||
46 | <peer> |
||
47 | <address>ntp</address> |
||
48 | <initial_sync config:type="boolean">true</initial_sync> |
||
49 | <options></options> |
||
50 | <type>server</type> |
||
51 | </peer> |
||
52 | </peers> |
||
53 | <start_at_boot config:type="boolean">true</start_at_boot> |
||
54 | <start_in_chroot config:type="boolean">true</start_in_chroot> |
||
55 | </ntp-client> |
||
56 | <%25= @host.diskLayout %25> |
||
57 | <runlevel> |
||
58 | <default>5</default> |
||
59 | </runlevel> |
||
60 | <add-on> |
||
61 | <add_on_products config:type="list"> |
||
62 | <%25= snippets "YaST2 SLES 11.1 SDK" -%25> |
||
63 | <%25= snippets "YaST2 SLES 11.1 Repos" -%25> |
||
64 | <%25= snippets "YaST2 SLES 11 Driver Updates" -%25> |
||
65 | </add_on_products> |
||
66 | </add-on> |
||
67 | <software> |
||
68 | <%25= snippets "YaST2 SLES 11.1 Software" -%25> |
||
69 | <x11> |
||
70 | <color_depth config:type="integer">16</color_depth> |
||
71 | <display_manager>gdm</display_manager> |
||
72 | <enable_3d config:type="boolean">false</enable_3d> |
||
73 | <enable_xgl config:type="boolean">false</enable_xgl> |
||
74 | <resolution>1280x1024 (SXGA)</resolution> |
||
75 | <window_manager>gnome</window_manager> |
||
76 | </x11> |
||
77 | <users config:type="list"> |
||
78 | <user> |
||
79 | <username>root</username> |
||
80 | <encrypted config:type="boolean">true</encrypted> |
||
81 | <fullname>root</fullname> |
||
82 | <gid>0</gid> |
||
83 | <home>/root</home> |
||
84 | <shell>/bin/bash</shell> |
||
85 | <uid>0</uid> |
||
86 | <user_password><%25= root_pass %25></user_password> |
||
87 | </user> |
||
88 | </users> |
||
89 | <scripts> |
||
90 | <post-scripts config:type="list"> |
||
91 | <script> |
||
92 | <filename>post.sh</filename> |
||
93 | <interpreter>shell</interpreter> |
||
94 | <network_needed config:type="boolean">true</network_needed> |
||
95 | <notification>Setting up Puppet / Foreman ...</notification> |
||
96 | <debug config:type="boolean">true</debug> |
||
97 | <source><![CDATA[ |
||
98 | cat > /etc/puppet/puppet.conf << EOF |
||
99 | <%25= snippets "puppet.conf" -%25> |
||
100 | EOF |
||
101 | /usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags no_such_tag --server puppet --no-daemonize |
||
102 | /usr/bin/wget -q -O /dev/null --no-check-certificate <%25= foreman_url %25> |
||
103 | /sbin/chkconfig puppet on -f |
||
104 | ]]> |
||
105 | </source> |
||
106 | </script> |
||
107 | </post-scripts> |
||
108 | </scripts> |
||
109 | </profile> |