wiki:Download/SCDB

Version 7 (modified by /C=FR/O=CNRS/OU=UMR8607/CN=Michel Jouvin/emailAddress=jouvin@…, 18 years ago) (diff)

--

How to Install Quattor with SCDB

Web Server Installation

The Quattor server needs to run a Web server to serve profiles, kickstart configuration files and execute the CGI script at end of installation to change PXE boot to local disk. In addition, it is recommended (but not necessary) to use this Web server for serving RPMs.

Web server installation requires nothing specific, just the configuration of a document root with enough space if you plan to serve RPMs and the configuration of CGIs. This Web server can be shared with other usages and you can use a specific virtual host instead of a dedicated server.

Apache is the recommended Web server (installation instuctions here refer to Apache) and it can be installed from the OS distribution.

Subversion Server

There is no need for a Subversion server dedicated to Quattor. SCDB is just one repository from the Subversion point of view. If you already run a Subversion server, you can skip the installation part and go directly to the configuration part.

Subversion installation

There are many possible installation options for a Subversion server. The best is to install it as Apache module, anyway. There is no requirement for the Subversion server to run on a Linux machine, even if it is the installation option documented here. You can even choose to use a Subversion server outside of your site, if you think the network connection is good enough.

If you need to install a Subversion server, the easiest is to install Apache and then retrieve the RPMs for Subversion from Subversion site. Don't forget to install the Apache module which is in a separate RPM.

After installing, you have to configure the Subversion server. Look at Quattor installation guide on Quattor web site.

Repository configuration

For Quattor, you need to create a repository with the standard structure inside it (or inside a branch) :

  • trunk : where you make the changes to your running configuration
  • tags : used by SCDB administration tool to do deployment
  • branches : for alternative developments

Quattor Server

In addition to the base system installation, you need to install the following RPMs on a Quattor server where you want to use SCDB :

  • Java VM > 1.5.0
  • Subversion client
  • PAN compiler
  • cdb-sync
  • ncm-template
  • aii-server

All but Java and SVN client can be download from http://quattorsrv.lal.in2p3.fr/packages/quattor/sl-i386. Always use the last version, unless explicitly mentionned.

SCDB Initialization

To start with SCDB, you first need to install a Subversion server, an open source product. There are in fact 2 versions of Subversion server :

  • http based : it is provided as an Apache module. This is the recommended version for production but is a litte bit more complex to setup than standalone version.
  • standalone version : this should be used for testing, as it has less features than http based version.

There is no problem to start with standalone server and migrate to http server later (just the repository URL will change and it will require a new checkout) : repository are the same whatever the access method is.

After you have a Subversion server installed, you need to :

  • Create a repository or a branch in an existing repository where SCDB will be stored
  • Checkout this repository/branch (svn co)
  • Import the basic SCDB structure from SCDB.
  • Import QWG templates in cfg directory, according to the version you need. See QWG download instructions.

A tool originally written for QWG templates developpers, check-compile.sh, simplifies the two last steps (import of standard templates), executing both operations and compiling examples. Use option -h to get the list of available options. A typical use of this tool (replace the release tag gLite-3.0.2-1 by the QWG templates release you want to download) is :

check-compile.sh -d your_scdb_dir /templates/tags/gLite-3.0.2-1

Site Configuration

Java version 1.5 is needed to run the ant build script.

RPM Repositories

Middleware Configuration

Cluster Configuration

Quattor Server Final configuration

Before being able to deploy the created configuration, there is a last configuration step needed to allow deployment of the configuration after successful compilation. This involves :

  • Adding a hook script to the Subversion repository to trigger the deployment
  • Adding a script on the Quattor server that will be launched by the hook script, using ssh
  • Configuring SSH keys to allow execution of the previous script as root (preferably) from the Apache account
  • Add a CGI script on Quattor server used at end of installation of a machine to allow next boot from local disk.
  • Configuration of AII

Installation of hook script and server script

The hook script, post-commit, is provided as part of SCDB, in the src/hooks directory. It must be installed on your Subversion server, in the hook directory of the repository, and given executable permission for Apache user.

The other script, build-tag.pl, also provided as part of SCDB, in the src/hooks directory, must be installed (root executable) in /root/quattor on the Quattor server.

Creation of Ssh Keys

Currently, deployment of new version of the templates is done by the hook script triggered by ant deploy executing the server script build-tag.pl through ssh. There is no way to enter a password at this time, thus ssh must be configured in such a way that the Apache account on the Subversion server can do a ssh connection as root on the Quattor server, without password. The easiest is to use ssh keys to do that.

Post-installation CGI Script

At the end of a machine installation, as part of the Kickstart post-intallation script, a CGI script is executed on the Quattor server to change PXE configuration in order for the machine to boot from local disk next time. This allows to set PXE as the first boot device in the BIOS and control re-installation via aii-shellfe command.

This script, build-tag.pl, can be found in SCDB directory src/cgis. It must be placed on the Web server running on the Quattor server, in the directory for CGIs.

Configuration of AII

This involves 2 separate steps :

  • Customization of /etc/aii*.conf files
  • Customization of AII related variables in templates

To customize AII configuration files, located in /etc and named aii-*.conf, refer to the comment in each files. Main parameters to customize are the URL to use to download profiles (in aii-shellfe.conf) and the directory where to place kickstart configuration files produced by AII (in aii-osinstall.conf).

There are a few variables to customize in site templates to reflect your Quattor and AII configuration, mainly :

  • QUATTOR_PROFILE_URL : URL to use to download machine profiles.
  • AII_OSINSTALL_SRV : Name of the Web server serving kickstart configuration files and RPMs.
  • AII_ACKSRV : Name of the Web server to use for the post-installation CGI. Defaults to AII_OSINSTALL_SRV
  • AII_ACKCGI : post-installation CGI URL. Defaults to /cgi-bin/aii-installack.cgi.
  • AII_OSINSTALL_TEMPLATE : name of the Kickstart configuration template to use. Defaults to i386_sl3_ks.conf.

These variables are generally defined site-wide, in the template pro_site_global_variables.tpl located in site directory. Look at provided examples, in SCDB distribution.