Yast based unattended installation » History » Revision 16
« Previous |
Revision 16/17
(diff)
| Next »
Anonymous, 11/25/2013 03:04 PM
Update some SLES information
Autoyast based unattended installation¶
Media notes¶
Installation media can be accessed via nfs,ftp or http. The easiest way to setup installation sources for SLES is to use the module in Yast.
Yast -> Miscellaneous -> Installation Server
The path to the installation media differs from SLES9 and SLES10/11. So you have to create two separate installation media entries in foreman.
SLES9¶
ftp://server/SLES/$major.$minor_$arch
Foreman will try to find initrd in @mediapath/boot/$arch/loader. This is a problem since SLES9 keeps the initrd in a different directory. A simple workaround is to copy the folder to the correct location for Foreman to pick it up.
e.g.
Foreman tries to copy initrd of SLES 9.4 64Bit:
ftp://Server/SLES/9.4_x86_64/boot/x86_64/loader/initrd
So we have to copy and create the directory structure:
mkdir boot/x86_64/loader cp SUSE-SLES-9-Service-Pack-4/CD1/boot/loader/initrd boot/x86_64/loader
Now Foreman will find the initrd. You can verfiy this by enabling debugging for foreman proxy and checking the logs or checking the file size on the files created in the tftp directory.
Autoyast files¶
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.
Puppet Version¶
The included version of puppet is way to old (2.6), even on SLES 11.3. However, here recent packages can be found: https://build.opensuse.org/project/show/systemsmanagement:puppet
The following Snippet can be used:
Name: YaST2 SLES Puppet Repository
Snippet: YES
<listentry> <media_url><![CDATA[http://download.opensuse.org/repositories/systemsmanagement:/puppet/SLE_<%= @host.operatingsystem.major %>_SP<%= @host.operatingsystem.minor %>/]]></media_url> <name>systemsmanagement_puppet</name> <product>systemsmanagement_puppet</product> <product_dir>/</product_dir> <signature-handling> <accept_non_trusted_gpg_key> <all config:type="boolean">false</all> <keys config:type="list"> <keyid>2ABFA143A0E46E11</keyid> </keys> </accept_non_trusted_gpg_key> <import_gpg_key> <all config:type="boolean">false</all> <keys config:type="list"> <keyid>2ABFA143A0E46E11</keyid> </keys> </import_gpg_key> </signature-handling> </listentry>
SLES 11¶
SLES 11 Updates¶
If you want to use SLES Updates in the installation environment 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:
http://en.opensuse.org/SDB:Creating_YaST_installation_sources#repomd.2Frpm_md.2FYUM_sources
Once you have the install source ready, create a new provision template in forman:
Name: YaST2 SLES 11.1 Updates
Snippet: YES
<listentry> <media_url>ftp://server/SLES/11.1_Updates/</media_url> <product>Updates</product> <product_dir>/</product_dir> </listentry>
Additional installation sources e.g. SDK¶
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.
Name: YaST2 SLES 11.1 SDK
Snippet: YES
<listentry> <media_url>ftp://server/SLES/11.1_SDK/</media_url> <product>SDK</product> <product_dir>/</product_dir> </listentry>
Software Packages¶
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.
Name: Yast SLES 11.1 Packages
Snippet: YES
<base>default</base> <packages config:type="list"> <package>ConsoleKit-32bit</package> <package>Mesa-32bit</package> <package>PolicyKit-32bit</package> <package>PolicyKit-gnome-libs-32bit</package> <package>aspell-32bit</package> <package>at-spi-32bit</package> <package>audiofile-32bit</package> <package>audit-libs-32bit</package> <package>bind-libs-32bit</package> <package>cpufrequtils-32bit</package> <package>cracklib-32bit</package> <package>cryptconfig-32bit</package> <package>cyrus-sasl-32bit</package> <package>cyrus-sasl-gssapi-32bit</package> <package>cyrus-sasl-plain-32bit</package> <package>dbus-1-32bit</package> <package>dbus-1-glib-32bit</package> <package>device-mapper-32bit</package> <package>evolution-data-server-32bit</package> <package>fam-32bit</package> <package>file-32bit</package> <package>freeglut-32bit</package> <package>freetype-32bit</package> <package>fribidi-32bit</package> <package>gconf2-32bit</package> <package>gdbm-32bit</package> <package>gettext-runtime-32bit</package> <package>giflib-32bit</package> <package>glibc-locale-32bit</package> <package>gnome-keyring-32bit</package> <package>gnome-panel-32bit</package> <package>gnome-vfs2-32bit</package> <package>gpm-32bit</package> <package>hal-32bit</package> <package>hunspell-32bit</package> <package>libFLAC8-32bit</package> <package>libHX13-32bit</package> <package>libacl-32bit</package> <package>libaio-32bit</package> <package>libart_lgpl-32bit</package> <package>libattr-32bit</package> <package>libavahi-client3-32bit</package> <package>libavahi-common3-32bit</package> <package>libavahi-glib1-32bit</package> <package>libbonobo-32bit</package> <package>libbonoboui-32bit</package> <package>libbz2-1-32bit</package> <package>libcanberra-gtk-32bit</package> <package>libcanberra-gtk0-32bit</package> <package>libcanberra0-32bit</package> <package>libcap2-32bit</package> <package>libcroco-0_6-3-32bit</package> <package>libcurl4-32bit</package> <package>libdb-4_5-32bit</package> <package>libdrm-32bit</package> <package>libesd0-32bit</package> <package>libfreebl3-32bit</package> <package>libgcrypt11-32bit</package> <package>libglade2-32bit</package> <package>libgnome-32bit</package> <package>libgnome-desktop-2-11-32bit</package> <package>libgnomecanvas-32bit</package> <package>libgnutls26-32bit</package> <package>libgpg-error0-32bit</package> <package>libgsf-1-114-32bit</package> <package>libgstreamer-0_10-0-32bit</package> <package>libgthread-2_0-0-32bit</package> <package>libgweather1-32bit</package> <package>libical0-32bit</package> <package>libidl-32bit</package> <package>libidn-32bit</package> <package>liblcms1-32bit</package> <package>libldap-2_4-2-32bit</package> <package>libltdl7-32bit</package> <package>libmng-32bit</package> <package>libnetpbm10-32bit</package> <package>libnscd-32bit</package> <package>libnsssharedhelper0-32bit</package> <package>libogg0-32bit</package> <package>libopenct1-32bit</package> <package>libopensc2-32bit</package> <package>libproxy0-32bit</package> <package>libproxy0-config-gnome</package> <package>libpulse0-32bit</package> <package>libqt4-32bit</package> <package>libqt4-qt3support-32bit</package> <package>libqt4-sql-32bit</package> <package>libqt4-x11-32bit</package> <package>libreiserfs-32bit</package> <package>librsvg-32bit</package> <package>libsepol1-32bit</package> <package>libsmbclient0-32bit</package> <package>libsmbios2-32bit</package> <package>libsndfile-32bit</package> <package>libsoup-2_4-1-32bit</package> <package>libsqlite3-0-32bit</package> <package>libstdc++33-32bit</package> <package>libtalloc1-32bit</package> <package>libtasn1-3-32bit</package> <package>libtdb1-32bit</package> <package>libtool-32bit</package> <package>libvorbis-32bit</package> <package>libwbclient0-32bit</package> <package>libwnck-1-22-32bit</package> <package>libxcrypt-32bit</package> <package>libxml2-32bit</package> <package>libxslt-32bit</package> <package>mozilla-nspr-32bit</package> <package>mozilla-nss-32bit</package> <package>mozilla-xulrunner191-32bit</package> <package>nautilus-32bit</package> <package>nautilus-cd-burner-32bit</package> <package>opensc-32bit</package> <package>openslp-32bit</package> <package>opie-32bit</package> <package>orbit2-32bit</package> <package>pam-32bit</package> <package>pam-modules-32bit</package> <package>pam_mount-32bit</package> <package>parted-32bit</package> <package>pciutils-32bit</package> <package>pcsc-lite-32bit</package> <package>perl-32bit</package> <package>popt-32bit</package> <package>qt3-32bit</package> <package>rpm-32bit</package> <package>samba-32bit</package> <package>samba-client-32bit</package> <package>startup-notification-32bit</package> <package>strace-32bit</package> <package>sysfsutils-32bit</package> <package>tcl-32bit</package> <package>tcpd-32bit</package> <package>tk-32bit</package> <package>utempter-32bit</package> <package>xaw3d-32bit</package> <package>xorg-x11-driver-video-radeonhd</package> <package>yast2-trans-en_GB</package> </packages> <patterns config:type="list"> <pattern>Minimal</pattern> <pattern>WBEM</pattern> <pattern>apparmor</pattern> <pattern>base</pattern> <pattern>documentation</pattern> <pattern>gnome</pattern> <pattern>print_server</pattern> <pattern>x11</pattern> </patterns>
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.
Provisioning template¶
And finally a good and minimal provisioning template, tested on SLES 11.1:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE profile> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <general> <mode> <confirm config:type="boolean">false</confirm> <final_reboot config:type="boolean">true</final_reboot> </mode> <%= snippets "YaST2 Signature-Handling" -%> </general> <networking> <dns> <hostname><%= @host.name %></hostname> <resolv_conf_policy>auto</resolv_conf_policy> </dns> <interfaces config:type="list"> <interface> <bootproto>dhcp</bootproto> <device>eth0</device> <startmode>auto</startmode> <usercontrol>no</usercontrol> </interface> </interfaces> </networking> <ntp-client> <configure_dhcp config:type="boolean">false</configure_dhcp> <peers config:type="list"> <peer> <address>ntp</address> <initial_sync config:type="boolean">true</initial_sync> <options></options> <type>server</type> </peer> </peers> <start_at_boot config:type="boolean">true</start_at_boot> <start_in_chroot config:type="boolean">true</start_in_chroot> </ntp-client> <%= @host.diskLayout %> <runlevel> <default>5</default> </runlevel> <add-on> <add_on_products config:type="list"> <%= snippets "YaST2 SLES 11.1 SDK" -%> <%= snippets "YaST2 SLES 11.1 Updates" -%> </add_on_products> </add-on> <software> <%= snippets "YaST2 SLES 11.1 Packages" -%> </software> <x11> <color_depth config:type="integer">16</color_depth> <display_manager>gdm</display_manager> <enable_3d config:type="boolean">false</enable_3d> <enable_xgl config:type="boolean">false</enable_xgl> <resolution>1280x1024 (SXGA)</resolution> <window_manager>gnome</window_manager> </x11> <users config:type="list"> <user> <username>root</username> <encrypted config:type="boolean">true</encrypted> <fullname>root</fullname> <gid>0</gid> <home>/root</home> <shell>/bin/bash</shell> <uid>0</uid> <user_password><%= root_pass %></user_password> </user> </users> <scripts> <post-scripts config:type="list"> <script> <filename>post.sh</filename> <interpreter>shell</interpreter> <network_needed config:type="boolean">true</network_needed> <notification>Setting up Puppet / Foreman ...</notification> <debug config:type="boolean">true</debug> <source><![CDATA[ cat > /etc/puppet/puppet.conf << EOF <%= snippets "puppet.conf" -%> EOF /usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags no_such_tag --server puppet --no-daemonize /usr/bin/wget -q -O /dev/null --no-check-certificate <%= foreman_url %> /sbin/chkconfig puppet on -f ]]> </source> </script> </post-scripts> </scripts> </profile>
Updated by Anonymous about 11 years ago · 17 revisions