Page Actions
Wiki Actions
User Actions
Submit This Story

What is it?

Templates and scripts helpful for deployment of SuSE Linux Enterprise Server (SLES) with cobbler. Enhancement/comments appreciated. Tested with sles9/10/11 on cobbler 1.0, 1.6.x and 2.0 .

The mentioned files can be accessed directly at http://fluxcoil.net/files/cobbler .

importing sles10 into cobbler

# loopback-mount the sles10sp2-amd64-dvd and 
# cp -r it to /cobbler/webroot/x86_64/sles10sp2, then:
cobbler distro add --name=sles10sp2-x86_64 --arch=x86_64 --breed=suse \
  --kernel=/cobbler/webroot/x86_64/sles10sp2/boot/x86_64/loader/linux \
  --initrd=/cobbler/webroot/x86_64/sles10sp2/boot/x86_64/loader/initrd \
  --kopts='install=http://$serverip/sles10sp2'
cobbler profile add --name=sles10sp2-x86_64 --distro=sles10sp2-x86_64
cobbler profile edit --name=sles10sp2-x86_64 --kickstart='/cobbler/template_sles10.cfg'
cobbler profile edit --name=sles10sp2-x86_64 --kopts='textmode=1 !text !ksdevice !kssendmac !lang'

importing sles11 into cobbler

# loopback-mount the sles11-amd64-dvd and 
# cp -r it to /cobbler/webroot/x86_64/sles11, then:
cobbler distro add --name=sles11-x86_64 --arch=x86_64 --breed=suse \
  --kernel=/cobbler/webroot/x86_64/sles11/boot/x86_64/loader/linux \
  --initrd=/cobbler/webroot/x86_64/sles11/boot/x86_64/loader/initrd \
  --kopts='install=http://$serverip/x86_64/sles11'
cobbler profile add --name=sles11-x86_64 --distro=sles11-x86_64
cobbler profile edit --name=sles11-x86_64 --kickstart='/cobbler/template_sles11.cfg'
cobbler profile edit --name=sles11-x86_64 --kopts='textmode=1 !text !ksdevice !kssendmac !lang'

templates for a start

template_sles10.cfg can be used as template for a SLES10 kickstart-file (actually autoyast-file in SuSE naming scheme, but for cobbler still –kickstart will carry the path to this value). template_sles11.cfg can be used as template for sles11. Passwords are 'cobbler', can be overridden with a ksmeta-var. There is also template_sles9.cfg

SuSE is using xml-syntax.

networking

interfaces_pre_sles10 and interfaces_post_sles10 get included as snippets. Together they do the same interface-ordering that works for redhat-distos: cobbler systems can be configured with multiple interfaces (i.e. 'cobbler system edit --name=.. --interface=eth1 --mac=... --ip=...') and appear after system-deployment in that order. The sles11-template is using similiar scripts. Bonding not implemented. Setting the dns-domain works same as for redhat: 'cobbler system edit –name=… –hostname=host.domain.tld' .

packages

packages_big_sles and packages_tiny_sles are package-selections, separated as snippets. Working for sles10 and sles11.

partitioning

partitioning_default_lvm_sles10 is included as usable partitioning. Apparently placing the /-filesystem on a LVM-volume with autoyast doesnt work. partitioning_default_lvm_sles11 is used by the sles11-template, using LVM for partitioning. A ksmeta-variable 'swapsize' can optionally be set to modify a default-swapsize of 2000MB. This ksmeta is also implemented in the partitioning-scripts used here for redhat distros.

cleaning up

post_cleanup_services is disabling services, mostly useful for sles9/sles10, sles11 is slim by default service-wise. Also irqbalance is disabled on singlecpu-systems, microcode-updates get disabled on AMD-cpu and smartd is disabled on vmware-systems.

postinstall script wrapper

For redhat-distros pure shellcode can be used in snippets in the postinstall-section. SuSE needs xml-syntax bevore and after the shellcode. To make snippets compatible with bot Redhat and SuSE based syntax post_sles_scriptwrapper can be used. Syntax is like this:

#set global $wrappedscript = 'snippet_sles/post_cleanup_grubconfig_menu.lst'
$SNIPPET('snippet_sles/post_sles_scriptwrapper')

Here post_cleanup_grubconfig_menu.lst (in directory snippet_sles) is set as value in the global variable $wrapperscript. Then the scriptswapper is called, outputting the xml-header/footer and calling the script mentioned in $wrappedscript.

grubcleaning

post_cleanup_grubconfig_menu.lst disables graphic-stuff in the grubconfig (for all of sles9/10/11). This is pure shell-code and using the scriptwrapper mentioned above.

 
cobbler/sles.txt · Last modified: 2010/01/15 20:31 (external edit)     Back to top