C.1 Using a ZLM Server and the Patch Channel to Upgrade

NOTE:All of the examples in this section reflect the x86_64 (64-bit) platform.

The information and instructions in the following sections help you perform an unattended, online upgrade from Open Enterprise Server (OES) 2 SP2 to OES 2 SP3 by using ZENworks Linux Management (ZLM) and the OES 2 SP3 patch channel.

After completing the instructions in the following sections, OES 2 SP2 servers are upgraded according to the schedule you set.

C.1.1 Preparing the Environment

Before you can use ZENworks Linux Management to upgrade OES 2 SP2 servers to OES 2 SP3, you must have the following:

  • The ZENworks Linux Management 7.3 IR3 server installed and running on your network.

  • The ZENworks Linux Management 7.3 IR3 Agent installed on each OES 2 SP2 server that you plan to upgrade.

    IMPORTANT:The agent included with OES provides package-management capabilities through the ZENworks Management Daemon. Unless the full agent is installed, updates cannot be scheduled from the ZENworks Linux Management server.

  • Each OES 2 SP2 server registered with the ZENworks Linux Management server.

  • Each OES 2 SP2 server updated with the latest OES 2 SP2 and SUSE Linux Enterprise Server (SLES) 10 SP3 patches.

C.1.2 Mirroring the Channels to Your ZENworks Linux Management Server

Use the instructions in this section to create a mirror of the following OES 2 SP3 patch channels on your ZENworks Linux Management server.

  • OES2-SP3-Online

  • OES2-SP3-Pool

  1. Save the zlm-mirror-conf.xml file to a working area on your workstation or server. For a sample file, see Section C.1.7, Sample XML file for Mirroring.

  2. Open zlm-mirror-conf.xml in a UNIX text editor and customize it as shown in the following table:

    Replace/Remove

    With

    USERID

    The DeviceID of your ZENworks Linux Management server, which is used to authenticate to the nu.novell.com server.

    1. To find the DeviceID, log in as root and enter the following command at a terminal prompt:

      cat /etc/zmd/deviceid

      The DeviceID is prepended to the terminal prompt.

      For example, if 123abc:myserver/ is displayed, the DeviceID is 123abc.

    PASSWORD

    The Secret of your ZENworks Linux Management server.

    1. To find the Secret, log in as root and enter the following command at a terminal prompt:

      cat /etc/zmd/secret

      The Secret is prepended to the terminal prompt.

      For example, if 456def:myserver/ is displayed, the Secret is 456def.

    ZLM-ADMINID

    The account name that the mirror operation uses to attach to the local ZENworks Linux Management server.

    Replace this only if you are using a different server administrative account to mirror the channels.

    ZLM-ADMINPASSWORD

    The password for the administrative account (the default is administrator) that the mirror operation uses to attach to the local server.

    <Target> </Target>

    The two <Target>...</Target> entries in each section indicate that both the i586 (32-bit) and x86_64 (64-bit) patches are needed. If you have only one architecture type deployed, you can remove the entry for the architecture you don’t use.

    IMPORTANT:These customizations are required for the mirror operation to succeed. Experienced administrators might want to make further modifications to the zlm-mirror-conf.xml file, but such modifications should be confined to those fields that have no values specified. For information on customizing the file, see the information in Mirroring Software and zlmmirror(1) in the Novell ZENworks 7.3 Linux Management Administration Guide.

  3. If the zlm-mirror-conf.xml file is on your workstation, copy it to a directory of your choosing on the ZENworks Linux Management server, for example /root/zlm_conf_files.

  4. As the root user at a terminal prompt, change to the directory containing the zlm-mirror-conf.xml file and enter the following command:

    zlmmirror m -c zlm-mirror-conf.xml -v --force-nevra

    The files start downloading to the server. Depending on your download speed, the mirror operation could take a few hours to complete.

C.1.3 Creating OES 2 SP3 Bundles

For the upgrade process, you need to create the following bundles on the ZLM server:

OES2-SP3-file-bundle

You must create the answer file and the prereboot.sh file before executing the following steps.

  1. Log in to ZENworks Control Center.

  2. Click Bundles.

  3. In the Bundles panel, click New > Bundle.

  4. Select File Bundle, then click Next.

  5. In the Name field, type OES2-SP3-file-bundle.

  6. Click Next.

    The file bundle is ready to have files added to it.

  7. Add the prereboot.sh file to OES2-SP3-file-bundle:

    1. In the Files panel, click Add > Upload.

    2. In the Destination field, type /tmp.

    3. In the Target Platforms list, select sles-10-x86_64.

    4. Click Add File, browse to and select the prereboot.sh script file on your workstation or server, then click OK.

      The prereboot.sh file is set to be uploaded to the /tmp directory on each server being upgraded.

  8. Add the answer file to OES2-SP3-file-bundle:

    1. In the Files panel, click Add > Upload.

    2. In the Destination field, type /opt/novell/oes-install.

    3. In the Target Platforms list, select sles-10-x86_64.

    4. Click Add File, browse to and select the answer file on your workstation or server, then click OK.

      The prereboot.sh and answer files are listed.

  9. Below the Files panel, click Next.

    An empty Scriptable Actions list is displayed.

  10. Click New.

  11. In the Scriptable Action drop-down list, select Post-Installation.

  12. In the Script to run drop-down list, select Define your own script.

  13. Copy and paste the following contents to the Script Content box:

    #!/bin/sh
    /etc/init.d/atd start
    at now + 2 minutes -f /tmp/prereboot.sh
    
  14. Click OK > Next.

  15. Click Finish > OK.

    The file bundle is created.

OES2-SP3-firstboot-bundle

  1. Log in to ZENworks Control Center.

  2. Click Bundles.

  3. In the Bundles panel, click New > Bundle.

  4. Select RPM Package Bundle, then click Next.

  5. In the Name field, type OES2-SP3-firstboot-bundle.

  6. Click Next.

    The file bundle is ready to have files added to it.

  7. In the Packages panel, click Add > Import From Repository.

  8. In the Search panel > Name field, type yast2-firstboot and click Search.

  9. Select rpm, then click OK.

    The yast2-firstboot RPM is available as part of the SLES 10 SP4 bundle on the ZENworks Linux Management server.

  10. In the Packages panel, click Add > Import From Repository.

  11. In the Search panel > Name field, type evms and click Search.

  12. Select the rpm evms2.5.5-24.73.17, then click OK.

  13. In the Packages panel, click Add > Import From Repository.

  14. In the Search panel > Name field, type ruby, then click Search.

  15. Select the ruby-1.8.6.p369-0.5 and ruby-devel-1.8.6.p369-0.5 RPMs, then click OK.

  16. Click Next.

  17. Under Scriptable Actions, click New.

  18. In the Scriptable Action drop-down list, select Post-Installation.

  19. In the Script to Run drop-down list, select Define your own script.

  20. Copy and paste the contents from Section C.2.6, Post-Installation Script File to the Script Content box.

  21. Click OK > Next.

  22. Click Finish > OK.

    The post-installation script is added to the Scriptable Actions panel.

  23. After creating the OES2-SP3-firstboot-bundle, click the bundle and go to the Details tab. For the yast2-firstboot RPM, ensure that the state of freshen is set to false.

C.1.4 Assigning the Bundles and Scheduling Upgrades

Assign the bundles to the OES 2 SP2 servers, then schedule the bundles to install appropriately:

  1. In the ZENworks Control Center, click Bundles.

  2. In the left column, select oes2-sp3-pool-catalog.

  3. Click Action > Assign Catalog.

  4. Click Add, click the down-arrow by Servers, then select the servers that you want to assign the bundles to.

  5. Click OK > Next.

  6. Schedule the catalog to install according to your organization’s policy.

  7. In the left column, select OES2-SP3-Online-bundle, OES2-SP3-file-bundle, and OES2-SP3-firstboot-bundle.

  8. Click Action > Assign Bundle.

  9. Click Add, click the down-arrow by Servers, then select the servers you want to upgrade.

  10. Click OK > Next.

  11. Schedule the bundles to install according to your organization’s policy.

  12. Click Next > Finish > OK.

IMPORTANT:The servers you selected in the preceding steps are now ready to be upgraded to OES 2 SP3. The actual upgrade operations occur automatically as scheduled.

C.1.5 Creating the answer and prereboot.sh Files

answer file

For the upgrade process to run without user intervention, each SP3 server must have an eDirectory password answer file for the YaST install.

  1. As root, open a terminal prompt.

  2. At the prompt, enter the following command:

    sudo yast2 create-answer-file ldap_password optional_domain_admin_password

    Replace ldap_password with the LDAP (eDirectory) Admin password and optional_domain_admin_password with the Domain Services for Windows (DSfW) Domain Administrator password, if it is needed for any of the servers being upgraded. (The existence of a second password in the answer file does not affect the upgrade process on servers that don’t have DSfW installed.)

    IMPORTANT:Because passwords on the command line might include special characters, it is a good idea to surround the password with single quotes. For example, if the password is pa$$word, enter it as ‘pa$$word’.

    All the uses of an exclamation mark (!) require that you escape the character by using a backslash (\). For example, the password novell! must be specified as novell\! or preferably ‘novell/!’.

    A dash (-) used at the beginning of a password also requires escaping. For example, -novell- must be specified as \-novell- or preferably ‘\-novell-’.

  3. Press Enter to close the confirmation message.

  4. From your working directory, copy the resulting answer file to the workstation or server that you will use to create the bundles.

prereboot.sh file

The prereboot.sh script checks whether the bundles are installed. On successful installation of all bundles, it triggers a reboot.

  1. Open any text editor.

  2. Copy and paste the following text into the text editor, then save it as prereboot.sh. Copy the prereboot.sh file to the workstation or server that you will use to create the bundles.

    #!/bin/bash
    
    status="j"
    while [ $status != "ii" ] ; do
    sleep 10
    status=i`rug bl |grep OES2-SP3-Online-bundle  |cut -f1 -d '|'`
    done
    status="j"
    while [ $status != "ii" ] ; do
    sleep 10
    status=i`rug bl |grep OES2-SP3-firstboot-bundle  |cut -f1 -d '|'`
    done
    
    sleep 60
    /sbin/reboot
    

    IMPORTANT:In the above script, the bundle names are OES2-SP3-Online-bundle and OES2-SP3-firstboot-bundle. If your bundle name is different, change the script accordingly. If the bundle names are inaccurate, the reboot is not triggered after installation of the bundles.

C.1.6 Post-Installation Script File

The following post-installation script is added to the OES2-SP3-firstboot-bundle. See Step 20.

#!/bin/sh

touch /etc/reconfig_system
chkconfig firstboot on

cat  > /etc/YaST2/firstboot.xml << EndOfText
<?xml version="1.0"?>
<!DOCTYPE productDefines SYSTEM "/usr/share/YaST2/control/control.dtd">
<productDefines  xmlns="http://www.suse.com/1.0/yast2ns"
    xmlns:config="http://www.suse.com/1.0/configns">

    <!--
    : firstboot.xml 35106 2007-01-05 13:42:15Z jsrain $
    Work around for the text domain
    textdomain="firstboot"
    -->

    <textdomain>firstboot</textdomain>
    <workflows  config:type="list">
        <workflow>
            <defaults>
                <enable_back>yes</enable_back>
                <enable_next>yes</enable_next>
                <archs>all</archs>
            </defaults>
            <stage>firstboot</stage>
            <label>Channel Upgrade</label>
            <mode>installation</mode>
            <modules config:type="list">
                <module>
                    <label>upgrade</label>
                    <enabled config:type="boolean">true</enabled>
                    <name>channel-upgrade-oes</name>
                </module>
            </modules>
        </workflow>
    </workflows>
</productDefines>
EndOfText

C.1.7 Sample XML file for Mirroring

<ZLMMirrorConf>
 <Session>
  <RemoteServer>
   <Base>https://nu.novell.com/repo</Base>
   <Proxy></Proxy>
   <Type>nu</Type>
   <SystemID></SystemID>
   <User>USERID</User>
   <Password>PASSWORD</Password>
  </RemoteServer>
  <LocalServer>
   <Base></Base>
   <Type>zlm</Type>
   <User>ZLM-ADMINID</User>
   <Password>ZLM-ADMINPASSWORD</Password>
  </LocalServer>
  <Catalog>
   <Name>OES2-SP3-Pool</Name>
   <LocalName>oes2-sp3-pool-catalog</LocalName>
   <Folder>OES2-SP3</Folder>
   <Target>sles-10-x86_64</Target>
   <ExcludeTarget></ExcludeTarget>
   <Bundle></Bundle>
   <ExcludeBundle></ExcludeBundle>
   <Package></Package>
   <ExcludePackage></ExcludePackage>
  </Catalog>
  <Catalog>
   <Name>OES2-SP3-Online</Name>
   <LocalName>oes2-sp3-online-catalog</LocalName>
   <Folder>OES2-SP3</Folder>
   <Target>sles-10-x86_64</Target>
   <ExcludeTarget></ExcludeTarget>
   <Bundle></Bundle>
   <ExcludeBundle></ExcludeBundle>
   <Package></Package>
   <ExcludePackage></ExcludePackage>
  </Catalog>
 </Session>
</ZLMMirrorConf>