Difference between revisions of "Quattor package management with yum-based ncm-spma"

From PDP/Grid Wiki
Jump to navigationJump to search
Line 29: Line 29:
 
  ??? el5
 
  ??? el5
 
  ??? el6
 
  ??? el6
 +
 +
It is very important that this layout is taken into consideration when adding new (versions of) packages to the repositories.
  
 
=== Snapshotting Repositories ===
 
=== Snapshotting Repositories ===

Revision as of 13:45, 30 September 2013

The update of ncm-spma, Quattor's package management component, to a version that uses yum instead SPMA and rpmt-py, has significantly simplified the configuration of package lists, changed the requirements on software repositories and changed the workflow of updating software.

The major advantage of the new component lies in the simplification of the software that needs to be installed. Where the original version required every package and all of its dependent packages to be exactly specified, often referred to as the RPM dependency hell, the new component only needs the packages that are desired (version can be specified if required, but that is not needed). The dependencies are handled automatically by yum, just as yum will take care of the selection of the optimal or most recent version of each package. Consequently, there will be less need for modifications in the software installation templates to upgrade and the trial-and-error approach to satisfy all dependencies will become an unpleasant relic of the past. Furthermore, since package versions do not need to be specified exactly any more, the painful process to generate template for all package groups when a a new minor version of the distribution is released should also become simpler.

There is a modest price to pay for the simplification of the software templates: part of the complexity goes into maintaining the software repositories and one loses the compile-time verification of the presence of the packages to be installed in the available repositories. The latter may lead to unexpected problems when deploying.

One of Quattor's was the ability to roll back an installation or configuration to a previous state. Performing a roll back to an earlier set of packages is not trivial when using yum. Nevertheless, it is very desirable not to lose this feature. By using snapshots of software repositories, it is possible to let yum consider an earlier set of packages when managing the installation, implying that downgrading to previous versions is required.

This article gives a description of the new situation as implemented at Nikhef.


Repository Management

There are two new aspects on repository management:

  • Repositories have to be populated with care
  • Snapshotting of repositories to enable rolling back

Populating Repositories with Packages

Before using yum, a Quattor software repository was simply a web page where a collection of packages was offered. The collection could consist of a mix of packages from different operating system version or architectures. It was the administrator's responsibility to select a working mix of packages that could be found in the available repositories.

It is not so simple when using yum.

Yum will try to select the most recent version of a package. If two versions of the same package, intended for different distributions, exist in a repository, yum will always select the most recent, i.e., the lexically largest file name. For example, if a repository contains mypackage-1.0.el5.noarch.rpm and mypackage-1.0.el6.noarch.rpm, installing mypackage will always lead to selection of mypackage-1.0.el6.noarch.rpm, irrespective of the platform used. That can lead to very, very wrong dependency resolutions!

To prevent such problems, the repositories must be organized per distribution and optionally per architecture and may only contain packages corresponding to (i.e., built for) the related distribution and architecture. The following example presents the repositories for locally developed tools which independent of the hardware architecture:

tools/
??? el5
??? el6

It is very important that this layout is taken into consideration when adding new (versions of) packages to the repositories.

Snapshotting Repositories

Package Selection

Repository Snapshot Selection

Documentation from the Quattor website:

Installing and removing packages with Quattor

Managing packages at scale with Yum-based SPMA