Changes between Version 4 and Version 5 of Doc/TemplateCustom


Ignore:
Timestamp:
Apr 7, 2006, 10:15:29 PM (19 years ago)
Author:
/C=FR/O=CNRS/OU=UMR8607/CN=Michel Jouvin/emailAddress=jouvin@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Doc/TemplateCustom

    v4 v5  
    3030== Clusters and Template Hierarchies ==
    3131
     32Each cluster is can be associated with one specific OS version, middleware version or sites by defining the appropriate include path used by pan compiler to locate templates. This include path is defined in the file {{{cluster.build.properties}}} at the top of each cluster hierarchy ({{{cfg/clusters/}}}''cluster-name'').
     33
     34This file must contain one line defining the property {{{cluster.pan.includes}}} as a list of space separated hierarchy list. The hierarchy is interpreted as afile pattern relative to the {{{cfg}}} directory (or whatever has been specified for {{{cfg}}} property in file {{{quattor.build.xml}}}). It '''must''' end with {{{*}}}. To specify all sub-directories below a given directory, the pattern {{{**/*}}} must be used.
     35
     36The include path is processed in the order specified. If a template exists in several hierarchies, the first one found according to the include path order is used. '''Conversely, if a template exists in several directories of a hierarchy, the inclusion order is unspecified.'''
     37
     38A {{{cluster.build.properties}}} example is :
     39{{{
     40cluster.pan.includes=sites/lal/**/* sites/grif/**/* grid/lcg-2.7.0/**/* os/sl305-i386/**/* standard/**/*
     41}}}
     42
     43As reflected by this example, standard templates ({{{grid}}}, {{{os}}} and {{{standard}}}) are generally inserted last into the include path, using this relative order.
     44
     45By definition, standard templates are generic templates and are easily shared. If one site or cluster really requires a specific version of a template, it can be duplicated in the cluster or site hierarchy.
     46
     47''Note : there is no implicit hierarchy included, except {{{clusters/cluster-name}}}. In particular, if you want to use {{{standard}}}, you need to explicitly specify it.''
     48
     49=== Cluster parameters ===
     50
     51For every cluster, it is possible to customize its configuration in template {{{pro_site_cluster_info.tpl}}}. There '''must be''' one such template per cluster. As a general rule, you need to define the following properties for each cluster (value mentionned are just examples) :
     52
     53{{{
     54#
     55# basic site information
     56#
     57"/system/cluster/name" = "LCG 2.7.0";
     58"/system/cluster/type" = "batch";
     59"/system/state" = "production";
     60"/system/siterelease" = "SL 3.05";
     61"/system/rootmail" = "grid.support@lal.in2p3.fr";
     62}}}
     63
     64You can also define variable {{{FILESYSTEM_CONFIG_SITE}}} as an alternative template name containing a filesystem layout for the cluster (or node if this is in a machine profile). For example :
     65{{{
     66FILESYSTEM_CONFIG_SITE = "pro_lcg2_system_filesystems";
     67}}}
     68
     69{{{pro_site_cluster_info.tpl}}} is often used to define the default root password in a cluster. This can be done with the following PAN instructions :
     70
     71{{{
     72#
     73# set root password on machines
     74#
     75include pro_software_component_accounts;
     76"/software/components/accounts/rootpwd" = default("$1$57qRuCXe$NPngMkg4BrPBf5hfJzJh21");
     77"/software/components/accounts/shadowpwd" = true;
     78}}}
     79
     80The encrypted password value must be provided. It can be obtained with the following command :
     81{{{
     82openssl passwd -1 my_preferred_password
     83}}}
     84
     85=== RPM repositories ===
     86
     87Each machine profile must contain the list of RPM repositories used by the profile (cluster). This is not done in any standard template. This should be done last in the machine profile and you should avoid doing this twice as this is a time consuming operation.
     88
     89This is generally done by one template and, by convention, this template is located in {{{repository}}} directory of cluster hierarchy. Example of such templates are provided as part of QWG templates. After creating the repository list, the template must call the following 2 functions to check the presence of all RPMs required in one of the repository and purge the profile of all the unneeded information :
     90{{{
     91#
     92# Standard stuff: resolve repository and purge not used entries
     93#
     94"/software/packages" = resolve_pkg_rep(value("/software/repositories"));
     95"/software/repositories" = purge_rep_list(value("/software/packages"));
     96}}}
     97
    3298=== Supporting several sites with one database ===
     99
     100The recommended layout for Quattor templates provides a flexible support for multiple sites from a unique configuration database. According to the include path defined for each cluster, each cluster can share all standard templates part of its configuration information with other clusters.
     101
     102Configuration common between several clusters is stored in a site hierarchy, stored under {{{sites}}} directory. As far as Quattor is concerned, a ''site'' doesn't have to match a geographical location but is an abstract entity corresponding to a set of shared configuration parameters. Very often, a cluster will belong to several ''sites'' corresponding to different set of common parameters. For example, in the above example, the cluster belongs to 2 sites : {{{lal}}} and {{{grif}}}. {{{lal}}} defines parameters corresponding to a specific geographical locations (like network related parameters) that are common to all kind of clusters (grid machines, non grid servers, desktops...). {{{grif}}}, on the other hand, defines parameters that are common to all grid machines, whatever geographical location they belong to.
    33103
    34104== Template Compilation Tool ==
    35105
     106All the template processing needed to build machine profiles is done with {{{ant}}} tools, a Java based equivalent of {{{make}}}. {{{ant}}} brings the advantage of platform independance, allowing to do Quattor management tasks on any platform (Unix, Windows, MacOS).
     107
     108Specific management tasks (called {{{targets}}}) are passed as a parameter to {{{ant}}} command, in much the same way this is done with {{{make}}}. There are 3 main targets for managing Quattor (other targets are used internally by {{{ant}}}) :
     109
     110 * {{{compile.all}}} : this task recompiles all the machine profiles affected by template changes. This is the default if no target is specified.
     111 * {{{deploy}}} : this task deploys the new machine profiles on the Quattor server. This can occurs only after successful compilation of all clusters.
     112 * {{{update.rep.templates}}} : this task updates templates describing RPM repositories contents by scanning each repository associated directory.
     113
     114