| 203 | |
| 204 | == Advanced Features == |
| 205 | |
| 206 | === Management of Package Repository Templates === |
| 207 | |
| 208 | Each package repository has an associated templates describing its contents. The template must be updated after any change to the package repository with the following command: |
| 209 | {{{ |
| 210 | external/ant/bin/ant update.rep.templates |
| 211 | }}} |
| 212 | |
| 213 | The only important information in this template are the first comments at the head of the templates. They are used to generate the locate the package repository and generate the template with the appropriate information. Theses comments look like: |
| 214 | {{{ |
| 215 | # name = glite_3_2 |
| 216 | # owner = grid.support@lal.in2p3.fr |
| 217 | # url = http://quattor.web.lal.in2p3.fr/packages/glite/3.2/release/ |
| 218 | }}} |
| 219 | |
| 220 | where: |
| 221 | * `name` is the internal name used in the node profile to refer to the repository. It is an arbitrary name. |
| 222 | * `url` is the URL to use to access the repository |
| 223 | |
| 224 | The generated template will have a namespace formed with `repository/` followed by the repository name. |
| 225 | |
| 226 | To create a new repository, just create a new template with the appropriate name (it must match the repository name) and add the initial comments. Then run the command to update the template. |
| 227 | |
| 228 | It is possible, when updating templates describing package repositories (`ant update.rep.templates`), to generate an additional template, `repository/allrepositories.tpl`, that defines the variable `ALL_REPOSITORIES`. This variable is a nlist where the key is the repository name and the value the repository information as expected by `/software/repositories`. |
| 229 | |
| 230 | Currently, there is no specific handling for colliding repository names (repository with the same name existing in different part of the configuration database and normally not used in the same clusters). This results in duplicated keys in `ALL_REPOSITORIES` that must be sorted out manually. Even though this is a perfectly valid configuration, you should avoid colliding repository names if you want to use this feature. |
| 231 | |
| 232 | To activate this feature, define property `rep.templates.allReposTemplateDir` in `quattor.build.properties` (see [#ConfiguringSCDBAntTools documentation]) as the relative directory under directory specified by property `cfg.repos`(default `cfg/`) where to create `repository/allrepositories.tpl`. |