Previous Topic: Deploy Debian Packages Using Software DeliveryNext Topic: Configuration Parameters for Managing Debian Packages


Setting Up Debian Mirror Repositories

As a desktop support analyst, you can set up mirrors of a Debian repository to help ensure easy access and faster download of the packages at the target computers. The following diagram illustrates the steps that you perform to set up Debian mirror repositories:

Setting Up Debian Mirror Repositories

Perform the following tasks to set up Debian mirror repositories:

  1. Verify Prerequisites
  2. Install CA DSM Agent Add-on for Debian Mirror
  3. Define the Parent Repository Details
  4. Define the Mirror Synchronization Details
  5. Schedule the Mirror Synchronization
  6. Verify Mirror Synchronization

Verify Prerequisites

Verify the following prerequisites to help ensure that the mirror and synchronization work properly:

Install CA DSM Agent Add-on for Debian Mirror

Install the add-on package on computers that host the mirror repository. The add-on enables the computer for mirror synchronization.

Important! Mirror synchronization fails if you do not install the add-on package.

Follow these steps:

  1. Navigate to Software, Software Package Library, DSM Software Packages in DSM Explorer.
  2. Right-click the package CA DSM Agent add-on for Debian Mirror 1.0 and select Deploy.
  3. Follow the instructions in the wizard. Specify the following information in the wizard:
  4. Click Finish on the last page.

    A software job is created for each computer that you selected.

  5. Monitor the job status in All Computers, computer_name, Jobs, Software Jobs.

    When the job is completed, the job status changes to SW Installed.

Back to Top

Define the Parent Repository Details

Define the details of the parent repository for the mirror. A parent repository can be a master repository or a mirror repository because you can create a mirror from a master repository or from another mirror repository. You can define multiple mirrors of a parent repository depending on the network traffic, load, and sites you want to support. For example, if you decide to have two mirrors at each site and you have five different office sites, you need ten mirrors of the parent repository.

Note: The steps are the same as defining the external repository, except that you need to define whether the parent is a master or mirror.

Follow these steps:

  1. Navigate to Control Panel, Configuration, Configuration Policy.
  2. Right-click Default Configuration Policy and select Unseal.

    Note: The changed configuration policy must be applied to all the target computers. Hence, select the Default Configuration Policy.

    The policy becomes editable.

  3. Navigate to DSM, Software Delivery, Shared, External Repository, Debian and select Repositories on the right pane.
  4. Provide the following details for each repository that you want CA ITCM to connect to, in the Repositories table:
    Repository Name

    Specifies a unique repository name. You can specify any name but verify that the name is unique across the Repositories table.

    Repository Relation

    Specifies whether the repository is a master, mirror, or mirror template.

    Master

    Specifies that the repository is a master. A master repository is used while creating wrapper packages. CA ITCM cannot deploy native Debian packages directly. Create wrapper packages that include references to the native Debian packages and then deploy the wrapper packages.

    Following guidelines apply for master repositories:

    • Add at least one master repository to create and deploy Debian wrapper packages.
    • You can add multiple master repositories; however, you can create wrapper packages only from the first (alphabetically) available master.
    • You can configure different master repositories at the enterprise manager and domain manager level. A master repository can be an external Debian repository or another mirror repository that acts as a master for creating wrapper packages. For example, you have an external Debian repository co-located with the enterprise manager. You created mirrors of this repository on a Linux computer that is co-located with each of your domain managers. You can configure these mirrors as the master for the respective domain managers so that you can create wrapper packages from the mirrors co-located with your domain managers.
    Mirror

    Specifies that the repository is a mirror that is created from a master or another mirror.

    Mirror-Template

    Specifies that the mirror is only a template and not a physical repository. The mirror template is only a placeholder for multiple mirror repositories that have the same configuration. When you have numerous mirrors, you can create one mirror template per parent instead of creating a row each for all the mirrors. Mirror templates are used for software deployment and repository extraction but not for mirror synchronization. The host name of the computers hosting the mirrors is dynamically replaced at run time.

    Repository Type

    Specifies the repository type.

    Repository Method

    Specifies the transfer protocol that is used for transferring the packages from the repository to the target computers. Select HTTP, FTP depending on what you have configured. For more information about this configuration, see Setting Up FTP and HTTP Share for Software Packages and OS Images.

    Note: If the repository is a master and you want to browse the repository and create wrapper packages from it, configure the repository as an FTP share.

    Hostname

    Specifies the host name of the computer that hosts the repository. For mirror template repositories, do not specify the host name because the host name is dynamically provided at run time. Even if you specify, the host name is ignored for mirror templates.

    Root

    Specifies the root node of the repository.

  5. Repeat step 4 to add more repositories.
  6. Save and seal the policy. Verify that the policy is applied on all the target computers.

    The parent repositories information is updated on all target computers.

Back to Top

Define the Mirror Synchronization Details

The synchronization job requires that you define the mirror synchronization details for each mirror repository. The job uses these details to synchronize the mirrors.

Follow these steps:

  1. Navigate to Control Panel, Configuration. Right-click Configuration Policy and select New Policy.

    You need a new policy for mirror synchronization so that you can apply the synchronization details only to the computers that host the mirrors.

  2. Navigate to DSM, Software Delivery, Shared, External Repositories, Debian and double-click Mirror Synchronization.
  3. Provide the following details for mirroring a repository in the mirror synchronization table:
    Parent Repository name

    Specifies the parent repository you want to mirror.

    Note: Verify that the parent repository name you specify in this field exactly matches the name specified in the Default Configuration Policy, DSM, Software Delivery, Shared, External Repositories, Debian, Repositories configuration table. If the names do not match, the synchronization job fails at run time.

    Distributions

    Specifies the list of the distributions from the selected repository that must be mirrored. You can specify more than one value by separating each value with a space.

    Components

    Specifies the list of the components from the selected repository that must be mirrored. You can specify more than one value by separating each value with a space.

    Architectures

    Specifies the list of the architectures from the selected repository that must be mirrored. You can specify more than one value by separating each value with a space.

    Location

    Specifies the location where you want to create the mirror repository.

    Note: Verify that this location is exposed as both HTTP and FTP shares. For more information about setting up HTTP and FTP shares, see Setting Up HTTP and FTP Share for Software Packages and OS Images.

    Additional Arguments

    Specifies the additional arguments that are used while launching the debmirror utility.

    Status

    Specifies whether you want to synchronize the mirror or not. If you are not using a mirror repository actively, you can disable the synchronization without deleting the mirror.

  4. Save and seal the policy. Apply the policy to computers that host the mirror repository.

    The mirror synchronization details are defined and the configuration is applied on the mirror computers.

Back to Top

Schedule the Mirror Synchronization

Schedule the mirror synchronization to automatically synchronize the mirror with its parent repository at the scheduled time. The mirror repository is created when the synchronization job runs successfully for the first time after you have defined the mirror synchronization details.

Follow these steps:

  1. Navigate to Control Panel, Configuration Policy.
  2. Right-click the configuration policy that you applied on computers hosting mirrors and select Unseal.
  3. Navigate to DSM, Common Components, CAF, Scheduler, Run Mirrorsync from DSM Explorer.
  4. Select CAF Scheduler : Enabled and set the value to true.
  5. Configure the other parameters under the Run Mirrorsync node to specify the mirror synchronization schedule. For more information about the scheduling parameter, press F1.
  6. Seal and apply the policy on computers that host the mirror repositories.

    The mirror synchronization is scheduled. At the scheduled time, the CAF Scheduler synchronizes the mirror with the parent repository.

Verify Mirror Synchronization

After the mirror synchronization job is executed, follow these steps to verify whether mirror synchronization was successful and CA ITCM is able to connect to the mirrors.

  1. View the Status of Last Mirror Synchronization
  2. Extract Package Metadata from the Repository
  3. View Debian Packages from Web Console
View the Status of Last Mirror Synchronization

You can view the status of the last synchronization to verify whether the mirror synchronization was successful.

Follow these steps:

  1. Verify the engine logs to ensure that the inventory collect task ran at least once from the time the mirror was last synchronized.
  2. Navigate to Computers and Users, All Computers, mirror computer, Inventory, System Status, External Repositories.

    The External Repositories page appears.

  3. View the value of the following parameter to know the status:
    Last Sync Result

    Specifies the result of last mirror synchronization. A successful synchronization returns 0 and a failure returns a non-zero value.

    If the synchronization failed, follow these steps:

    1. Deploy the FetchMirrorLog procedure in the CA DSM Agent add-on for Debian Mirror 1.0 package on the computer that failed the synchronization.
    2. Verify the job status under All Computers, computer name, Jobs, Software Jobs.
    3. Right-click the FetchMirrorLog procedure job, select Properties and click the Job Output tab.

      The mirror synchronization log is displayed.

Back to Top

Extract Package Metadata from the Repository

Extracting package metadata from the repository lets you view the Debian package details on DSM Web Console.

Note: The following steps apply for extracting the package metadata from both master and mirror repositories.

Follow these steps:

  1. Navigate to Control Panel, Engines, All Engines, SystemEngine from DSM Explorer.

    The engine log is displayed.

  2. Right-click the SystemEngine and select Add New Task.

    The New Task Wizard opens.

  3. Follow the instructions and perform the following steps in the wizard:
    1. Select the task type as CA Repository Extraction, and enter a task name and description. Click Next.

      Note: Ensure that you disable the system firewall to execute the task successfully.

    2. Provide the following details:

      Note: As the repository server is on Linux, values provided in the following Distribution and Components Name fields must be case-sensitive; they must match the case in the repository server. For example, if the repository server location for ftp://172.16.0.12/ubuntu/dists/lucid/main/binary-i386/, the distribution name must be specified as lucid and not as Lucid or LUCID.

      Repository Name

      Specifies the repository name from which you want to extract the package metadata. The list displays the repositories you had defined in the Repositories configuration table.

      Note: You cannot create two engine tasks with the same repository and distribution combination.

      Host Name

      Specifies the host name of the repository. This field is enabled only for repositories of type Mirror-Template. For the master and mirror repositories, the host name is automatically taken from the Repositories configuration table.

      Distribution

      Specifies the distribution from which you want to extract the package details.

      Note: An engine task can extract data only from a single distribution. If you want to extract data from multiple distributions, create additional engine tasks.

      Components Name

      Specifies the components that you want to extract. Click Add to add more components.

    3. Specify scheduling options.
  4. Click Finish on the last page.

    The System Engine creates the task and executes it at the schedule time. You can monitor the task by clicking the SystemEngine and review the status in the Task List section on the right pane.

    Note: You can also browse the repository from Web Console while the engine task is still in progress. The Web Console displays the distributions and packages as and when they are extracted from the repository.

Back to Top

Browse the Debian Repository from Web Console

You can browse the contents of a Debian repository in Web Console to know what packages are present in the repository.

Follow these steps:

  1. Log in to DSM Web Console.
  2. Navigate to Console, Software, External Repositories, repository.

    A list of distributions in the selected repository is displayed. The Synchronization Status column shows the status of the repository extraction task. You can also click View under the Synchronization Log column to view the progress of metadata extraction and errors that are encountered, if any.

    Note: If you open the repository before the extraction task completes, it is possible that you do not see all the distributions in the list.

  3. Click a distribution.

    A list of Debian packages in the distribution is displayed.

Back to Top

Setting Up FTP or HTTP Share for Software Packages and OS Images

For Kubuntu deployments, you are required to set up FTP or HTTP share to store software packages and OS images.

See Setting Up FTP or HTTP Share for Software Packages and OS Images section in OSIM Administration Guide for more information.