Yast based unattended installation » History » Version 4
Oliver Weinmann, 12/23/2011 06:38 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 | h2 Additional installation sources e.g. SDK |
||
43 | |||
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 | h2 Provisioning template |
||
58 | 3 | Oliver Weinmann | A good and minimal provisioning template tested on SLES 11.1: |
59 | 1 | Oliver Weinmann | |
60 | 2 | Oliver Weinmann | <pre> |
61 | 1 | Oliver Weinmann | <?xml version="1.0" encoding="UTF-8"?> |
62 | <!DOCTYPE profile> |
||
63 | <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> |
||
64 | <general> |
||
65 | <mode> |
||
66 | <confirm config:type="boolean">false</confirm> |
||
67 | <final_reboot config:type="boolean">true</final_reboot> |
||
68 | </mode> |
||
69 | <%25= snippets "YaST2 Signature-Handling" -%25> |
||
70 | </general> |
||
71 | <networking> |
||
72 | <dns> |
||
73 | <hostname><%25= @host.name %25></hostname> |
||
74 | <resolv_conf_policy>auto</resolv_conf_policy> |
||
75 | </dns> |
||
76 | <interfaces config:type="list"> |
||
77 | <interface> |
||
78 | <bootproto>dhcp</bootproto> |
||
79 | <device>eth0</device> |
||
80 | <startmode>auto</startmode> |
||
81 | <usercontrol>no</usercontrol> |
||
82 | </interface> |
||
83 | </interfaces> |
||
84 | </networking> |
||
85 | <ntp-client> |
||
86 | <configure_dhcp config:type="boolean">false</configure_dhcp> |
||
87 | <peers config:type="list"> |
||
88 | <peer> |
||
89 | <address>ntp</address> |
||
90 | <initial_sync config:type="boolean">true</initial_sync> |
||
91 | <options></options> |
||
92 | <type>server</type> |
||
93 | </peer> |
||
94 | </peers> |
||
95 | <start_at_boot config:type="boolean">true</start_at_boot> |
||
96 | <start_in_chroot config:type="boolean">true</start_in_chroot> |
||
97 | </ntp-client> |
||
98 | <%25= @host.diskLayout %25> |
||
99 | <runlevel> |
||
100 | <default>5</default> |
||
101 | </runlevel> |
||
102 | <add-on> |
||
103 | <add_on_products config:type="list"> |
||
104 | <%25= snippets "YaST2 SLES 11.1 SDK" -%25> |
||
105 | <%25= snippets "YaST2 SLES 11.1 Repos" -%25> |
||
106 | <%25= snippets "YaST2 SLES 11 Driver Updates" -%25> |
||
107 | </add_on_products> |
||
108 | </add-on> |
||
109 | <software> |
||
110 | <%25= snippets "YaST2 SLES 11.1 Software" -%25> |
||
111 | <x11> |
||
112 | <color_depth config:type="integer">16</color_depth> |
||
113 | <display_manager>gdm</display_manager> |
||
114 | <enable_3d config:type="boolean">false</enable_3d> |
||
115 | <enable_xgl config:type="boolean">false</enable_xgl> |
||
116 | <resolution>1280x1024 (SXGA)</resolution> |
||
117 | <window_manager>gnome</window_manager> |
||
118 | </x11> |
||
119 | <users config:type="list"> |
||
120 | <user> |
||
121 | <username>root</username> |
||
122 | <encrypted config:type="boolean">true</encrypted> |
||
123 | <fullname>root</fullname> |
||
124 | <gid>0</gid> |
||
125 | <home>/root</home> |
||
126 | <shell>/bin/bash</shell> |
||
127 | <uid>0</uid> |
||
128 | <user_password><%25= root_pass %25></user_password> |
||
129 | </user> |
||
130 | </users> |
||
131 | <scripts> |
||
132 | <post-scripts config:type="list"> |
||
133 | <script> |
||
134 | <filename>post.sh</filename> |
||
135 | <interpreter>shell</interpreter> |
||
136 | <network_needed config:type="boolean">true</network_needed> |
||
137 | <notification>Setting up Puppet / Foreman ...</notification> |
||
138 | <debug config:type="boolean">true</debug> |
||
139 | <source><![CDATA[ |
||
140 | cat > /etc/puppet/puppet.conf << EOF |
||
141 | <%25= snippets "puppet.conf" -%25> |
||
142 | EOF |
||
143 | /usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags no_such_tag --server puppet --no-daemonize |
||
144 | /usr/bin/wget -q -O /dev/null --no-check-certificate <%25= foreman_url %25> |
||
145 | /sbin/chkconfig puppet on -f |
||
146 | ]]> |
||
147 | </source> |
||
148 | </script> |
||
149 | </post-scripts> |
||
150 | </scripts> |
||
151 | </profile> |
||
152 | 2 | Oliver Weinmann | </pre> |