SUSE Conversations


ZLM Agent Installation Using AutoYaST



By: tbinoy

April 7, 2008 5:23 pm

Reads:313

Comments:3

Rating:0

By Binoy Thomas and Chandrakanth Reddy

AutoYaST can be used where no user intervention is required or where customization is required. AutoYaST installations are performed using a control file with installation and configuration data. The control file can be created using the configuration interface of AutoYaST and can be provided to YaST2 during installation in different ways.

This solution basically describes how to use AutoYast features to install the ZLM (ZENworks Linux Management) Agent along with OS installation. Here the NFS server is used as network installation source but it holds good with other means of network installation.

Important Steps involved in the setup:

  1. Generate Control file(autoinst.xml)
  2. Setup NFS server for SUSE Linux OS
  3. Build folder structure needed for zlm-agent(ZLM7.x) files
  4. Edit the control file
  5. Start OS installation using autoyast

Solution

  1. Generate Control file(autoinst.xml)

    Install SLES10 SP1 manually on one machine. At the end of the installation, make sure that “Clone this system for autoyast” check box is checked. This will generate a template control file(/root/autoinst.xml).

  2. Setup NFS server for SUSE Linux Operating System
    Create an ‘Install_source_path’ directory (ex: sles10-sp1) and dump OS media. Then make the media available via NFS by exporting it.
  3. Build the folder structure needed for zlm-agent files in the hosting server(NFS server).
    1. Install the following rpm
      inst-source-utils-2007.5.15-0.3.noarch.rpm (comes with SLES10 SP1)
      Also information regarding the Inst-source-utils can be found here.

      This will create the following files under /usr/bin —

      • create_directory.yast
      • create_md5sums
      • create_package_descr
      • create_update_source.sh
    2. Edit lines 60 and 61 in create_update_source.sh as
      UPDATES=”$SOURCE/zlm-updates”
      NAME=”zlm-updates” where “zlm-update” is the base source folder needed for zlm agent
      files
    3. Then type ‘create_update_source /install_source_path/’. Here “install_source_path” is the path where the OS install media resides in the NFS server (Ex: create_update_source / sles10-sp1/).

      This creates a folder structure under ‘install_source_path’ and it would look like

                                                             |-media.1-
                                                             |             |--directory.yast
                                                             |             |--media
                                                             |             |--products 
                                                             |
                                                             |- content
                                                             |- directory.yast          |-i386---
                                                             |                                  |-i486---
      /install_source_path|-zlm-updates-|                                  |-i586---
                                                              |-suse------------------ |- i686---
                                                              |                                 |-noarch-
                                                              |                                 |-x86_64-
                                                              |-setup--|-descr-
                                                                                    |--EXTRA_PROV
                                                                                    |--MD5SUMS
                                                                                    |--directory.yast
                                                                                    |--packages
                                                                                    |--packages.DU  

      Then copy ZLM -agent rpms to the new installation source. Each architecture should be copied to corresponding directories, ie., i586 rpms to i586 directory and noarch rpms to noarch directory, etc.

    4. From /install_source_path/zlm-updates/suse, type ‘create_package_descr -x /setup/descr’
      This script creates a package database file under descr directory which is used by YaST during
      installation.
    5. From /install_source_path/zlm-updates/suse/seup/descr, type ‘create_directory_yast .’ (You must have this period.)
    6. From /install_source_path/zlm-updates/suse/setup/descr , type ‘create_md5sums .’
    7. Under /install_source_path/ create a file called “add_on_products”, add following
      “nfs:// install_source_path/zlm-update”.
      (Ex: echo nfs:// install_source_path/zlm-update > add_on_products).

      Note: If you make any change in the copied rpms under /install_source_path/zlm-updates/suse, steps IV to VI need to be executed again.

  4. Editing control file
    1. Edit control file to add ZLM agent add-on path

      Include the following lines in the control file(autoinst.xml) to include the add-on path of the ZLM agent.

        <add-on>
          <add_on_products config:type="list">
            <listentry>
              <media_url>nfs://NFS_Server_IP:/Install_Source_Path/zlm-updates/</media_url>
              <product>ZLM-72IR1-Client</product> 
       <!--       <product>SUSE Linux Enterprise Server 10 SP1</product> -->
              <product_dir>/</product_dir>
            </listentry>
          </add_on_products>

      Where “Install_Source_Path” is path of the NFS repository for OS and “zlm-updates” is the path of base source folder for zlm agent in the NFS server

    2. Edit control file to include zlm agent package details
      Add the zlm package info under packages section in the control file (autoinst.xml)
      Ex:

       <package>liby2util</package>
      <package>libzypp</package>
      <package>libzypp-zmd-backend</package>
      <package>novell-zenworks-install</package>
      <package>novell-zenworks-utilities</package>
      <package>novell-zenworks-zmd-actions</package>
      <package>novell-zenworks-zmd-gconfpolicyenforcers</package>
      <package>novell-zenworks-zmd-oem</package>
      <package>novell-zenworks-zmd-policyenforcers</package>
      <package>novell-zenworks-zmd-policymanager</package>
      <package>novell-zenworks-zmd-settings</package>
      <package>novell-zenworks-zmd-tess</package>
      <package>rug</package>
      <package>yast2</package>
      <package>yast2-core</package>
      <package>yast2-country</package>
      <package>yast2-ncurses</package>
      <package>yast2-packager</package>
      <package>yast2-perl-bindings</package>
      <package>yast2-pkg-bindings</package>
      <package>yast2-qt</package>
      <package>yast2-slp</package>
      <package>zen-updater</package>
      <package>zmd</package>
      <package>zmd-inventory</package>
      <package>zypper</package>
      <package>novell-zenworks-zlm-release</package>
      <package>suseRegister</package>
      <package>yast2-inetd</package>
      <package>yast2-installation</package>
      <package>yast2-online-update</package>
      <package>yast2-registration</package>
    3. Under init-script section add following (At the end of autoinst.xml file )
      The init-scripts are executed toward the end of the boot process and after network has been initialized. This script is used to register the newly installed machine with ZLM server.

      <init-scripts config:type="list">
          <script>
              <filename>init.sh</filename>
              <interpreter>shell</interpreter>
              <source><![CDATA[
              #!/bin/sh
              echo 'Registering to ZLM'
               rug shutdown -f
               rm /var/lib/zmd/services  
              /etc/init.d/novell-zmd start
              rug set require-verified-certs false
              rug sa https://IP_ZLM server
              echo 'Finished Registration'
              ]]></source>
           </script>
        </init-scripts>

      Note: For Non-Code 10 machines, replace line 9(rm /var/lib/zmd/services ) with “rm /var/opt/novell/zenworks/lib/zmd/services”

  5. Start OS installation using autoyast
    Copy the edited control file to NFS server(preferably under ‘Install_source_path’) .When the system boots from the CD, the GRUB installation screen appears.


    binoy_1_0.gif

    Select the NFS installation and enter specifics of the installation server. Once you’ve configured your installation server, tell the system to perform an AutoYaST installation and specify network path of the Control file by adding the “autoyast=” argument to your boot line.
    (ex: autoyast=nfs://NFS_Server_IP/Install_source_path/autoinst.xml)


    binoy_2_0.gif

    Continue with the NFS installation steps and the ZLM agent will get installed and registered along with OS installation.

Additional Information

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags:
Categories: SUSE Linux Enterprise Server, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

3 Comments

  1. By:mfaris01

    This is really thought out. Excellent Work! Really Helpful.

    Mike…

  2. By:brunold

    The autoyast sample above from the add-on section is missing the closing xml tag .

    In the building the directory structure section 5 the command is not create_directory_yast, it is create_directory.yast

    Thank you very much, a great article !

    Rainer

  3. By:Anonymous

    Is there a way to build an autoyast config from a running system that did not have the clone option checked during installation?

Comment

RSS