Difference between revisions of "Namespaced Quattor configuration"

From PDP/Grid Wiki
Jump to navigationJump to search
 
Line 1: Line 1:
 
Work In Progress
 
Work In Progress
  
Setup: derived from SCDB.
 
  
 +
== Setup ==
 +
Derived from SCDB.
  
Current setup uses namespaces.
 
  
 +
Templates
 +
Current setup uses [[namespaces.]]
 +
 +
Description of namespace hierarchy.
 +
 +
 +
 +
== Namespaces ==
  
Namespaces
 
  
 
Quattor release 1.3 uses the concept of namespaces for organizing templates. The name of template in a namespace corresponds to its parent directory (or directories) that contain it with respect to the include root. An example: assume the include root for the Pan compiler is $I, then a template with path $I/my/namespaced/template.tpl should have the name my/namespaced/template in Pan:
 
Quattor release 1.3 uses the concept of namespaces for organizing templates. The name of template in a namespace corresponds to its parent directory (or directories) that contain it with respect to the include root. An example: assume the include root for the Pan compiler is $I, then a template with path $I/my/namespaced/template.tpl should have the name my/namespaced/template in Pan:

Revision as of 14:19, 31 August 2007

Work In Progress


Setup

Derived from SCDB.


Templates Current setup uses namespaces.

Description of namespace hierarchy.


Namespaces

Quattor release 1.3 uses the concept of namespaces for organizing templates. The name of template in a namespace corresponds to its parent directory (or directories) that contain it with respect to the include root. An example: assume the include root for the Pan compiler is $I, then a template with path $I/my/namespaced/template.tpl should have the name my/namespaced/template in Pan:

template my/namespaced/template;

# contents


Combining namespaced templates with the Pan feature called loadpath gives tremendous flexibility in defining various template tree parallel to each other with the possibility to select from a template which of the trees to use for compilation. The loadpath is set by built-in Pan variable LOADPATH, which is a list strings to consider to resolve a requested template.

A concrete example is the selection of the operating system. Assume the file system hierarchy under the include root $I is as follows:

$I
   +- centos3_i386
      +- some
         +- template
   +- centos4_i386
      +- some
         +- template

Then it is possible to

include some/template;

from other templates if either centos3_i386 or centos4_i386 was added to the Pan variable LOADPATH.