| 337 | == Shared gridmapdir == #SharedGridmapdir |
| 338 | |
| 339 | QWG templates support configuration of a shared gridmapdir between different machines. This is typically used when several CEs share the same WNs to ensure a consistent mapping of DNs to userids through all CEs. The QWG implementation is not restricted to CEs, even though it doesn't really make sense for other services. |
| 340 | |
| 341 | If several machines have to share the same gridmapdir, the variable `GRIDMAPDIR_SHARED_PATH` must be defined in their profile. This variable is undefined by default. When defined it must refer to an existing path on the machine that will use it or the gridmapdir will not be configured as shared. |
| 342 | |
| 343 | Even though it is not mandatory, gridmapdir is generally shared using NFS. To enable NFS-sharing of the gridmapdir, you must define variable `GRIDMAPDIR_SHARED_SERVER` to the host name serving the gridmapdir. It doesn't need to be one of the machine using it (for example it can be a dedicated NFS server). If the server is managed with Quattor, Quattor will ensure that the NFS is properly configured to export the reference gridmapdir (as specified by `SITE_DEF_GRIDMAPDIR` on this machine) as `GRIDMAPDIR_SHARED_PATH`. On the "clients" (the other machines using the shared gridmapdir), NFS will be configured to mount the shared gridmapdir and `SITE_DEF_GRIDMAPDIR` will be redefined as a link to this mount point. |
| 344 | |
| 345 | 2 other variables allow to customize gridmapdir sharing according to your needs: |
| 346 | * `GRIDMAPDIR_SHARED_PROTOCOL`: if anything different from `nfs`, QWG templates will not configure NFS for sharing the gridmapdir. The sharing must be done by other means in such a way that `GRIDMAPDIR_SHARED_PATH` is available when gridmapdir is configured on the client machine. Default: `nfs`. |
| 347 | * `GRIDMAPDIR_SHARED_CLIENTS`: a list of machines sharing the gridmapdir. Default: `CE_HOSTS` variable (all the CEs sharing the same WNs). |
| 348 | |
| 494 | |
| 495 | === Sharing WNs between several CEs === |
| 496 | |
| 497 | QWG templates allow to configure several CEs sharing the same WNs. They must share the same gLite parameters and the variable `CE_HOSTS` must contain all the CE host names. They can be LCG CE and/or CREAM CE. If you want to mix LCG and CREAM CE, it is recommended to maintain a separate list of for each CE type and build `CE_HOSTS` by merging them as in the following example: |
| 498 | {{{ |
| 499 | variable CE_HOSTS_CREAM ?= list('cream1.example.org','cream2.example.org'); |
| 500 | variable CE_HOSTS_LCG ?= list('lcg1.example.org','lcg2.example.org'); |
| 501 | variable CE_HOSTS ?= merge(CE_HOSTS_LCG,CE_HOSTS_CREAM); |
| 502 | }}} |
| 503 | |
| 504 | In addition, when using several CEs with the same WNs, it is necessary to configure a [#SharedGridmapdir]. This is '''required''' to ensure consistency of DN/userid mapping across CEs. |