How to work with our Quattor setup
This article describes how to perform basic and essential tasks with the current setup of Quattor at Nikhef.
Overview
Everyone who wants to make changes in the Quattor setup, should make them in his private working area. The working area can be created by checking out from the repository; see section Using the repository for details.
After making the changes in the private working copy, the templates should be compiled. How this is done is described in the section Compiling.
If the compilation was successful, i.e., without errors or warnings, the modified templates can be checked in into the Subversion repository. Note: modified templates should only be checked in if they are to be deployed immediately! Checking in templates but not deploying them could cause surprises for the next person to deploy his changes (well, that's what he might think!).
The deployment phase consists of a checkout on the Quattor server using a dedicated account, followed by a compilation and deployment procedure. The details of this process are given in section Deploying.
Using the repository
The Quattor setup, comprising the template hierarchy and the SCDB setup, are stored on the Subversion server ndpfsvn.nikhef.nl in repository ndpf. Access to this repository is limited to selected administrators. See the Wiki article on SVN access for details.
Checking out
Before checking out, ensure there is an ssh agent running that contains the key that is registered on the SVN server. To check out a working copy of the trunk revision under the current working directory, use the following command:
svn co svn+ssh://svn@ndpfsvn.nikhef.nl/repos/ndpf/nl.nikhef.ndpf.quattor-config/trunk
This will create a directory trunk in the working directory, which contains the checked out tree. The file system hierarchy under trunk includes the SCDB setup for Nikhef as well as the Quattor template hierarchy. After this check out, it should be possible to compile templates.
Updating
When a working copy exists, it can be synchronized with the last in the SVN repository. To retrieve the latest files, and merge them with local modifications if possible, the "svn up" command can be executed in the working directory or any of its child directories:
svn up
This command will update the contents of the working directory and its child directories. If optional directories are specified, only the contents under those directories are updates.
Checking in
Details on checking in
Compiling
Building templates is easiest with the shell scripts makexprof and pushxprof, respectively. Note that the latter is a symlink to the former. Syntax:
makexprof -f <facility-name> [template1] [template2] [...]
The option -f with argument <facility-name> is required to select one of the facility names. Currently defined facilities: itb (Installation Test Bed), prd (Production cluster) and generic (miscellaneous Quattor-managed servers).
Updating the templates that describe the contents of the package repositories is done by directly executing the task update.rep.templates in the Ant script:
( cd $L ; ant update.rep.templates )
Deploying
pushxprof [options] -f <facility-name> [template1] [template2] [...]