Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.0.0a0 #103

Merged
merged 55 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
dbf039c
Initial Dockerfile, with bundled OpenJDK, docker, apptainer and podman.
jmfernandez Jun 19, 2024
5bf28ad
Added encfs to Dockerfile recipe
jmfernandez Jun 20, 2024
5cda6d5
Now the Dockerfile also installs gocryptfs and other stuff needed for…
jmfernandez Jun 20, 2024
3f5b2e6
Renamed `bootstrap` to `bootstrap_config` within wfexs_backend.wfexs_…
jmfernandez Jun 21, 2024
13090f8
Added command `populate-side-caches`
jmfernandez Jun 25, 2024
ce7a6d0
WfExS commands documentation has been moved to inab/WfExS-backend@f1f…
jmfernandez Jun 25, 2024
bf7a43f
Some fixes related to installers relocation. Documentation was also u…
jmfernandez Jun 25, 2024
6e58b4f
Trying to fix some race conditions
jmfernandez Jun 25, 2024
db48c2d
Another attempt to fix corner case installation scenarios
jmfernandez Jun 25, 2024
3aa2bda
Another try fixing the installation issue
jmfernandez Jun 25, 2024
b6cad3b
Finally, fixed corner case in the installer
jmfernandez Jun 25, 2024
0969cd9
WfExS Dockerfile recipe is ready, and customizable
jmfernandez Jun 25, 2024
2ee79a7
Adde additional instructions about building the WfExS docker, podman …
jmfernandez Jun 26, 2024
574fe34
Documented several installation procedures
jmfernandez Jun 26, 2024
3766ec5
Fixed examples of installation procedures
jmfernandez Jun 26, 2024
78d2646
Fixed symlink to full installer.
jmfernandez Jun 27, 2024
e306e4a
Workflow profiles are now represented in the Workflow Run RO-Crate.
jmfernandez Jun 27, 2024
68a65b0
Workflow profiles are now properly rescued from imported Workflow Run…
jmfernandez Jun 27, 2024
00bd42f
Switching to WRROC profiles 0.5
jmfernandez Jun 27, 2024
40f3b5e
Fixed hidden issue with command-line provided licences
jmfernandez Jun 27, 2024
f720259
Fixed backward compatible profile mangling
jmfernandez Jun 27, 2024
f415508
Added new method, needed to translate from MaterializedContent to gen…
jmfernandez Jun 27, 2024
94b6085
Added code to heal what it is represented in an WRROC when an old Nex…
jmfernandez Jun 27, 2024
40fbb83
Fixing corner case within corner case
jmfernandez Jun 27, 2024
2823b17
Added forgotten variable assignment
jmfernandez Jun 27, 2024
a130f8d
Added all the needed changes to allow having directories in the relPa…
jmfernandez Jun 27, 2024
ca16953
Local names of directories should end with a slash (recommended)
jmfernandez Jun 27, 2024
5aee017
Reimplemented write methods for File and Dataset, so path in zip file…
jmfernandez Jun 28, 2024
50b01d8
`destpath` is now always provided for local contents, even if they ar…
jmfernandez Jun 28, 2024
991ad91
Avoid creating empty directories in the exported zip file
jmfernandez Jun 28, 2024
37bfc53
Fixed an assertion which arises in a corner case of Datasets (its fil…
jmfernandez Jun 28, 2024
4b9c360
Also propagate alternate_name when a Dataset is included
jmfernandez Jun 28, 2024
51447c9
Additional minor details in RO-Crate generation improved
jmfernandez Jun 28, 2024
bb0a7fc
Fixed issue for foreign development versions of cwltool
jmfernandez Jun 28, 2024
e274210
Minor changes to avoid using inherited __new__ method from pathlib.Path
jmfernandez Jun 28, 2024
9a0bebd
Removed internal debug trace which was added in a previous commit
jmfernandez Jun 28, 2024
aafcfce
Reworked logic to accept an injected container
jmfernandez Jun 28, 2024
b7b59d4
Cosmetic adjustment, so nonsensical warning does not appear
jmfernandez Jun 28, 2024
a25ab4d
Finally, injected singularity containers are now properly transferred
jmfernandez Jun 28, 2024
e5822bc
Sevearl additional adjustments to allow having an agnostic canonical …
jmfernandez Jun 28, 2024
28b47f7
Nextflow workflows following nf-core also depend on nextflow_schema.j…
jmfernandez Jun 28, 2024
e0d88b4
Fixed corner case issue in unmarshalling code of dictionaries whose k…
jmfernandez Jun 28, 2024
f0041fd
Fixed misidentification of types when it is translated to RO-Crate ad…
jmfernandez Jun 28, 2024
e28459e
Fixed SPARQL query fragments for collections of PropertyValues
jmfernandez Jun 28, 2024
1184967
Second fix in SPARQL query fragments for collections of PropertyValues
jmfernandez Jun 28, 2024
5d1bffc
Fixed capturing of collections of property values
jmfernandez Jun 28, 2024
7a480af
Hopefully, nailed down last corner case of collections of atomic values
jmfernandez Jun 28, 2024
c6bc84b
Surrendered to the fact that Nextflow workflows can use custom relati…
jmfernandez Jun 28, 2024
fd24554
Added code to preserve both modification time and permissions when co…
jmfernandez Jun 28, 2024
6006522
Added quoting and unquoting of paths when they are used as relative i…
jmfernandez Jun 28, 2024
d138517
Added degraded mode for container resolutions.
jmfernandez Jun 29, 2024
283c7ef
Fixed canonicalization of cases like docker.io/node into docker.io/li…
jmfernandez Jun 29, 2024
bfe8b2a
Fixed canonicalization of cases like docker.io/node into docker.io/li…
jmfernandez Jun 29, 2024
a57b4f1
Version bump to 1.0.0a
jmfernandez Jun 29, 2024
ccec09a
Fixed issue which appeared with Python 3.7 and mypy (the code cannot …
jmfernandez Jun 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,16 @@ repos:
args: [ wfexs_backend/schemas ]

- repo: https://github.com/jmfernandez/pre-commit_mirrors-actionlint.git
rev: v1.6.25
rev: v1.7.1
hooks:
- id: actionlint

- repo: https://github.com/jmfernandez/pre-commit_mirrors-hadolint.git
rev: v2.12.0
hooks:
- id: hadolint
args: [ -t, warning]

- repo: https://github.com/ambv/black.git
rev: 23.3.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ message: "If you use this software, please cite it using these metadata."
repository-code: "https://github.com/inab/WfExS-backend"
type: software
title: "WfExS-backend"
version: 0.99.9
version: 1.0.0a0
156 changes: 141 additions & 15 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,139 @@
# "Easy" install and setup a Workflow Execution Service backend instance

## "Easy" setup of core and main software dependencies
## Easy creation of WfExS container image

There is an automated installer at [full-installer.bash](full-installer.bash):
This section describes how to build a container image containing WfExS and its preconditions.

### Docker

The precondition is having Docker properly setup and running.

You can build the Docker image for an specific version (release, tag, branch or commit)
without fetching a full copy of the repo or the Dockerfile recipe,
just using next bash pattern:

```bash
# WFEXS_VER can be either a branch, a tag or a commit hash
WFEXS_VER=574fe343c0b59eecd95afbc67894456359ebe649
docker build -t inab/wfexs-backend:${WFEXS_VER} \
--build-arg wfexs_checkout="${WFEXS_VER}" \
https://raw.githubusercontent.com/inab/WfExS-backend/${WFEXS_VER}/container_recipes/Dockerfile
```

Alternatively, if the docker client does not accept URLs, you need to have
a local copy of the recipe, and next command line from the project root will help you:

```bash
# WFEXS_VER can be either a branch, a tag or a commit hash
WFEXS_VER=574fe343c0b59eecd95afbc67894456359ebe649
mkdir WfExS_docker_build
cd WfExS_docker_build
curl -O https://raw.githubusercontent.com/inab/WfExS-backend/${WFEXS_VER}/container_recipes/Dockerfile

docker build -t inab/wfexs-backend:${WFEXS_VER} \
--build-arg wfexs_checkout="${WFEXS_VER}" \
Dockerfile
```

### Podman

The precondition is having Podman properly setup and running.

Mimicking what it can be performed with Docker, you can build the Podman
image for an specific version (release, tag, branch or commit)
without fetching a full copy of the repo or the recipe,
just using next bash pattern:

```bash
# WFEXS_VER can be either a branch, a tag or a commit hash
WFEXS_VER=574fe343c0b59eecd95afbc67894456359ebe649
podman build -t inab/wfexs-backend:${WFEXS_VER} \
--build-arg wfexs_checkout="${WFEXS_VER}" \
https://raw.githubusercontent.com/inab/WfExS-backend/${WFEXS_VER}/container_recipes/Dockerfile
```

Alternatively, if the podman client does not accept URLs, you need to have
a local copy of the recipe, and next command line from the project root will help you:

```bash
# WFEXS_VER can be either a branch, a tag or a commit hash
WFEXS_VER=574fe343c0b59eecd95afbc67894456359ebe649
mkdir WfExS_podman_build
cd WfExS_podman_build
curl -O https://raw.githubusercontent.com/inab/WfExS-backend/${WFEXS_VER}/container_recipes/Dockerfile

podman build -t inab/wfexs-backend:${WFEXS_VER} \
--build-arg wfexs_checkout="${WFEXS_VER}" \
Dockerfile
```

### SIF image

The precondition is having either Apptainer or Singularity properly setup. There are three different routes to create a SIF image of WfExS:

* First approach requires either using curl or having a local copy of the repository
**and** a modern enough version of either apptainer (1.3 or later)
or singularity (4.0 or later).

```bash
# WFEXS_VER can be either a branch, a tag or a commit hash
WFEXS_VER=574fe343c0b59eecd95afbc67894456359ebe649
mkdir WfExS_SIF_build
cd WfExS_SIF_build
curl -O https://raw.githubusercontent.com/inab/WfExS-backend/${WFEXS_VER}/container_recipes/Singularity.def
singularity build \
--build-arg wfexs_checkout="${WFEXS_VER}" \
wfexs-backend-${WFEXS_VER}.sif Singularity.def
```

```bash
# WFEXS_VER can be either a branch, a tag or a commit hash
WFEXS_VER=574fe343c0b59eecd95afbc67894456359ebe649
singularity build \
--build-arg wfexs_checkout="${WFEXS_VER}" \
wfexs-backend-${WFEXS_VER}.sif container_recipes/Singularity.def
```

* Second approach involves to first create the WfExS docker image locally,
following the pattern previously described, and then telling apptainer / singularity
to build it:

```bash
# Remember to use the correct tag!!!
WFEXS_VER=574fe343c0b59eecd95afbc67894456359ebe649
singularity build wfexs-${WFEXS_VER}.sif docker-daemon://inab/wfexs-backend:${WFEXS_VER}
```

* Third approach involves to first create either the local docker or podman image,
as it was described above. Then, you have to save it to an image file,
which will be used to build the SIF image.

for the WfExS podman image locally,
following the pattern previously described, and then telling apptainer / singularity
to build it:

```bash
mkdir WfExS_SIF_build
cd WfExS_SIF_build

# Remember to use the correct tag!!!
WFEXS_VER=574fe343c0b59eecd95afbc67894456359ebe649

# Next command should be used if you used podman to build the local image
podman save -o wfexs-backend-${WFEXS_VER}.tar inab/wfexs-backend:${WFEXS_VER}

# Next command should be used if you used docker to build the local image
docker save -o wfexs-backend-${WFEXS_VER}.tar inab/wfexs-backend:${WFEXS_VER}

singularity build wfexs-${WFEXS_VER}.sif docker-archive:wfexs-backend-${WFEXS_VER}.tar
```

## "Easy" local setup of core and main software dependencies

There is an automated installer at [full-installer.bash](container_recipes/full-installer.bash), which is also used inside the docker:

```bash
./full-installer.bash
container_recipes/full-installer.bash
```

which assumes both essential build dependencies
Expand All @@ -17,21 +145,21 @@ The automated installer installs both core dependencies and it fetches and insta
* A static bash copy: needed by Nextflow runner to monkey-patch some containers which do not have bash, or whose bash copy is buggy.

If you also want to install [singularity](https://sylabs.io/singularity/) or
[apptainer](https://apptainer.org) at the WfExS-backend virtual environment, and you are using Ubuntu Linux, a rootless setup is achieved using either [singularity-local-installer.bash](singularity-local-installer.bash)
or [apptainer-local-installer.bash](apptainer-local-installer.bash).
[apptainer](https://apptainer.org) at the WfExS-backend virtual environment, and you are using Ubuntu Linux, a rootless setup is achieved using either [singularity-local-installer.bash](container_recipes/singularity-local-installer.bash)
or [apptainer-local-installer.bash](container_recipes/apptainer-local-installer.bash).
At most only one of them can be locally installed, because as of
September 2022 workflow engines like `cwltool` or `nextflow` still use the
hardcoded name of `singularity`. So, the apptainer installer has to create
a "singularity" symlink pointing to "apptainer".

```bash
# For singularity
./singularity-local-installer.bash
container_recipes/singularity-local-installer.bash
```

```bash
# For apptainer
./apptainer-local-installer.bash
container_recipes/apptainer-local-installer.bash
```

This setup will only work on Linux systems with cgroups v2 enabled. You will also need to install the package which provides `mksquashfs`, which is `squashfs-tools` both in Debian and Ubuntu.
Expand All @@ -40,12 +168,12 @@ The scripts only install singularity or apptainer when it is not available. If y

```bash
# For singularity
./singularity-local-installer.bash force
container_recipes/singularity-local-installer.bash force
```

```bash
# For apptainer
./apptainer-local-installer.bash force
container_recipes/apptainer-local-installer.bash force
```

## Core Dependencies
Expand All @@ -59,7 +187,7 @@ This workflow execution service backend is written for Python 3.7 and later.
* The creation of a virtual environment where to install WfExS backend dependencies can be done running:

```bash
./basic-installer.bash
container_recipes/basic-installer.bash
```

* If you upgrade your Python installation (from version 3.8 to 3.9 or later, for instance), or you move this folder to a different location after following this instructions, you may need to remove and reinstall the virtual environment.
Expand Down Expand Up @@ -101,10 +229,8 @@ All the development dependencies are declared at [dev-requirements.txt](dev-requ
```bash
python3 -m venv .pyWEenv
source .pyWEenv/bin/activate
pip install --upgrade pip wheel
pip install -r requirements.txt
pip install -r dev-requirements.txt
pip install -r mypy-requirements.txt
pip install --require-virtualenv --upgrade pip wheel
pip install --require-virtualenv -r requirements.txt -r dev-requirements.txt -r mypy-requirements.txt
```

One of these dependencies is [pre-commit](https://pre-commit.com/), whose rules are declared at [.pre-commit-config.yaml](.pre-commit-config.yaml) (there are special versions of these rules for GitHub).
Expand Down Expand Up @@ -147,6 +273,6 @@ flake8 --ignore E501 wfexs_backend
```

# License
* © 2020-2022 Barcelona Supercomputing Center (BSC), ES
* © 2020-2024 Barcelona Supercomputing Center (BSC), ES

Licensed under the Apache License, version 2.0 <https://www.apache.org/licenses/LICENSE-2.0>, see the file `LICENSE.txt` for details.
Loading
Loading