Hi Cormac, On 27 Nov 2013, at 00:10, Petar Forai <[email protected]> wrote:
> > On Nov 26, 2013, at 6:35 PM, "Garvey, Cormac T" <[email protected]> wrote: > >> >> Hello, >> I am upgrading my Easybuild environment from 1.5.0 to 1.9.0. >> >> There are two things I would like to achieve with this upgrade. >> (1) Use the new configuration files based on configparser >> (2) Use Lmod instead of C based modulefiles. >> >> Is there a sample config.cfg with easybuild 1.9.0 (I could only find the >> depreciated config.py)? >> Can someone send me one. > > Hi Cormac, > > Maybe not really the answer you were looking for, but I just wanted to > explain how we do this. > > We use environment variables for our easybuild user to pickup the file system > locations > and for the modules tool that should be used. > > This gives a bit more flexibility wrt to where stuff lands (you might want to > rebuild whole module trees at some point > or have testing and production trees, or flat vs hierarchical trees at some > point). > > All the flags that `eb` takes can be used as environment variables. They > follow a consistent scheme and generally work like this: > > To quote the output of running eb --help: > > All long option names can be passed as environment variables. Variable name is > EASYBUILD_<LONGNAME> eg. --some-opt is same as setting EASYBUILD_SOME_OPT in > the environment. > > We try to avoid using a non-vanilla config.cfg file and do everything with > shell variables. This ^, but AFAIK you can also add all this in a single config file (or multiple ones, though I have never used multiple) and have it picked up by using the —configfiles=<path_to_your_config_file> since GeneralOption allows this as well. For the record, I have only used this in other scripts, not for EB. So if you’d find this easier than have it set in the env, that should work too. However, you then obviously must no forget to provide the configfile as a cli argument. Regards, — Andy

