10.3 Building an Automatic Branch Server Installation Image

In the two-tiered administration server and branch server architecture, the branch servers are assumed to be in a remote environment, sometimes far from knowledgeable Linux administrators. To simplify this task, a toolkit is provided that enables administrators to create autoinstall media to automatically install and set up branch servers with very little on-site effort.

This functionality is provided through AutoYaST. AutoYaST provides an automatic installation option that allows new branches to be set up at minimal expense. Novell Linux Point of Service provides an AutoYaST control file for the basic setup and the description files are generated from the LDAP directory. The resulting ISO file must then be burned to a CD for deployment at the Branch Server site.

NOTE:Automatic Branch Server images are created only in ISO format; therefore, CD is the only supported media.

To build an Automatic Branch Server Installation image, you must complete the following steps:

  1. Prepare the Administration Server to create the image.
  2. Create the Branch Server definition in the LDAP directory.
  3. Modify the XML template file.
  4. Generate the Automatic Branch Server Installation image.
  5. Create the boot media.

These steps are discussed in the following sections.

10.3.1 Preparing the Administration Server

Before you can create the Automatic Branch Server installation image, you must complete the following:

10.3.2 Creating the Branch Server Definition in the LDAP Directory

To enable the autoinstall system to configure the branch server, detailed information about the hard disk and the network interfaces must be defined in the LDAP directory. Figure 10-1 represents the LDAP objects required to define the structure for a Branch Server.

Figure 10-1 LDAP objects required for Branch Server definition

LDAP objects required for Branch Server definition

reviews the attributes for each LDAP object required to provide the Branch Server definition. For more information about the LDAP directory, refer to Section 5.0, The Novell Linux Point of Service LDAP Directory.

Table 10-2 LDAP objects and attributes for defining a Branch Server

LDAP Object

Required Attributes

scLocation

The scLocation object defines general information about the Branch Server network. Required attributes include the following:

  • cn
  • ipNetworkNumber
  • ipNetmaskNumber
  • scDhcpRange
  • scDhcpFixedRange
  • scDefaultGw
  • scDynamicIp

For information on adding this object class to the LDAP directory, see Section 6.3.2, Adding an scLocation Object.

scServerContainer

The scServerContainer object is a container for the Branch Server definition. The only required attribute for this container object is the cn.

For information on adding this object class to the LDAP directory, see Section 6.3.3, Adding an scServerContainer and scBranchServer Object.

scBranchServer

The scBranchServer object is a container for the hardware objects that provide the Branch Server definition. The only required attribute for this container object is the cn.

For information on adding this object class to the LDAP directory, see Section 6.3.3, Adding an scServerContainer and scBranchServer Object.

scNetworkcard

The scNetworkCard object provides the configuration for a Branch Server network interface card. Required attributes include the following:

  • The network device (scDevice)
  • The IP address of the Branch Server (ipHostNumber)
  • The loadable module (driver) that is necessary to activate the network card (scModul)
  • The netmask of the Branch Server's network (ipNetmaskNumber)

For example, the following posAdmin command creates a sample scNetworkcard object for a Branch Server:

posAdmin.pl --user cn=admin,o=mycorp,c=us --password secret --base cn=bs,cn=server,cn=Lab,ou=solutions,
o=mycorp,c=us --add --scNetworkcard --scDevice eth2 
--ipHostNumber 192.168.1.150 --ipNetmaskNumber 255.255.248.0 --scModul e100

scHarddisk

The scHarddisk object provides the configuration for the Branch Server's boot hard disk. Required attributes include the following:

  • cn
  • scDevice
  • scHdSize
  • scPartitionsTable

The partitioning scheme for the Branch Server hard disk is the same as Point of Service terminals. Partitions are specified as ‘size type mount point', where size is specified in megabytes, the type is either L for Linux file systems or S for swap space, and the mount point specifies where in the file system hierarchy the partition is mounted.

The wildcard “x” must appear as a mount point for swap space partitions and can be used to automatically compute the size of the file system as follows:

  • S partitions are created at twice the RAM size
  • L partitions with mount point /boot get approximately 20 megabytes
  • (Optional) The last partition entry in the list can specify an x wild card for the size parameter to use up the remaining space on the hard disk.

Partition entries are separated with a semicolon (;}. For a simple branch server, the partition table x S x;x L / is suggested, which creates swap space and one large root file system.

For example, the following posAdmin command creates a sample scHarddisk object for a Branch Server:

posAdmin.pl --user cn=admin,o=mycorp,c=us --password secret --base cn=bs,cn=server,cn=Lab,ou=solutions,
o=mycorp,c=us --add --scHarddisk --cn sda 
--scDevice dev/sda --scHdSize 40960 
--scPartitionsTable 'x S x;x L /'

scService

The scService object defines Branch Server services. This can include DNS, DHCP, FTFP, NTP, and RSYNC. Required attributes include the following:

  • cn
  • ipHostNumber
  • scDnsName
  • scServiceName
  • scServiceStartScript
  • scServiceStatus

NOTE:High availability services (scHAServices) are not supported for Automatic Branch Server Installation.

For information on adding this object class to the LDAP directory, see Section 6.3.3, Adding an scServerContainer and scBranchServer Object.

For more information about using posAdmin to create LDAP objects, see Section 6.0, Using posAdmin to Manage the LDAP Directory.

10.3.3 Modifying the Branch Server Configuration Template (template.xml)

The default Branch Server configuration is defined in the XML template file, /opt/SLES/POS/xml/template.xml. The DTD (document type definition) which defines the template document’s structure is found in /usr/share/YaST2/include/autoinstall/profile.dtd.

NOTE:As with the Image Specification and Distribution Source Documents, this template can be defined in an XML editor or in a standard text editor. However, it is strongly recommended that you modify the document only with the AutoYaST GUI system. The procedure to modify the Automatic Branch Server Installation template in this section is documented using the AutoYaST GUI system.

To modify the template.xml document using the AutoYaST system:

  1. Start YaST with the yast2 autoyast command to display the YaST configuration management system.

    Figure 10-2 AutoYaST configuration management system

    AutoYaST configuration management system
  2. Use Preferences to set the profile repository to the template file directory (/opt/SLES/POS/xml/).

  3. Click File > Open and select the template file (opt/SLES/POS/xml/template.xml).

    Modify the sections of the template.

    You can change time zone, add software packages, and change system parameters.

    A menu system similar to the YaST configuration interface allows you to modify specific sections of the template.

  4. After the XML template has been modified with AutoYaST, remove the DOCTYPE entry because it cannot be parsed correctly by the XSLT processor that is used to transform the file.

    To perform this operation, run the following command to clean the template file:

    xmllint --dropdtd template-yast2.xml > template.xml
    

10.3.4 Generating the Automatic Branch Server Installation Image

The posldap2autoinstcd.pl script is used to create the Automatic Branch Server Installation images. It generates an ISO file (autoinst.iso) and an XML document (autoinst.xml). This utility is located in the /usr/sbin directory.

The basic command line required to generate the Automatic Branch Server Installation images is:

posldap2autoinstcd.pl [options]

Table 10-3 summarizes the posldap2autoinstcd command options.

Table 10-3 posldap2autoinstcd command options

Option

 

Description

--DN branchserverdn

Defines the Branch Server distinguished name (DN).

posldap2autoinstcd.pl uses the DN of the branch server to create the following:

  • An ISO image, autoinst.iso, that fits the description in the template file. It contains all necessary software.
  • An XML template file, autoinst.xml, that instructs AutoYaST to install the system, set up network interfaces, and configure the branch server system so the server is ready to use.

This parameter is required.

[--user ldapuser]

Defines the user account the Branch Server uses to connect to the LDAP directory on the Administration Server.

This parameter is optional. If it is not defined, the Branch Server uses the admin account and password created by the posInitLdap.sh or posInitEdir.sh script during the initial configuration of the Administration Server.

[--pasword ldap_password]

Defines the password the Branch Server uses to connect to the LDAP directory on the Administration Server.

This parameter is optional. If it is not defined, the Branch Server uses the admin account and password created by the posInitLdap.sh or posInitEdir.sh script during the initial configuration of the Administration Server.

[--SLES distribution_ directory]

Defines the path to the distribution directory where the SLES RPMs required to build the Automatic Branch Server Installation image are located.

This parameter is optional. If it is not defined, posldap2autoinstcd.pl uses the default distribution directory, /opt/SLES/POS/dist/.

[--SP directory]

Specifies the directory where an SLRS or SLES service pack is available.This option is used to integrate a service pack into the boot or installation system.

This parameter is optional. If it is not defined, posldap2autoinstcd.pl uses only the SLES RPM packages specified in the AdminServer.conf file or the Distribution.xml document. For more information on these files, see Section 8.2.2, AdminServer.conf or Section 9.2.3, Distribution Source Document (Distribution.xml).

[--output directory]

Defines the directory where the Automatic Branch Server Installation images-autoinst.iso and autoinst.xml-are created.

This parameter is optional. If it is not defined, the images are created in the directory where posldap2autoinstcd.pl is executed.

[--tmp directory]

Defines the temp directory posldap2autoinstcd.pl uses directory for temporary files. The default is /tmp/.

[--xml document]

Defines the name of the Automatic Branch Server Installation XML document produced in the output.

This parameter is optional. If it is not defined, the XML document is named autoinst.xml.

[--template template]

Defines the directory where the template file used to create the Automatic Branch Server Installation image is located.

This parameter is optional. If it is not defined, posldap2autoinstcd.pl uses the default template, /opt/SLES/POS/xml/template.xml.

The following sample command creates an Automatic Branch Server Installation image:

posldap2autoinstcd.pl --user cn=admin,0=mycorp,c=us --password secret
--DN cn=bs,cn=server,cn=branch,ou=boston,o=mycorp,c=us  

This image has the following parameters:

  • The branch server uses the user account, cn=admin,o=mycorp, c=us, to log in to the LDAP directory. The password for this account is “secret.”
  • The Branch Server is associated with scBranchServer object, bs.server.branch.boston.mycorp.us.

10.3.5 Creating the Boot Media

After you generate the Automatic Branch Server Installation images, you must create the CD that will be used to boot and configure the Branch Server.

The build the boot CD, you must complete the following steps:

NOTE:In this example, cdrecord is used to create a CD on a CD recorder. cdrecord is a Linux command line program that is used to record data or audio on a DVD/CD recorder.

  1. Use the following command to find your CD recorder device:

    cdrecord -scanbus
    

    Linux returns the following information:

    cdrecord dev=2,0,0
     2,0,0   200) 'PIONEER ' 'DVD-RW  DVR-106D' '1.07' Removable CD-ROM
    
  2. Record the Automatic Branch Server Installation ISO image (autoinst.iso) to the CD:

    cdrecord dev=2,0,0 autoinst.iso
    
  3. Create a file named “info” to control the AutoYaST process. It must contain the following lines:

    install=cd:///
    autoyast=floppy:///autoinst.xml
    autoyast2=floppy:///autoinst.xml
    
  4. Create a file named “posInitBranchserver.auto.cfg” to control the automatic setup of the branch server software. It must contain the following lines:

    COMPANYNAME="your_company_name"
    COUNTRY="country"
    ADMINSERVER="IP_address"
    POSADMINDN="dn"
    PASSWORD="username_password"
    

    If the password should not be set up automatically for security reasons, it can be omitted. In this case, posInitBranchserver.sh requests the password when the Branch Server starts. For more information, see Setting Up a Branch Server in the Novell Linux Point of Service 9 Installation Guide.

  5. Copy the following files to an MS-DOS formatted floppy disk:

    • info
    • posInitBranchserver.auto.cfg
    • autoinst.xml
  6. At the Branch Server site, boot the Branch Server by inserting the floppy disk and CD, and then booting the server. Make sure the Branch Server is set to boot from CD.

    The automatic installation system starts. It requests confirmation at the start of the installation, but otherwise runs without interaction.

  7. After the system is installed, log in as the root user to start the automatic configuration of the branch server software.

    The posInitBranchserver.sh script automatically starts, sets the parameters as specified in the posInitBranchserver.auto.cfg file, and requests any missing parameters.

  8. Run possyncimages.pl to download the client images from the Administration Server.