Skip to content

Commit 492683e

Browse files
committed
Section about hooks extended with references to additional examples.
1 parent 87138ea commit 492683e

1 file changed

Lines changed: 26 additions & 3 deletions

File tree

docs/2022-CSC_and_LO/3_02_hooks.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,32 @@ would normally execute.
1919
This is a very powerful feature, but it is important to aware of some details in order
2020
to make good use of it.
2121

22-
Support for hooks is also covered in detail in the EasyBuild documentation, see
23-
[here](https://docs.easybuild.io/en/latest/Hooks.html).
24-
22+
Support for hooks is also
23+
[covered in detail in the EasyBuild documentation](https://docs.easybuild.io/en/latest/Hooks.html).
24+
25+
## Why hooks?
26+
27+
Hooks can be implemented for various reasons. Some examples used by some sites in the EasyBuild
28+
community:
29+
30+
- Enforce some site policies on easyconfig files. A practical example for LUMI could be imposing
31+
the use of the `whatis` parameter and ensuring that it contains a `Description` line to have a
32+
more consistent format for module files.
33+
- Ensuring that some information is always in the module file. E.g., on LUMI the `site_contacts`
34+
parameter is added automatically when installing in the central stack if it is not already in
35+
the easyconfig file to refer to the LUST support pages.
36+
- Modify the behaviour of standard easyconfig files that come with EasyBuild to adapt them to the system
37+
while allowing users to simply use the standard easyconfig files. E.g., we could consider this option
38+
to offer the common EasyBuild FOSS toolchain and its subtoolchains to users on LUMI-C, while using hooks to
39+
adapt, e.g., the easyconfig files for Open MPI to work on LUMI.
40+
41+
Some site have really large hook files to implement policies and modify standard EasyBuild build recipes, e.g.,
42+
- [The hooks file from Jülich Supercomputing Centre](https://github.com/easybuilders/JSC/blob/2022/Custom_Hooks/eb_hooks.py)
43+
- ComputeCanada [cc_hooks_common.py](https://github.com/ComputeCanada/easybuild-computecanada-config/blob/main/cc_hooks_common.py)
44+
and [cc_hooks_gento.py](https://github.com/ComputeCanada/easybuild-computecanada-config/blob/main/cc_hooks_gentoo.py)
45+
- [The hooks file from the EESSI software stack](https://github.com/EESSI/software-layer/blob/main/eb_hooks.py).
46+
[EESSI](https://www.eessi-hpc.org/) is an effort to build a software stack distributed via
47+
[CernVM-FS](https://cernvm.cern.ch/fs/) using EasyBuild to build all software.
2548

2649
## Implementing and using hooks
2750

0 commit comments

Comments
 (0)