|
Softpanorama |
May the source be with you, but remember the KISS principle ;-)
Softpanorama Search
|
If you have an existing openSUSE box setting up the installation server is pretty easy. Here are the steps involved in setting the server up and linking it to the official Novell yast repostories so your new installations get updated packages.
Software -> Software Management yast2-instserver Miscellaneous -> Installation Server
/sbin/service vsftpd start to make it work.
/srv/ftp was set as the root of what anonymous
can see on the disk, so the config was perfect by default. /srv/ftp/sources/suse-10.2-64bit/.
It is a good idea to give the source directory a specific name as that allows
you to add alternate sources (like 32bit) to the same installation server in
the future. /srv/ftp/sources/suse-10.2-64bit/CD1 and create a new
file named add_on_products. http://download.opensuse.org/distribution/10.2/repo/osshttp://download.opensuse.org/distribution/10.2/repo/non-osshttp://download.suse.com/update/10.2 At this point, you can setup new openSUSE machines by installing against this
server. You would need to boot the machine with some sort of openSUSE installation
media (the DVD, CD1, a properly setup usb key, or the minimal install CD) to get
to the installation menu. From there hit F4, enter your FTP installation server
and the /sources/suse-10.2-64bit/CD1 directory, press enter, and then
continue with the installation. Having the installation server is really nice because
you can control and manage a single, consistent set of rpms.
Just having a central installation server is great but with autoyast you can almost completely automate installation of new openSUSE servers. This works by creating an autoyast control file at which you point new installations. The control file can include instructions for disk partitioning, installed software, services, custom config files, and directions to run extra scripts at various stages of the installation. The link at the top of this post provides a pretty good overview and the documentation here is very helpful as well. That documentation provides almost all of the information you need so where details are excluded from the following look there.
In my specific case (an autoyast file for JBoss servers) the process went like this:
/etc/profile.d/environment.sh
file to the installation server under a different directory accessible through
FTP. yast2 autoyast from the command line. Tools -> Create Reference Profile Miscellaneous -> Complete Configuration Files and then
alt-E for configure. /etc/ssh/sshd_config for the new
installs, and the loaded the contents of my existing sshd_config file for the
contents. File -> Save As and generated my baseline autoyast
file.
<scripts>
<init-scripts config:type="list">
<script>
<location>ftp://myserver/myscript.sh</location>
<interpreter>shell</interpreter>
</script>
</init-scripts>
</scripts>
Though the number of steps I just listed seems long, these autoyast files are really very quick to make. You could create any number of them for different machine roles and make them all available for new installs.
Now that you have an installation server (FTP-based in this specific case) and all the autoyast files and other resources a new machine could need, you can setup a new machine from scratch by doing the following:
/sources/suse-10.2-64bit/CD1 directory, press enter.
autoyast=ftp://[installserver]/[autoyast-file].
What you type appears in the command line options along the bottom of the screen.
Now, when I set this up, GRUB wouldn’t boot the newly installed machine. It turned
out that the kernel version I was running on the reference server (and from which
I generated the initial autoyast file) was different from the kernel provided by
the installation server. This meant in my autoyast file the GRUB configuration portion
was trying to reference a file (vmlinuz-2.6.18.2-34-default) that didn’t
exist. So make sure your installation server is tied to the official repositories
and make sure your reference machine is fully up to date before creating the baseline
autoyast file.
I used this same approach to create configurations for JBoss, e-mail, and basic openSUSE-based servers.
Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
Disclaimer:
Last modified: February 28, 2008
Simon said,
September 16, 2007 at 9:40 am
Good tutorial - have been using linux for years, but always been scared off network installs.
We’re now rolling out boxes out 10 times faster than before.
Thanks for the help!