Go to file
2024-07-25 09:32:52 +02:00
artifacts/nickel Removed image name from the config file, now generated from the artifact URL (close #24). Fixed the "--no-cache" option when using Docker cache. 2024-07-24 18:58:50 +02:00
blacklists Written a doc for the output. Removed the "type" attribute from the Nickel contract, closing #17. 2024-07-19 16:18:49 +02:00
config add prefix to config 2024-07-21 16:14:58 +02:00
workflow Removed image name from the config file, now generated from the artifact URL (close #24). Fixed the "--no-cache" option when using Docker cache. 2024-07-24 18:58:50 +02:00
.gitignore move artifacts_nickel and artifacts_json to artifacts/nickel and artifacts/json 2024-07-19 16:38:18 +02:00
blacklist.csv basic workflow for ecg 2024-07-11 15:17:16 +02:00
check.ncl Fixed Nickel contract and check files. Fixed input/output files in Snakefile. 2024-07-16 17:35:09 +02:00
clean.sh Added support for cache. Added run and clean scripts. 2024-07-12 12:10:03 +02:00
ecg.py Now using the name of the config file (without ext) as image name, meaning the name of the config file should comply with Docker image naming rules (should be the case). 2024-07-25 09:27:30 +02:00
flake.lock first try for g5k execution 2024-07-20 15:41:56 +02:00
flake.nix first try for g5k execution 2024-07-20 15:41:56 +02:00
LICENSE Added license. 2024-07-16 16:04:02 +02:00
nickel.sh Added shi_welder, renamed OAR timeout error. 2024-07-24 10:13:53 +02:00
README.md Added the convention on config file name on the doc. 2024-07-25 09:32:52 +02:00
run.sh Added initial support for Python venvs, close #21. Disabled the Docker build cache by default, and added an option to reenable it, close #23. Removed conditions on the existance of git_packages and misc_packages, because the workflow enforces their existance with the Nickel artifact contract. 2024-07-24 18:05:31 +02:00

Study of the Reproducibility and Longevity of Dockerfiles

ECG is a program that automates software environment checking for scientific artifacts.

It is meant to be executed periodically to analyze variations in the software environment of the artifact through time.

How it works

ECG takes as input a JSON configuration telling where to download the artifact, where to find the Dockerfile to build in the artifact, and which package managers are used by the Docker container.

It will then download the artifact, build the Dockerfile, and then create a list of the installed packages in the Docker container. It also stores the potential errors encountered when building the Dockerfile, and logs the hash of the artifact for future comparison.

Setup

A Linux operating system and the following packages are required:

  • python
  • docker
  • snakemake
  • gawk
  • nickel
  • sed

The following Python package is also required:

  • requests

Otherwise, you can use the Nix package manager and run nix develop in this directory to setup the full software environment.

Usage

Run ecg.py as follow:

python3 ecg.py <config_file> -p <pkglist_path> -l <log_file> -b <build_status_file> -a <artifact_hash_log> -c <cache_directory>

Where:

  • <config_file> is the configuration file of the artifact in JSON format. An example is given in artifacts_json/test.json. WARNING: The name of the file (without the extension) must comply with the Docker image naming convention: only characters allowed are lowercase letters and numbers, separated with either one "." maximum, or two "_" maximum, or an unlimited number of "-", and should be of 128 characters maximum.
  • <pkglist_path> is the path to the file where the package list generated by the program should be written.
  • <log_file> is the path to the file where to log the output of the program.
  • <build_status_file> is the path to the file where to write the build summary of the Docker image given in the configuration file.
  • <artifact_hash_log> is the path to the file where to log the hash of the downloaded artifact.
  • <cache_directory> is the path to the cache directory, where downloaded artifacts will be stored for future usage. If not specified, cache is disabled.

Output

Package list

The list of packages installed in the container, depending on the package managers, Git packages and other miscellaneous packages given in the config file, in the form of a CSV file, with the following columns in order:

Package name Version Package manager

For Git packages, the hash of the last commit is used as version number. For miscellaneous packages, the hash of the file that has been used to install the package is used as version number.

Output log

Just a plain text file containing the output of the script.

Build status file

The log of the failed attempts to build the Docker image, in the form of a CSV file, with the following columns in order:

Config file path Timestamp Reason category

The timestamp corresponds to when the error is being logged, not to when it happened.

The following are the categories of reasons explaining why the building failed:

  • package_unavailable: A command requested the installation of a package that is not available.
  • baseimage_unavailable: The base image needed for this container is not available.
  • unknown_error: Any other error.

Artifact hash log

The log of the hash of the artifact archive file, in the form of a CSV file, with the following columns in order:

Timestamp Hash

The timestamp corresponds to when the hash has been logged, not to when the artifact has been downloaded.

License

This project is licensed under the GNU General Public License version 3. You can find the terms of the license in the file LICENSE.