Changes between Version 28 and Version 29 of Doc/TemplateCustom
- Timestamp:
- Jun 27, 2007, 9:05:28 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Doc/TemplateCustom
v28 v29 58 58 === RPM repositories === 59 59 60 Each 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 lastin the machine profile and you should avoid doing this twice as this is a time consuming operation.60 Each machine profile must contain the list of RPM repositories (directories where to download RPMs from) used in the profile. This is done by including at the end of the profile a cluster or site specific [source:templates/trunk/clusters/example/repository/config.tpl template], generally named `repository/config.tpl`. '''This must be done last''' in the machine profile and you should avoid doing this twice as this is a time consuming operation. 61 61 62 This 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:62 It is recommended to refer to this template through variable `PKG_REPOSITORY_CONFIG` and to define this variable in cluster specific [source:templates/trunk/clusters/example/site/pro_site_cluster_info.tpl pro_site_cluster_info.tpl]. Using this method you should add at the end of each machine profile : 63 63 {{{ 64 # 65 # Standard stuff: resolve repository and purge not used entries 66 # 67 "/software/packages" = resolve_pkg_rep(value("/software/repositories")); 68 "/software/repositories" = purge_rep_list(value("/software/packages")); 64 include { PKG_REPOSITORY_CONFIG }; 69 65 }}} 66 67 Look at machine profile [source:templates/trunk/clusters/example/profiles examples] for more information. 70 68 71 69 === Supporting several sites with one database === … … 73 71 The 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. 74 72 75 Configuration 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, definesparameters that are common to all grid machines, whatever geographical location they belong to.73 Configuration common between several clusters is stored in a site hierarchy, stored under [source:templates/trunk/sites 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. A cluster may belong to several ''sites'' corresponding to different set of common parameters. For example, a cluster may belong to 2 sites : {{{mycity}}} and {{{gridsite}}}. {{{mycity}}} will define 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...) at this geographical location. {{{gridsite}}}, on the other hand, will define parameters that are common to all grid machines, whatever geographical location they belong to. 76 74 77 75 == Hardware Templates == … … 79 77 Hardware configuration of machines is described as part of the machine profiles through a set of templates. There is one template for each kind of hardware subsystem (CPU, memory, nic...). They are located in [source:templates/trunk/standard/hardware standard/hardware]. There is one subdirectory for each kind of hardware subsystem. There is also a `legacy` subdirectory with templates in the old format (non namespaced). 80 78 81 The recommandation is to create one template per machine that includes the appropriate templates to describe the machine hardware. The suggested location for these site specific templates are in `hardware/machine` in site directory. Look at [source:templates/trunk/sites/example/hardware ] examplesfor more information.79 The recommandation is to create one template per machine that includes the appropriate templates to describe the machine hardware. The suggested location for these site specific templates are in `hardware/machine` in site directory. Look at [source:templates/trunk/sites/example/hardware examples] for more information. 82 80 83 ''__Note__ : if you have existing clusters that where using only the legacy, non namespaced, version of hardware template, you need to update `cluster.build.properties` in all your clusters and add `sites/mysite` before `sites/mysite/**/*` in `cluster.pan.includes` value.''81 ''__Note__ : if you have existing clusters that are using only the legacy, non namespaced, version of hardware template, you need to update `cluster.build.properties` in all your clusters and add `standard/hardware/legacy` '''after''' `standard` in `cluster.pan.includes` value.'' 84 82 85 83 == Template Compilation Tool == … … 87 85 The recommended method to process all the templates and build machine profiles is to use {{{ant}}} tool, a Java based equivalent of {{{make}}}, provided with SCDB (it can also be used without SCDB). {{{ant}}} brings the advantage of platform independance, allowing to do Quattor management tasks on any platform (Unix, Windows, MacOS). 88 86 89 Look at [wiki:Doc/SCDB/Usage SCDB usage] documentation for more information on how to use this tool.87 Look at [wiki:Doc/SCDB/Usage SCDB Usage] documentation for more information on how to use this tool.