Installing a Server Automatically with AutoYaST

If you just need to install a few servers, it will be no problem to go through the installation procedure manually for each of the servers. However, if you need to configure many servers, it can be rather cumbersome to do so by hand, and the server configurations may not be consistent throughout the organization. In that case, AutoYaST can be a good option. With AutoYaST, it is possible to clone all the current settings of a system and write them to a configuration file. This configuration file can be called from the initial configuration screen, and all the settings from the file will be applied automatically. This way, it is possible to install a server without any interaction, as long as the AutoYaST configuration has been set up properly. To make it easier for you, an AutoYaST configuration file is created automatically at the end of each installation of a SUSE Linux Enterprise 10 server. It is also possible to create a tuned AutoYaST configuration file later on a running server. The next section discusses how.

Here are the steps to create an AutoYaST file:

1. From YaST, select Miscellaneous > AutoInstallation. This starts the AutoYaST configuration tool. The tool provides an overview to all the settings in the installation that can be tuned from this interface. Before you make an AutoYaST reference file, however, you will not see anything. The easiest way to create a reference control file that can help you perform an installation automatically is by selecting Tools > Create Reference Profile (see Figure 35-7). This opens a dialog box where you can specify all the settings you need. For example, in the System option, you can select Boot Loader and then click Configure to enter all the parameters you want to use for the boot loader. After repeating this for all required configuration parameters, your AutoYaST installation file is ready to use.

2. After installing a server, an AutoYaST reference profile is created automatically (if you didn't deselect the option, see Chapter 2 for more details). Its name is autoinst.xml, and it is saved to the /root directory. You can also select File > Open from the AutoYaST configuration menu and then browse to this file to open it. The advantage is that in the reference file all the required settings already have a value, and you need to merely change the values to a value you want to use on all servers that will be using this reference file. In the next step, you can read how to create a flexible partitioning scheme in the AutoYaST partitioner utility.

Figure 35-7. When creating an AutoYaST reference profile, you can select every single option you want to be installed.

3. Select Hardware > Partitioning, and then click Configure to configure the current partitioning scheme on your server. This opens the partitioning plan that will be used or shows an empty partition overview if you aren't working from an existing autoyast.xml file. In this partitioning plan, you will see a partition that will be mounted as the root partition. Select this partition, and then click Edit.

4. You will see the selected partition configured with a fixed size. Since you might be installing on a server with a smaller hard drive, you need to modify this. Therefore, select the Fill to maximum allowable space option, and click OK (see Figure 35-8). You now have modified the partitioning scheme in your AutoYaST installation file to allow for more flexibility.

Figure 35-8. The AutoYaST program allows you to define exactly what partitions you want to use.

5. Now carefully look at all the other available options in the AutoYaST installation tree, and make modifications where needed. You might, for example, need to adjust the current software selection or the configuration of your network card. This is because you don't want all the servers installed based on this reference profile to be created with the same IP address as your reference server.

6. After making all the required changes, select File > Save As, and save the new reference profile to a location where it can be accessed easily when installing the new server. If you are using your reference server as a network installation server, it makes sense to save the reference file to the shared network directory. Otherwise, you may have to add it to a removable medium such as a USB drive or floppy disk. The name of the file does not really matter. Since XML code is used in the file, as shown in Figure 35-9, it makes sense to give the file the .XML extension. Now the file will be generated and written to the selected directory.

<pirof i le xinlns-"http : / / www. suse.CQm/1.0/yast2ns" xmlns : conf ig-"http : / / www. suse. com/1. O/configas">

|B| Compute. V.'-I (J iili. u. i'I i .^i. cl. 1 || jg :.'i.ri.i, I || ^ [email protected] ff^) Wed Sap 2D. 10.Q7 H

Figure 35-9. In the autoinstallation file, XML code is used to define all required settings.

You have just created an AutoYaST installation file. You have different options for using this file when installing a new server. First, you may refer to the file when installing from a CD. Alternatively, if you want to use the file when performing an installation using PXE boot and connecting to an NFS installation server, you need to make sure that you modify the default file on the PXE boot server properly. The next steps describe how to perform this task:

1. On the installation server, open the file /tftpboot/pxelinux.cfg/default with an editor.

2. Make sure that in the append line a reference to the XML file you have just created is added. This may result in a file with the following content:

default SLES10 label SLES10

kernel linux append initrd=initrd ramdisk_size=65536\ install=nfs://192.168.1.210/srv/nfs/sles10\ autoyast=nfs://192.168.1.210/srv/nfs/sles10/autoyast.xml

+1 0

Responses

  • eulalia
    How to create an autoyast server?
    6 months ago

Post a comment