|
1 | 1 | # Configuring EasyBuild {: #configuring_easybuild } |
2 | 2 |
|
3 | | -This page discusses the recommended style of configuring |
4 | | -EasyBuild, which is supported since EasyBuild v1.3.0. |
| 3 | +This page discusses the recommended style of configuring EasyBuild. |
5 | 4 |
|
6 | 5 | See [a demo on configuring EasyBuild][demo_configuring]. |
7 | 6 |
|
@@ -82,8 +81,7 @@ configuration files at `/etc/easybuild.d/*.cfg` and `$HOME/.config/easybuild/con |
82 | 81 | The configuration file located in `$XDG_CONFIG_HOME` will be listed *after* the ones obtained via `$XDG_CONFIG_DIRS`, |
83 | 82 | such that user-defined configuration settings have preference over system defaults. |
84 | 83 |
|
85 | | -A detailed overview of the list of default configuration files is available via `eb --show-default-configfiles` |
86 | | -(available since EasyBuild v2.1.0). For example:: |
| 84 | +A detailed overview of the list of default configuration files is available via `eb --show-default-configfiles`. For example: |
87 | 85 |
|
88 | 86 | ``` console |
89 | 87 | $ XDG_CONFIG_DIRS=/tmp/etc:/tmp/moreetc eb --show-default-configfiles |
@@ -184,7 +182,7 @@ See also [Controlling the robot search path][controlling_robot_search_path]. |
184 | 182 |
|
185 | 183 | #### Generating a template configuration file |
186 | 184 |
|
187 | | -Since EasyBuild v1.10, a command line option `--confighelp` is |
| 185 | +A command line option `--confighelp` is |
188 | 186 | available that prints out the help text as an annotated configuration |
189 | 187 | file. This can be used as an empty template configuration file: |
190 | 188 |
|
@@ -316,28 +314,7 @@ A couple of selected configuration settings are discussed below, |
316 | 314 | in particular the mandatory settings. |
317 | 315 |
|
318 | 316 |
|
319 | | -### Mandatory configuration settings {: #configuration_mandatory_settings } |
320 | | - |
321 | | -A handful of configuration settings are **mandatory**, and should be |
322 | | -provided using one of the supported configuration types. |
323 | | - |
324 | | -The following configuration settings are currently mandatory |
325 | | -(more details in the sections below): |
326 | | - |
327 | | -* [Source path (--sourcepath)][sourcepath] |
328 | | -* [Build path (--buildpath)][buildpath] |
329 | | -* [Software and modules install path (--installpath, --installpath-software, --installpath-modules)][installpath] |
330 | | -* [Easyconfigs repository (--repository, --repositorypath)][easyconfigs_repo] |
331 | | -* [Logfile format (--logfile-format)][logfile_format] |
332 | | - |
333 | | - |
334 | | -If any of these configuration settings is not provided in one way or another, EasyBuild will complain and exit. |
335 | | - |
336 | | -In practice, all of these have reasonable defaults (see `eb --help` for the default settings). |
337 | | - |
338 | | -!!! note |
339 | | - The mandatory path-related options can be tweaked collectively via `--prefix`, see [Overall prefix path (`--prefix`)][prefix] for more |
340 | | - information. |
| 317 | +### Important configuration settings {: #important_configuration_settings } |
341 | 318 |
|
342 | 319 | #### Source path (`--sourcepath`) {: #sourcepath } |
343 | 320 |
|
@@ -379,7 +356,7 @@ when the installation is completed (by default). |
379 | 356 | Using `/dev/shm` as build path can significantly speed up builds, |
380 | 357 | if it is available and provides a sufficient amount of space. Setting up |
381 | 358 | the variable `EASYBUILD_BUILDPATH` in your shell startup files makes this default. |
382 | | - However be aware that, fi., two parallel GCC builds may fill up `/dev/shm` ! |
| 359 | + However be aware that multiple parallel builds may fill up `/dev/shm` ! |
383 | 360 |
|
384 | 361 |
|
385 | 362 | #### Software and modules install path {: #installpath } |
@@ -463,101 +440,6 @@ so you do not need to adjust `$MODULEPATH` every time you start a new session. |
463 | 440 | runtime according to the modules install path it is configured with. |
464 | 441 |
|
465 | 442 |
|
466 | | -#### Easyconfigs repository (`--repository`, `--repositorypath`) {: #easyconfigs_repo } |
467 | | - |
468 | | -*default*: `FileRepository` at `$HOME/.local/easybuild/ebfiles_repo` |
469 | | -(determined via [Overall prefix path (`--prefix`)][prefix]) |
470 | | - |
471 | | -EasyBuild has support for archiving (tested) `.eb` easyconfig files. |
472 | | -After successfully installing a software package using EasyBuild, the |
473 | | -corresponding `.eb` file is uploaded to a repository defined by the |
474 | | -`repository` and `repositorypath` configuration settings. |
475 | | - |
476 | | -Currently, EasyBuild supports the following repository types (see also |
477 | | -`eb --avail-repositories`): |
478 | | - |
479 | | -* `FileRepository('path', 'subdir')`: a plain flat file repository; |
480 | | - `path` is the path where files will be stored, `subdir` is an |
481 | | - *optional* subdirectory of that path where the files should be stored |
482 | | -* `GitRepository('path', 'subdir/in/repo'`: a *non-empty* **bare** |
483 | | - git repository (created with `git init --bare` or `git clone --bare`); |
484 | | - `path` is the path to the git repository (can also be a URL); |
485 | | - `subdir/in/repo` is optional, and specifies a subdirectory of the |
486 | | - repository where files should be stored in |
487 | | -* `SvnRepository('path', 'subdir/in/repo')`: an SVN repository; |
488 | | - `path` contains the subversion repository location (directory or |
489 | | - URL), the optional second value specifies a subdirectory in the repository |
490 | | - |
491 | | -You need to set the `repository` setting inside a configuration file like this: |
492 | | - |
493 | | -``` python |
494 | | -[config] |
495 | | -repository = FileRepository |
496 | | -repositorypath = <path> |
497 | | -``` |
498 | | - |
499 | | -Or, optionally an extra argument representing a subdirectory can be specified, e.g.: |
500 | | - |
501 | | -``` shell |
502 | | -export EASYBUILD_REPOSITORY=GitRepository |
503 | | -export EASYBUILD_REPOSITORYPATH=<path>,<subdir> |
504 | | -``` |
505 | | - |
506 | | -You do not have to worry about importing these classes, |
507 | | -EasyBuild will make them available to the configuration file. |
508 | | - |
509 | | -Using `git` requires the `GitPython` Python modules, using `svn` |
510 | | -requires the `pysvn` Python module (see [Dependencies][dependencies]). |
511 | | - |
512 | | -If access to the easyconfigs repository fails for some reason |
513 | | -(e.g., no network or a missing required Python module), EasyBuild will |
514 | | -issue a warning. The software package will still be installed, but the |
515 | | -(successful) easyconfig will not be automatically added to the archive |
516 | | -(i.e., it is not considered a fatal error). |
517 | | - |
518 | | - |
519 | | -#### Logfile format (`--logfile-format`) {: #logfile_format } |
520 | | - |
521 | | -*default*: |
522 | | -`easybuild, easybuild-%(name)s-%(version)s-%(date)s.%(time)s.log` |
523 | | - |
524 | | -The `logfile format` configuration setting contains a tuple |
525 | | -specifying a log directory name and a template log file name. |
526 | | -In both of these values, using the following string templates |
527 | | -is supported: |
528 | | - |
529 | | -* `%(name)s`: the name of the software package to install |
530 | | -* `%(version)s`: the version of the software package to install |
531 | | -* `%(date)s`: the date on which the installation was performed (in `YYYYMMDD` format, e.g. `20120324`) |
532 | | -* `%(time)s`: the time at which the installation was started (in `HHMMSS` format, e.g. `214359`) |
533 | | - |
534 | | -!!! note |
535 | | - Because templating is supported in configuration files themselves (see |
536 | | - [Templates and constants supported in configuration files][configuration_file_templates_constants]), the |
537 | | - '`%`' character in these template values must be escaped when used in a configuration file (and only then), |
538 | | - e.g., '`%%(name)s`'. Without escaping, an error like `InterpolationMissingOptionError: Bad value |
539 | | - substitution` will be thrown by `ConfigParser`. |
540 | | - |
541 | | -For example, configuring EasyBuild to generate a log file mentioning only the software name in a directory named |
542 | | -`easybuild` can be done via the `--logfile-format` command line option: |
543 | | - |
544 | | -``` shell |
545 | | -eb --logfile-format="easybuild,easybuild-%(name)s.log" ... |
546 | | -``` |
547 | | - |
548 | | -or the `$EASYBUILD_LOGFILE_FORMAT` environment variable: |
549 | | - |
550 | | -``` shell |
551 | | -export EASYBUILD_LOGFILE_FORMAT="easybuild,easybuild-%(name)s.log" |
552 | | -``` |
553 | | - |
554 | | -or by including the following in an EasyBuild configuration file (note the use of '`%%`' to escape the `name` |
555 | | -template value here): |
556 | | - |
557 | | -``` ini |
558 | | -logfile-format = easybuild,easybuild-%%(name)s.log |
559 | | -``` |
560 | | - |
561 | 443 |
|
562 | 444 | ### Optional configuration settings {: #configuration_optional_settings } |
563 | 445 |
|
|
0 commit comments