25.3 Configuring a Software Mirror

Configuring a software mirror consists of the following:

  1. Creating a separate XML configuration file for each remote server you want to mirror. You can create the configuration file either by using the command line utility or by using the xzlmmirror utility.

    See Section 25.3.1, Creating the Configuration Files by using the Command Line Utility and Section 25.3.2, Creating a Configuration File by Using the xzlmmirror Utility

  2. Mirroring patch bundles.

    See Section 25.3.3, Mirroring Patch Bundles for SLES 10 / SLED 10 / OES 2 from the NU and RCE Type Repositories

  3. Testing and running the mirroring operation. You can do this either by using zlmmirror or xzlmmirror.

    See Section 25.3.4, Testing and Performing the Mirroring Operation by Using zlmmirror and Section 25.3.5, Testing and Performing the Mirroring Operation by Using the xzlmmirror Utility

25.3.1 Creating the Configuration Files by using the Command Line Utility

Run the following command to generate an empty configuration file:

zlmmirror conf-generate filename.xml

This command generates a template configuration file named zlmmirror-config.xml in the current directory.

You can also convert the configuration file from an earlier version of ZENworks Linux Management or Red Carpet, or create configuration files manually. Configuration files are specified using the -c flag:

zlmmirror command -c filename.xml

If no configuration file is specified, the default configuration file location is /etc/opt/novell/zenworks/zlmmirror.xml.

You can check the configuration file for errors and display the parsed configuration information by using the conf-validate (cv) filename command.

After you have a base configuration file created, the following tasks walk you through adding the necessary configuration information:

Step 1: Servers

You must provide details about a remote server containing the software you want to mirror, and a local server, which is your ZENworks Linux Management server receiving the mirrored software.

RemoteServer
<RemoteServer>
   <Base>http://red-carpet.ximian.com/</Base>
   <Type>rce</Type>
   <User />
   <Password />
</RemoteServer>

Configuration Element

Description

Base

Path to the server you want to mirror, in the following format depending on Type:

ZLM: https://server

DELL: http://ftp.dell.com

RCE: https://server/path

YAST: http(s)://server/path or ftp://server/path

RHN: http(s)://server/path

YUM: http://server/path

STATIC: /path/on/filesystem

NU: https://nu.novell.com/repo

Type

Type of server you want to mirror:

ZLM: ZENworks 7 Linux Management

DELL: Dell Update Package FTP Server

RCE: Red Carpet® Enterprise™, or ZENworks 6.x Linux Management

YAST: YAST Online Updates

RHN: Red Hat Network

YUM: YUM

NU: Novell Updates

User

Name to use when connecting to the remote server. If no user is specified, zlmmirror reads the identity from the following location depending on Type:

ZLM: /etc/opt/novell/zenworks/zmd/deviceid for SLES 9 and OES, /etc/zmd/deviceid for SLES 10 and SLED 10

RCE: /etc/ximian/mcookie

YAST: /etc/sysconfig/onlineupdate

When connecting to an RHN server or a Dell server, leave this element empty.

NU: /etc/opt/novell/zenworks/zmd/deviceid for SLES 9 and OES, /etc/zmd/deviceid for SLES 10 and SLED 10

For the Novell Updates (NU) server, the device must be registered with NCC to use the deviceid as User.

Password

Password to use when connecting to the remote server. If no password is specified, zlmmirror reads the password from the following location depending on Type:

ZLM: /etc/opt/novell/zenworks/zmd/secret for SLES 9 and OES, and /etc/zmd/secret for SLES 10 and SLED10

RCE: /etc/ximian/partnernet

YAST: /etc/sysconfig/onlineupdate

When connecting to an RHN server or Dell server, leave this element empty.

NU: /etc/opt/novell/zenworks/zmd/secret for SLES 9 and OES, and /etc/zmd/secret for SLES 10 and SLED10

For the Novell Updates (NU) server, the device must be registered with NCC to use the device secret as Password.

Proxy

The Proxy configuration element is optional and is used with an Internet Proxy. You can add the Proxy element anywhere in the RemoteServer section.

If the Internet proxy requires authentication, the format looks like the following example:

<Proxy>http://username:password@server:port</Proxy>

If the Internet proxy does not require authentication, the format looks like the following example:

<Proxy>https://server:port</Proxy>

LocalServer
<LocalServer>
   <Base></Base>
   <Type>zlm</Type>
   <User>Administrator</User>
   <Password>password</Password>
</LocalServer>

Configuration Element

Description

Base

If the Type element indicates STATIC mirroring, use the Base element to define the destination path where files will be stored (/path/on/filesystem, for example).

If the Type element indicates ZLM mirroring, leave the Base element empty.

Type

Type of mirroring you want performed:

ZLM: Mirrors catalogs and bundles directly to your ZENworks Linux Management server. After mirroring, mirrored catalogs and bundles are displayed in the ZENworks Control Center.

STATIC: Mirrors packages to the file system of your ZENworks Linux Management server, but does not add them to ZENworks.

User

Name to use when connecting to your ZENworks Linux Management (local) server. The Administrator user should be specified if you want to use the default administrator account.

Password

Password for the account provided in User. If you are using the Administrator account, this is the password you specified during the server installation. For information about encoding your password, seeSection 25.8, Encoding the ZENworks Server Password

Step 2: Catalog and Bundle Configuration

You must provide details about the catalogs and bundles you want mirrored to your server.

Before you mirror the catalogs and bundles to your server, you can view the available catalogs and bundles on the remote server.

To view the available catalogs, run the following command:

zlmmirror slc -c filename.xml

To view the available bundles, run the following command:

zlmmirror slb -c filename.xml

CatalogConf

Each catalog you want to mirror must have a separate CatalogConf section:

<CatalogConf>
   <Name>Red Carpet 2</Name>
   <LocalName>Red Carpet 2</LocalName>
   <Target>sles-9-i586</Target>
   <Package>lib.*</Package>
</CatalogConf>

Configuration Element

Description

Name

Name of the catalog you want to mirror from this remote server.

This is the only required parameter.

Local Name

Name of the catalog you want the mirrored software placed in. If no Local Name is specified, the catalog name from the remote server is used. The local name for the catalog should not be same as that reserved for the <catalogname>-patches folder

Folder

Specifies the eDirectory™ folder (for example, /folder1/folder2) where bundles and catalogs are created and updated. If not specified, the catalogs and bundles are created and updated in the /zlmmirror folder.

Target

Restricts the mirroring operation on this catalog to packages and patches that support the specified target platforms. If no target is specified, packages for all platforms are mirrored.

This element can be specified multiple times, and can contain either a target name or a regular expression string for wildcard matching of target names.

For example, to include targets beginning with sles such as sles-9-i586, use the regular expression <Target>sles.*</Target>.

ExcludeTarget

Same as Target, except packages and patches supporting the specified target platform(s) are excluded. ExcludeTarget is performed after Target, so platforms appearing in a Target and ExcludeTarget are ultimately excluded. For example, to exclude targets that end with i586 such as sles-9-i586, use the regular expression <ExcludeTarget>.*i586</ExcludeTarget>.

Bundle

Restricts the mirroring operation on this catalog to the specified bundles. If not specified, all bundles are mirrored.

This option is valid only for ZENworks Linux Management and YAST source servers. It can be specified multiple times and can contain either a bundle name or a regular expression string for matching bundle names.

LocalBundleName

Renames the bundle name locally. This is applicable only for the RCE, NU, and RHN services in which a catalog has only one bundle on the remote server. If you specify <LocalBundleName>, you must not specify the <Bundle> tag. This tag is not applicable when you mirror OES from the RCE service with more than one bundle per catalog.

ExcludeBundle

Same as Bundle, except packages and patches contained in the specified bundles are excluded.

This option is valid only for ZENworks Linux Management and YAST source servers. It can be specified multiple times and can contain either a bundle name or a regular expression string for matching bundle names.

ExcludeBundle is performed after Bundle, so bundles appearing in a Bundle and ExcludeBundle are ultimately excluded.

Package

Restricts the mirroring operation on this catalog to the specified packages. If not specified, all packages are mirrored. This option can be specified multiple times, and can contain either a package name or a regular expression string for matching package names. This option is not supported for YOU patches.

ExcludePackage

Same as Package, except specified packages are excluded. This option can be specified multiple times, and can contain either a package name or a regular expression string for matching package names. This option is not supported for YOU patches. ExcludePackage is performed after Package, so packages appearing in a Package and ExcludePackage are ultimately excluded.

Category

Restricts the mirroring operation on the catalog to the specified categories of patch bundles. If the category is not specified, all patch bundles are mirrored. Valid values are recommended, optional, and security. This tag is applicable only for the NU type servers of SLES 10, SLED 10, and OES 2.

ServicePackGroups

Accepts Boolean values (true or false) only. By default <ServicePackGroups> is set to true, and it automatically creates bundle groups. This option is supported for YOU patches only

AutoDeploy

Mirroring the packages to existing bundle creates a newer version of the bundle and deploys it on the server. If AutoDeploy is set to false, then the mirroring operation restricts the deployment of the newer bundle. Accepts only the boolean values (true or false). By default, the option is set to true

CreateMonolithicBundle

Automatically creates monolithic package bundles consisting of only latest package rpms. It creates a separate monolithic bundle for each Service Pack release, and a separate monolithic bundle with the updates after the latest Service Pack release. It accepts Boolean values (true or false) only. By default the option is set to true. This option is supported for YOU patches only.

FilterPatchRPM

Restricts the mirroring operation of the YOU patch bundles to filter all the packages of the .patch.rpm type. This option creates an equivalent RPM package bundle in the local server. Accepts only the Boolean values (true or false). By default, the option is set to false. This option is supported only for the YOU patches

NOTE:The use of regular expressions (regexes) has changed in ZENworks 7.2 Linux Management. ZENworks 7.2 Linux Management does not use wildcard character matching. In ZENworks Linux Management 6.6.x, you can use a wildcard expression string instead of a regular expression string. In ZENworks 7.2 Linux Management , you should use <Bundle>patch-.*</Bundle> to mirror all bundles with the name starting with “patch-”. ZENworks Linux Management supports all the Java regular expressions. For more information on the Java regular expressions, see the Java documentation .

25.3.2 Creating a Configuration File by Using the xzlmmirror Utility

The xzlmmirror utility is a graphical user interface that lets you to create or edit the mirror configuration files, and store it in an XML file that is compatible with the existing zlmmirror utility. The file consists of the configuration information for the remote servers, proxy servers, local servers, and catalogs.

Do the following tasks in the order listed to create a configuration file:

You can also edit the configuration file. For more information, see Editing the Configuration File.

Configuring the Servers

  1. To start the xzlmmirror utility, enter the following command at the command line:

    xzlmmirror

    The xzlmmirror-Server Settings window is displayed.

    xzlmmirror-Server Settings window
  2. Configure the remote server that contains the software you want to mirror:

    1. Select the remote server type that contains the software you want to mirror.

      • ZLM: ZENworks 7.2 Linux Management

      • DELL: Dell Update Package FTP Server

      • RCE: Red Carpet® Enterprise™ or ZENworks 6.x Linux Management

      • YAST: YaST Online Updates

      • RHN: Red Hat Network

      • YUM: YUM

      • NU: Novell Updates

      The default URL of the server you want to mirror is displayed automatically in the following format, depending on the server type you have selected:

      • ZLM: https://server

      • DELL: http://ftp.dell.com

      • RCE: https://server/path

      • YAST: http(s)://server/path or ftp://server/path

      • RHN: http(s)://server/path

      • YUM: http://server/path

      • STATIC: /path/on/filesystem

      • NU: https://nu.novell.com/repo

    2. Specify the username and password to connect to the remote server.

  3. (Conditional) If you are connecting to the remote server through a proxy server, configure the proxy server settings. If the remote server does not connect through a proxy server, skip to Step 4.

    1. Click Show Proxy Settings.

    2. Specify the IP address or the host name of the proxy server.

    3. Specify the port number of the proxy server.

    4. To authenticate to the proxy server, select the Authentication Required check box, and specify the username and password for the proxy server.

  4. Configure the local server that you want to receive the mirrored software. You can mirror the software either directly to your ZENworks Linux Management server, or to the file system of your ZENworks Linux Management server. However, mirroring the software to the file system does not add it to ZENworks.

    1. Select the local server that you want to receive the mirrored software.

    2. Specify the username and password to connect to the local server.

    3. To validate the credentials for the servers, and to connect to the remote server, click Connect.

  5. To view the log information of the server configurations, go to /var/opt/novell/log/zenworks/zlmmirror.log file.

  6. Continue with Configuring the Catalogs.

Configuring the Catalogs

The xzlmmirror-Catalog Settings window is automatically displayed after the credentials are validated for the servers that you have specified in the xzlmmirror-Server Settings window. You must provide details about the catalogs and bundles you want mirrored to your server in the xzlmmirror-Catalog Settings window.

Review the following sections:

Adding Catalogs

The Add Catalogs page lets you configure each catalog you want to mirror.

xzlmmirror-Catalog Settings window: Add Catalog tab
  1. In the Catalog drop-down list, select the catalog that you want to configure.

  2. In the Local Name field, specify a name for the selected catalog.

    The local name for the catalog should not be same as that reserved for the <catalogname>-patches folder. If the name is not specified, then the name of the catalog selected in the Catalog field is used.

  3. In the Folder field, specify the eDirectory folder in which the bundles and catalogs are created and updated.

    If no folder is specified, then the catalogs and bundles are created and updated in the /zlmmirror folder.

  4. In the Targets list, click Browse to browse for and select the targets you want to mirror. By default, all the targets in the selected catalog are mirrored.

    To remove a target from the list, select the target, then click Remove.

  5. (Conditional) The Category field is displayed only if you have selected the NU type servers of SLES 10, SLED 10, and OES 2 in the xzlmmirror-Server Settings window. Select the categories you want to mirror. The available options are Security, Recommended, and Optional. By default, all the categories are mirrored.

  6. In the Bundles pane, specify the bundles you want to mirror by using one of the following ways:

    • Click Browse to browse for and select the bundles you want to mirror. By default, all the bundles in the selected catalog are mirrored.

    • Specify the bundle name you want to mirror, and click Add to add it to the list.

    Deselect the check box next to the bundle to exclude it from the list.

    To remove a bundle from the list, select the bundle, then click Remove.

  7. (Conditional) If you are not using the YOU patches, specify the package you want to mirror in the Packages pane by using one of the following ways:

    • Click Browse to browse for and select the packages you want to mirror. By default, all the packages in the selected catalog are mirrored.

    • Specify the package name you want to mirror, and click Add to add it to the list.

    To remove a package from the list, select the package, then click Remove.

  8. To restrict the deployment of a new bundle when mirroring packages to an existing bundle, deselect the AutoDeploy check box.

    This option is selected by default.

  9. Configure the following additional options in the Options group if you are using YOU patches:

    ServicePackGroups: Automatically creates bundle groups. This option is selected by default.

    FilterPatchRPM: Allows the mirroring operation of the YOU patch bundles to filter all the packages of the .patch.rpm type. Select this check box to restrict the mirroring operation of the YOU patch bundles to filter all the packages of the .patch.rpm type. This option creates an equivalent RPM package bundle in the local server.

    CreateMonolithicBundle: Creates monolithic package bundles consisting of only latest package RPMs. It creates a separate monolithic bundle for each Service Pack release, and a separate monolithic bundle with the updates after the latest Service Pack release. This option is selected by default.

  10. (Optional) To set the default values for the catalog, click Reset.

  11. To save the catalog settings in the Catalog Summary page, click Save Catalog.

    To save the catalog settings to a file, click File > Save. You can only save those catalog settings that are listed in the Catalog Summary page to a file.

  12. (Optional) To configure a different server, or to reset the server settings that you have already configured, click Back.

  13. Continue with initiating the mirroring process. For more information, see Section 25.3.5, Testing and Performing the Mirroring Operation by Using the xzlmmirror Utility.

Editing Catalog Settings
xzlmmirror-Catalog Settings window: Catalog Summary tab
  1. Click Catalog Summary.

    The page displays the catalog names, the local names, and the category of the catalogs that you configured in the Add Catalogs page.

  2. To view or edit the settings for a specific catalog, click the catalog.

    The Catalog Details dialog box is displayed.

  3. Click Edit to edit the catalog information displayed in the window.

Editing the Configuration File

  1. Launch the xzlmmirror utility by entering the following command at the command line:

    xzlmmirror

  2. Click File > Open.

  3. Browse for and select the configuration file you want to edit.

    The xzlmmirror-Server Settings window is displayed, where you can edit the desired settings.

    For more information, see Section 25.3.2, Creating a Configuration File by Using the xzlmmirror Utility.

25.3.3 Mirroring Patch Bundles for SLES 10 / SLED 10 / OES 2 from the NU and RCE Type Repositories

You can mirror patch bundles for SLES 10, SLED 10, and OES 2 from the NU and RCE type repositories such as nu.novell.com and update.novell.com.Review the following sections for more information:

Mirroring the Monolithic and Patch Bundles for SLES 10 / SLED 10 / OES 2

Mirroring updates for SLES 10, SLED 10, and OES 2 platforms from NUServer and RCEServer by using the zlmmirror m -c conf.xml command creates patch bundles and a monolithic bundle<catalogname>-bundle with all the packages in it.

Mirroring the Patch Bundles for SLES 10 / SLED 10 / OES 2

To mirror only the patch bundles for SLES 10, SLED 10, and OES 2 platforms from RCE type and NU type remote servers, use the -p option in the zlmmirror m -p -c mirror-conf.xml command.

Mirroring the Monolithic Bundles for SLES 10 / SLED 10 / OES 2

To mirror the monolithic bundles without creating the patch bundles, use the <Bundle> tag of the mirror configuration file.For example, use <Bundle>SLED10-Up dates-bundle</Bundle> to mirror the SLED10-Updates catalog.The slb option displays both monolithic and patch bundles. You can download the desired bundle by using the <Bundle> tag. To download the specific packages in the monolithic bundle, use the <Bundle> tag for the monolithic bundle and <Package> tags for the specific packages.For example, a sample <Catalog> section to mirror the Mozilla packages of the monolithic bundle is as follows:

<Catalog>
  <Name>SLED10-Updates</Name> 
  <LocalName>SLED10-Updates</LocalName>
  <Folder></Folder>
  <Target>sled-10-i586</Target>
  <ExcludeTarget></ExcludeTarget>
  <Bundle>SLED10-Updates-bundle</Bundle>
  <ExcludeBundle></ExcludeBundle>
  <Package>Mozilla*</Package>
  <ExcludePackage></ExcludePackage>
</Catalog> 

NOTE:The local name for the catalog should not be same as the name reserved for the folder <catalogname>-patches. In other words, the <localName> tag of the mirror configuration file should not use the same name as the <catalogname>-patches.

25.3.4 Testing and Performing the Mirroring Operation by Using zlmmirror

Before starting the mirroring operation, make sure that at least 10 GB of diskspace is available on the device.

After you have created the configuration file for a remote server, run the following command to perform a dry run of the mirroring operation, and optionally add the verbose flag to see detailed messages:

zlmmirror mirror -c filename.xml --dryrun --verbose

If this operation provides the intended results, run the mirror command without the dry run flag to complete the operation:

zlmmirror mirror -c zlmmirror-config.xml

If you mirror a bundle that contains multiple packages with multiple install type/freshen flags set, a unique version of the bundle is created for each install type/freshen combination.

For example, suppose you mirror a bundle that contains four packages assigned to one OS target. Of these four packages, one package has the install type flag set to false, the second package has the install flag set to true, the third package has the freshen flag set to false, and the fourth package has the freshen flag set to true. In this situation, four unique versions of the bundle are created.

The number of unique bundles created also depends on the number of OS targets. In the previous example, suppose the four packages, each with a different install type/freshen combination, have two OS targets. In this situation, a unique bundle is created for each install type/freshen combination and another unique bundle is created for each OS target. In this example, eight unique bundles are created.

The number of unique bundle versions created equals the number of unique install type/freshen combinations times the number of unique OS targets.

25.3.5 Testing and Performing the Mirroring Operation by Using the xzlmmirror Utility

Before you begin the mirroring process, you need to create the mirror configuration file. For more information, see Section 25.3.2, Creating a Configuration File by Using the xzlmmirror Utility.

To mirror the software:

  1. Click Initiate Mirror in the Catalogs Settings window to initiate the mirroring process. The Mirror Options dialog box is displayed.

  2. Select the options that you need:

    Dry run: Prints the packages to be mirrored or added.

    Packagesets: Mirrors only the patch bundles for RCE and NU servers. This excludes the package set bundles.

    Force nevra: Overwrites an existing package with a new package with a conflicting NEVRA (name, epoch, version, release, and architecture).

    Re-Download: Downloads the contents even if they are already mirrored.

    Sync-local: Synchronizes the local server repository with the remote server repository.

    Debug: Displays the debug output.

    Verbose: Displays the verbose output.

  3. Click OK. The Configuration Summary dialog box is displayed, where you can view the mirror options and all the mirror configuration settings.

  4. Click Proceed to begin the mirroring process.