Getting Started#
Requirements#
To use LEAPP, you must have:
- Access to an HPC system with SLURM: You need a valid user account on an HPC system that uses SLURM for job scheduling.
- ESGF tools: You need access to ESGF preparation and publication tools (esgmapfile, esgpublish) installed in conda environments.
- Configuration file: You must create a
config.yamlfile with your HPC and project-specific settings.
Installation#
Option 1: Download a pre-built release (recommended)#
Pre-built releases (binary + jobs/*.slurm scripts + config.yaml.example) are published to the project’s Generic Package Registry on every tagged release.
mkdir -p leapp && cd leapp
curl --header "PRIVATE-TOKEN: <your_access_token>" -L -o leapp.tar.gz \
"https://gitlab.hpc.cineca.it/api/v4/projects/<project_id>/packages/generic/leapp/latest/leapp-linux-amd64.tar.gz"
tar xzf leapp.tar.gz && rm leapp.tar.gz
chmod +x leapp
./leapp --versionReplace <project_id> with the project’s ID and <your_access_token> with a personal or project access token (read_api/read_package_registry scope) — required since this GitLab instance is not publicly accessible. To pin a specific version instead of always tracking the newest release, replace latest in the URL with a tag name (e.g. v0.1.0).
Keep the binary and jobs/ together The extracted directory contains everything needed to run the tool. Keep
leappandjobs/in the same directory — the binary expectsjobs/*.slurmto be reachable as a relative path from your current working directory.
Option 2: Compile from source#
git clone https://gitlab.hpc.cineca.it/esgf/leapp.git
cd leappStandard build#
go build -o leapp ./cmd/leappStatic build for HPC compatibility (recommended)#
CGO_ENABLED=0 go build -o leapp ./cmd/leappHPC Tip
Use the static build (CGO_ENABLED=0) to avoid GLIBC version compatibility issues on HPC systems.
Initial Setup#
1. Create Configuration File#
Copy the example configuration and customize it:
cp config.yaml.example config.yamlEdit config.yaml with your HPC and project-specific settings. See the Configuration section for details.
2. Set Up Password File#
The publish command requires a password for ESGF PID credentials:
Create the password file in your work directory#
echo 'your_password_here' > /path/to/work_dir/.leapp_secretSetup correct permissions#
chmod 600 /path/to/work_dir/.leapp_secretBasic Workflow#
Simplified (Two Commands)#
Prepare data (generate mapfiles, stage to S3)#
./leapp prepare --data-path /path/to/data --project cmip6plus --run-id myrun1This launches
mapgen(a SLURM job) andstage(direct SSH/local rclone transfer, not a SLURM job).Publish to ESGF (after prepare jobs complete)#
./leapp publish --data-path /path/to/data --project cmip6plus --run-id myrun1
Manual (Step by Step)#
Generate mapfiles (check CV included)#
./leapp mapgen --data-path /path/to/data --project cmip6plus --run-id myrun1Stage data to S3#
./leapp stage --data-path /path/to/data --project cmip6plus --run-id myrun1Add
--dry-runto preview the transfer without copying anything.Publish (after jobs complete)#
./leapp publish --data-path /path/to/data --project cmip6plus --run-id myrun1
Important Always verify that the
mapgenSLURM job has finished successfully and thatstagehas completed its transfer before runningpublish.
Unpublishing (Optional)#
If you need to remove published datasets from the ESGF index (e.g., for corrections or test cleanup):
./leapp unpublish --data-path /path/to/data --project cmip6plus --run-id myrun1The
unpublishcommand runs immediately (not as a SLURM job) and will use the most recent run if--run-idis not specified.