Changes between Version 64 and Version 65 of Download/SCDB


Ignore:
Timestamp:
Nov 3, 2008, 8:56:31 PM (16 years ago)
Author:
/DC=es/DC=irisgrid/O=uam/CN=luisf-munnoz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Download/SCDB

    v64 v65  
    44[[TOC(inline)]]
    55
    6 ''Note : the installation process described below is as generic as possible, but does also contains a set of commands that have been tested only on Scientific Linux version 4. They may need to be modified for other plateforms.''
     6''Note : the installation process described below is as generic as
     7possible, but does also contains a set of commands that have been
     8tested only on Scientific Linux version 4. They may need to be
     9modified for other platforms.''
    710
    811== OS Installation ==
    912
    10 Quattor server requires a machine installed with a default server installation of any RH-based Linux distro. There is no specific requirements for the OS configuration itself. The server can be installed by any mean available at the site (CD-Rom, Kickstart, imaging...). When Quattor server is readyn it will be possible to manage the server itself with Quattor, except for OS upgrades.
     13Quattor server requires a machine installed with a default server
     14installation of any RH-based Linux distro. There is no specific
     15requirements for the OS configuration itself. The server can be
     16installed by any mean available at the site (CD-Rom, Kickstart,
     17imaging...). When Quattor server is readyn it will be possible to
     18manage the server itself with Quattor, except for OS upgrades.
    1119
    1220== Web Server Installation ==
    1321
    14 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.
    15 
    16 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.
    17 
    18 Apache is the recommended Web server (installation instructions here refer to Apache) and it can be installed from the OS distribution. Note that for subversion http mode, Apache version 2 or above is needed.
     22The Quattor server needs to run a Web server to serve profiles,
     23kickstart configuration files and execute the CGI script at end of
     24installation to change PXE boot to local disk. In addition, it is
     25recommended (but not necessary) to use this Web server for serving
     26RPMs.
     27
     28Web server installation requires nothing specific, just the
     29configuration of a document root with enough space if you plan to
     30serve RPMs and the configuration of CGIs. This Web server can be
     31shared with other usages and you can use a specific virtual host
     32instead of a dedicated server.
     33
     34Apache is the recommended Web server (installation instructions here
     35refer to Apache) and it can be installed from the OS
     36distribution. Note that for subversion http mode, Apache version 2 or
     37above is needed.
    1938
    2039=== Apache Recommended Settings ===
    2140
    22 SCDB has no strong requirement concerning Apache configuration. It generally uses 3 distinct URLs for 3 different purposes :
    23  * Profiles : machine profiles are served by one specific URL shared by all machines. The files there are XML files produces by the PAN compiler when executing `ant deploy`.
    24  * Kickstart configuration files : this URL is used to store the Kickstart configuration file for each machines. These files are produced by `aii-shellfe --configure`.
    25  * RPM packages : RPMs are grouped in repositories, each repository has its own URL. This is a common setting to have one common parent URL for all repositories but this is not at all a requirement.
     41SCDB has no strong requirement concerning Apache configuration. It
     42generally uses 3 distinct URLs for 3 different purposes :
     43
     44 * Profiles : machine profiles are served by one specific URL shared
     45   by all machines. The files there are XML files produces by the PAN
     46   compiler when executing `ant deploy`.
     47 * Kickstart configuration files : this URL is used to store the
     48   Kickstart configuration file for each machines. These files are
     49   produced by `aii-shellfe --configure`.
     50 * RPM packages : RPMs are grouped in repositories, each repository
     51   has its own URL. This is a common setting to have one common parent
     52   URL for all repositories but this is not at all a requirement.
    2653
    2754Recommended setting for these 3 areas are :
    28  * Restrict access to profile and Kickstart configuration to IP adresses (or subnets) matching Quattor clients, as these files may contain sensitive information like encrypted passwords or MySQL passwords (cleartext).
    29  * Configure all these areas to ignore any `index.html` file and auto-indexing. This is particularly important for RPM repositories URLs, as presence of an `index.html` will prevent SCDB tools to get the list of RPMs in the repository.
    30 
    31 Configuration for these areas is normally done by creating a file `/etc/httpd/conf.d/quattor.conf` with directives like the following one for each area (replace `/path/to/area` by your actual directoy name) :
     55
     56 * Restrict access to profile and Kickstart configuration to IP
     57   adresses (or subnets) matching Quattor clients, as these files may
     58   contain sensitive information like encrypted passwords or MySQL
     59   passwords (cleartext).
     60 * Configure all these areas to ignore any `index.html` file and
     61   auto-indexing. This is particularly important for RPM repositories
     62   URLs, as presence of an `index.html` will prevent SCDB tools to get
     63   the list of RPMs in the repository.
     64
     65Configuration for these areas is normally done by creating a file
     66`/etc/httpd/conf.d/quattor.conf` with directives like the following
     67one for each area (replace `/path/to/area` by your actual directoy
     68name) :
     69
    3270{{{
    3371<Directory /path/to/area>
     
    3876}}}
    3977
    40 It is also better to add the following directive in our `/etc/httpd/conf.d/quattor.conf` to work around a problem in some RPM versions:
     78It is also better to add the following directive in our
     79`/etc/httpd/conf.d/quattor.conf` to work around a problem in some RPM
     80versions:
     81
    4182{{{
    4283<IfModule mod_setenvif.c>
     
    4586}}}
    4687
    47 ''Note: if you are installing a new Apache server, don't forget to edit `DocumentRoot` in `/etc/httpd/conf/httpd.conf` to reflect your local configuration.`
    48 
    49 ''Note: even though it is easily redone, it is better to backup `quattor.conf` file.''
     88''Note: if you are installing a new Apache server, don't forget to
     89edit `DocumentRoot` in `/etc/httpd/conf/httpd.conf` to reflect your
     90local configuration.`
     91
     92''Note: even though it is easily redone, it is better to backup
     93`quattor.conf` file.''
    5094
    5195== Subversion Server ==
    5296
    53 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.
     97There is no need for a Subversion server dedicated to Quattor. SCDB is
     98just one repository from the Subversion point of view. If you already
     99run a Subversion server, you can skip the installation part and go
     100directly to the configuration part.
    54101
    55102=== Subversion Installation and Configuration ===
    56103
    57 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.
    58 
    59 If you need to install a Subversion server, the easiest is to install Apache using YUM. Another option is to retrieve the RPMs for Subversion from [http://subversion.tigris.org/project_packages.html Subversion site]. Don't forget to install the Apache module which is in a separate RPM.
     104There are many possible installation options for a Subversion
     105server. The best is to install it as Apache module, anyway. There is
     106no requirement for the Subversion server to run on a Linux machine,
     107even if it is the installation option documented here. You can even
     108choose to use a Subversion server outside of your site, if you think
     109the network connection is good enough.
     110
     111If you need to install a Subversion server, the easiest is to install
     112Apache using YUM. Another option is to retrieve the RPMs for
     113Subversion from [http://subversion.tigris.org/project_packages.html
     114Subversion site]. Don't forget to install the Apache module which is
     115in a separate RPM.
    60116
    61117A typical SVN installation with YUM is:
     
    76132}}}
    77133
    78 Apache SVN module configuration (`/etc/httpd/conf.d/subversion.conf`) must be edited to configure URL used by SVN. A typical example, based on previously created repository (adjust paths to reflect your configuration) is:
     134Apache SVN module configuration (`/etc/httpd/conf.d/subversion.conf`)
     135must be edited to configure URL used by SVN. A typical example, based
     136on previously created repository (adjust paths to reflect your
     137configuration) is:
     138
    79139{{{
    80140<Location /svn>
     
    99159}}}
    100160
    101 To configuration SVN authentication for SCDB repository, you need to create one or more accounts in `/etc/httpd/security/passwd`. You can use `htpasswd` or `openssl passwd -apr1` to generate an encrypted password.
    102 
    103 You also need to define SVN ACLs in `/etc/httpd/security/svn-repositories-access`. A typical file to start is (it assumes the account you created is called `quattormgr`, if this is a list it must be comma separated):
     161To configure SVN authentication for SCDB repository, you need to
     162create one or more accounts in `/etc/httpd/security/passwd`. You can
     163use `htpasswd` or `openssl passwd -apr1` to generate an encrypted
     164password.
     165
     166You also need to define SVN ACLs in
     167`/etc/httpd/security/svn-repositories-access`. A typical file to start
     168is (it assumes the account you created is called `quattormgr`, if this
     169is a list it must be comma separated):
     170
    104171{{{
    105172[groups]
     
    176243}}}
    177244
    178 If you want to share DHCP between Quattor and non Quattor usage, it's probably better to move the last part (`subnet...`) into a separate file, like `/etc/dhcpd/quattor.conf` and replace it in the main configuration file by:
     245If you want to share DHCP between Quattor and non Quattor usage, it's
     246probably better to move the last part (`subnet...`) into a separate
     247file, like `/etc/dhcpd/quattor.conf` and replace it in the main
     248configuration file by:
     249
    179250{{{
    180251include "/etc/dhcpd/quattor.conf";
    181252}}}
    182253
    183 See `man dhcpd` and `man dhcpd.conf` for details about DHCP server configuration, in particular to support multiple subnets and other advanced features.
    184 
    185 TFTP server is run by `xinetd`. In the default configuration, it is disabled. Enable it by editing `/etc/xinetd.d/tftp`, modifying `disable` parameter from `yes` to `no`.
    186 
    187 Note that default location for TFTP root in AII configuration files is {{{/osinstall/nbp}}}. It must be explicitly defined if you want to use {{{/tftpboot}}} or another location.
     254See `man dhcpd` and `man dhcpd.conf` for details about DHCP server
     255configuration, in particular to support multiple subnets and other
     256advanced features.
     257
     258TFTP server is run by `xinetd`. In the default configuration, it is
     259disabled. Enable it by editing `/etc/xinetd.d/tftp`, modifying
     260`disable` parameter from `yes` to `no`.
     261
     262Note that default location for TFTP root in AII configuration files is
     263{{{/osinstall/nbp}}}. It must be explicitly defined if you want to use
     264{{{/tftpboot}}} or another location.
    188265
    189266
    190267== Quattor Server ==
    191268
    192 In addition to the base system installation, you need to install the following RPMs on a Quattor server where you want to use SCDB :
     269In addition to the base system installation, you need to install the
     270following RPMs on a Quattor server where you want to use SCDB :
    193271
    194272 * Java VM > 1.5.0
     
    196274 * cdb-sync
    197275 * ncm-template
    198  * aii-server
    199 
    200 All but Java and SVN client can be download from http://quattorsrv.lal.in2p3.fr/packages/quattor/sl. Always use the last version, unless explicitly mentionned. You can also use APT or YUM from http://quattorsw.web.cern.ch/quattorsw/software/quattor.
     276 * aii-server (2.4 or higher)
     277 * ncm-lib-blockdevices (0.18.5 or 0.20)
     278 * aii-ks
     279 * aii-pxelinux
     280
     281All but Java and SVN client can be download from
     282http://quattorsrv.lal.in2p3.fr/packages/quattor/sl. Always use the
     283last version, unless explicitly mentioned. You can also use APT or YUM
     284from http://quattorsw.web.cern.ch/quattorsw/software/quattor.
    201285
    202286== SCDB Initialization ==
    203287
    204 To start with SCDB, you first need to install a [http://subversion.tigris.org Subversion] server, an open source product. The http based repository access '''must''' be used for quattor, the standalone access wont work (limitation of the build script).
     288To start with SCDB, you first need to install a
     289[http://subversion.tigris.org Subversion] server, an open source
     290product. The http based repository access '''must''' be used for
     291quattor, the standalone access wont work (limitation of the build
     292script).
    205293
    206294After you have a Subversion server installed, you need to :
    207  * Create a Subversion repository that will be used for SCDB, if it doesn't exist yet, and associate this repository with a URL (this can involve modifying Apache configuration). There is no need to use a dedicated repository. E.g. : `http://svn.example.org/Quattor`.
    208  * Create a branch in this repository where SCDB will be stored, if the repository is not dedicated to SCDB. E.g. : `http://svn.example.org/Quattor/CDB`.
    209  * In this branch, create 2 branches `trunk` and `tags` (`tags` is managed by SCDB tools, all the actions you'll do later will be done in `trunk`. You can also create other branches for your conveniences (like `branches` but they are not used by standard tools).
    210  * Choose the QWG templates version that suit your needs and import [source:SCDB/tags/pro SCDB base] and QWG templates in directory that will become you working area. See [wiki:Download/QWGTemplates QWG download] for detailed instructions. The easiest is to download and use [source:templates/trunk/tools/check-compile.sh check-compile.sh] (use option `-h` to get the list of available options). For example, assuming you want to create a `cdb` sub-directory of your current directory and download QWG templates gLite-3.0.2-10 :
     295
     296 * Create a Subversion repository that will be used for SCDB, if it
     297   doesn't exist yet, and associate this repository with a URL (this
     298   can involve modifying Apache configuration). There is no need to
     299   use a dedicated repository. E.g. :
     300   `http://svn.example.org/Quattor`.
     301 * Create a branch in this repository where SCDB will be stored, if
     302   the repository is not dedicated to SCDB. E.g. :
     303   `http://svn.example.org/Quattor/CDB`.
     304 * In this branch, create 2 branches `trunk` and `tags` (`tags` is
     305   managed by SCDB tools, all the actions you'll do later will be done
     306   in `trunk`. You can also create other branches for your
     307   conveniences (like `branches` but they are not used by standard
     308   tools).
     309 * Choose the QWG templates version that suit your needs and import
     310   [source:SCDB/tags/pro SCDB base] and QWG templates in directory
     311   that will become you working area. See [wiki:Download/QWGTemplates
     312   QWG download] for detailed instructions. The easiest is to download
     313   and use [source:templates/trunk/tools/check-compile.sh
     314   check-compile.sh] (use option `-h` to get the list of available
     315   options). For example, assuming you want to create a `cdb`
     316   sub-directory of your current directory and download QWG templates
     317   gLite-3.0.2-10 :
     318
    211319{{{
    212320check-compile.sh -d cdb /templates/tags/gLite-3.0.2-10
     
    220328svn co http://svn.example.org/Quattor/CDB/trunk .
    221329}}}
    222  * Configure the repository to ignore some files produced when compiling, using the following command :
     330 * Configure the repository to ignore some files produced when
     331   compiling, using the following command :
    223332{{{
    224333cat > /tmp/ignore <<EOF
     
    244353== Site Configuration ==
    245354
    246 After copying the SCDB distribution, you need to create your first site. You can do this by copying `sites/example` directory and customizing a few templates.
     355After copying the SCDB distribution, you need to create your first
     356site. You can do this by copying `sites/example` directory and
     357customizing a few templates.
    247358
    248359=== RPM Repositories ===
    249360
    250 To use Quattor, you need to deploy software repositories. Even if you want to customize it later, you are probably better to start with a configuration similar to what is provided in `repository` directory of `sites/example` directory. You can retrieve an initial directory content  for each RPM repository by downloading the contents of the URL specified in comments at the beginning of each repository templates.
     361To use Quattor, you need to deploy software repositories. Even if you
     362want to customize it later, you are probably better to start with a
     363configuration similar to what is provided in `repository` directory of
     364`sites/example` directory. You can retrieve an initial directory
     365content for each RPM repository by downloading the contents of the URL
     366specified in comments at the beginning of each repository templates.
    251367
    252368=== Basic System Configuration ===
    253369
    254 Basic system configuration (network parameters, DNS servers, ...) are grouped in template `pro_site_cluster_info.tpl` in `site` directory of your site. Look at comments to understand what you need to modify.
     370Basic system configuration (network parameters, DNS servers, ...) are
     371grouped in template `pro_site_cluster_info.tpl` in `site` directory of
     372your site. Look at comments to understand what you need to modify.
    255373
    256374=== Middleware Configuration ===
    257375
    258 Middleware configuration is located in template `pro_lcg2_config_site.tpl` in `site` directory of your site. Look at comments to understand what you need to modify.
     376Middleware configuration is located in template
     377`pro_lcg2_config_site.tpl` in `site` directory of your site. Look at
     378comments to understand what you need to modify.
    259379
    260380
    261381== Cluster Configuration ==
    262382
    263 After creating your site, you need to create your first cluster. You can do this by copying `clusters/example` directory and customizing a few templates.
     383After creating your site, you need to create your first cluster. You
     384can do this by copying `clusters/example` directory and customizing a
     385few templates.
    264386
    265387=== Hardware description ===
    266388
    267 You need to create a template describing the hardware configuration of your machines. This is generally placed in `hardware`sub-directory of site directory. Look at examples.
     389You need to create a template describing the hardware configuration of
     390your machines. This is generally placed in `hardware`sub-directory of
     391site directory. Look at examples.
    268392
    269393=== Adding Machine to pro_site_database.tpl ===
    270394
    271 Before being able to configure the machine, you need to create an entry for the machine name in both tables of  `pro_site_database.tpl`. First entry defines the address associated with the machine name, second entry defines the hardware template associated with the machne.
     395Before being able to configure the machine, you need to create an
     396entry for the machine name in both tables of
     397`pro_site_database.tpl`. First entry defines the address associated
     398with the machine name, second entry defines the hardware template
     399associated with the machne.
    272400
    273401=== Creating Machine Profile ===
    274402
    275 Copy an existing profile in examples corresponding to the machine type you want to create.
     403Copy an existing profile in examples corresponding to the machine type
     404you want to create.
    276405
    277406== Quattor Server Final configuration ==
    278407
    279 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 :
    280 
    281  * Adding a hook script to the Subversion repository to trigger the deployment
    282  * Adding a script on the Quattor server that will be launched by the hook script, using ssh
    283  * Configuring SSH keys to allow execution of the previous script as root (preferably) from the Apache account
    284  * Add a CGI script on Quattor server used at end of installation of a machine to allow next boot from local disk.
     408Before being able to deploy the created configuration, there is a last
     409configuration step needed to allow deployment of the configuration
     410after successful compilation. This involves :
     411
     412 * Adding a hook script to the Subversion repository to trigger the
     413   deployment
     414 * Adding a script on the Quattor server that will be launched by the
     415   hook script, using ssh
     416 * Configuring SSH keys to allow execution of the previous script as
     417   root (preferably) from the Apache account
     418 * Add a CGI script on Quattor server used at end of installation of a
     419   machine to allow next boot from local disk.
    285420 * Configuration of AII
    286 
    287421
    288422=== Installation of hook script and server script ===
     
    319453=== Post-installation CGI Script ===
    320454
    321 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.
    322 
    323 This script, `aii-installack.cgi`, 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.
    324 
    325 The apache server must be able to run that script as root. Best is to have {{{sudo}}} installed and use {{{visudo}}} to add the following to {{{/etc/sudoers}}}:
     455At the end of a machine installation, as part of the Kickstart
     456post-intallation script, a CGI script is executed on the Quattor
     457server to change PXE configuration in order for the machine to boot
     458from local disk next time. This allows to set PXE as the first boot
     459device in the BIOS and control re-installation via `aii-shellfe`
     460command.
     461
     462This script, `aii-installack.cgi`, can be found in SCDB directory
     463`src/cgis`. It must be placed on the Web server running on the Quattor
     464server, in the directory for CGIs.
     465
     466The apache server must be able to run that script as root. Best is to
     467have {{{sudo}}} installed and use {{{visudo}}} to add the following to
     468{{{/etc/sudoers}}}:
    326469 
    327470{{{apache sbgat419.in2p3.fr=(ALL) NOPASSWD: /usr/sbin/aii-shellfe}}}
     
    331474
    332475This involves 2 separate steps :
    333  * Customization of `/etc/aii*.conf` files
     476 * Customization of `/etc/aii/aii*.conf` files
    334477 * Customization of AII related variables in templates
    335478
    336 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`).
    337 
    338 There are a few variables to customize in site templates to reflect your Quattor and AII configuration, mainly :
     479To customize AII configuration files, located in `/etc` and named
     480`aii-*.conf`, refer to the comment in each files. Main parameters to
     481customize are the URL to use to download profiles (in
     482`aii-shellfe.conf`) and the directory where to place kickstart
     483configuration files produced by AII (in `aii-osinstall.conf`).
     484
     485There are a few variables to customize in site templates to reflect
     486your Quattor and AII configuration, mainly :
    339487
    340488 * `QUATTOR_PROFILE_URL` : URL to use to download machine profiles.
    341  * `AII_OSINSTALL_SRV` : Name of the Web server serving kickstart configuration files and RPMs.
    342  * `AII_ACKSRV` : Name of the Web server to use for the post-installation CGI. Defaults to `AII_OSINSTALL_SRV`
    343  * `AII_ACKCGI` : post-installation CGI URL. Defaults to `/cgi-bin/aii-installack.cgi`.
    344  * `AII_OSINSTALL_TEMPLATE` : name of the Kickstart configuration template to use. Defaults to `i386_sl3_ks.conf`.
    345 
    346 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.
    347 
     489 * `AII_OSINSTALL_SRV` : Name of the Web server serving kickstart
     490 * configuration files and RPMs.
     491 * `AII_ACKSRV` : Name of the Web server to use for the
     492   post-installation CGI. Defaults to `AII_OSINSTALL_SRV`
     493 * `AII_ACKCGI` : post-installation CGI URL. Defaults to
     494   `/cgi-bin/aii-installack.cgi`.
     495 * `AII_OSINSTALL_TEMPLATE` : name of the Kickstart configuration
     496   template to use. Defaults to `i386_sl3_ks.conf`.
     497
     498These variables are generally defined site-wide, in the template
     499`pro_site_global_variables.tpl` located in site directory. Look at
     500provided examples, in SCDB distribution.
     501
     502=== Downloading the distribution's images ===
     503
     504If you want to perform network-based installations, you need to
     505download the distribution's CDs. They contain the kernel and initrd to
     506be used during the installation, which will re-direct to Red Hat's
     507installer. This installer is also located on the CD (usually the first
     508CD) or DVD of your distribution.
     509
     510The easiest way is to download the full DVD of your distro, f.i, SL:
     511
     512{{{
     513wget http://.../distro-version.iso
     514}}}
     515
     516Then, mount it somewhere Apache can read to. For instance,
     517`/var/www/html/your_platform`:
     518
     519{{{
     520mount -o bind /path/to/dvd/image /var/www/html/sl520-x86_64
     521}}}
     522
     523Add it to your fstab, if needed. Next, you'll need to copy the files
     524used for PXE somewhere the TFTP server can reach them. Their location
     525depends on the distribution, it's usually on a directory called
     526pxeboot:
     527
     528{{{
     529mkdir /osinstall/nbp/<platform>
     530cp  /var/www/html/<platform>/.../pxeboot/* /osinstall/nbp/<platform>
     531}}}
    348532
    349533== Compiling and Deploying ==
    350534
    351 After the configuration is finished, you can try to compile your first profile, deploy it and install the machine. This involves the following steps :
     535After the configuration is finished, you can try to compile your first
     536profile, deploy it and install the machine. This involves the
     537following steps :
    352538
    353539 * In SCDB (working area copy) top level directory :