Skip to content

Tutorial: End to End Across Nodes

Synopsis

This tutorial is for researchers who want to see the whole of ELIXIR On-Cloud at work, on the live services, from their own terminal. You log in with LS Login, run jobs at two ELIXIR Nodes, Finland (FI, at CSC) and the Czech Republic (CZ, at CERIT-SC), and check where they ran and what they returned:

  • Part 1: tasks. Small GA4GH TES tasks, sent to the TES gateway of the deployment, proTES: one pinned to each of the four TES services behind it (TESK and Poiesis, at each Node), and one that proTES places itself.
  • Part 2: workflows. A Nextflow and a WDL workflow, sent to the GA4GH WES service Conquest, at the CZ Node. Conquest sends the tasks of each workflow through proTES to the Nodes.
  • Part 3: federated learning. A federated learning run, started from the web portal Krini, which trains a model at sites at both Nodes.

You use both curl and ga4gh-cli, the command line tool of the GA4GH SDK, so that you see the plain API requests as well as the tool. Each job is a "hello world": it needs no data of yours and takes a minute or two. The whole tutorial takes about 30 minutes. The commands are for Bash or Zsh on Linux or macOS.

you (curl, ga4gh-cli)
  |-- part 2 --> Conquest (WES, CZ) --.
  |                                   v
  '-- part 1 -----------------> proTES (TES gateway) --> TESK FI     Poiesis FI
                                                     --> TESK CZ     Poiesis CZ
Krini (browser) -- part 3 --> NVFlare hub (WES) --> proTES --> sites at FI and CZ

Synthetic or public data only

The deployment is a sandbox for demos and tests, with no guaranteed uptime. The jobs of this tutorial use public images and workflows only; don't use the services with personal or other sensitive data.

1. Before you start

You need:

Create an empty folder for the files of this tutorial, and work in it until the end:

mkdir eoc-end-to-end
cd eoc-end-to-end

mkdir stops with File exists if the folder is already there: then choose another name.

2. Check the services

The two entry points of the chain are proTES, for tasks, and Conquest, for workflows. Put their API roots into variables, and ask both for their service info, which anyone can read without a token:

TES=https://gateway-tes.elixir-on.cloud/ga4gh/tes/v1
WES=https://conquest.dyn.cloud.e-infra.cz/ga4gh/wes/v1
curl -sS "$TES/service-info" > protes-service-info.json
jq -r '.name, .version, (.backends[].url)' protes-service-info.json
curl -sS "$WES/service-info" | jq '.name, .workflow_type_versions'

Check: proTES names itself and lists the four TES services that it forwards tasks to, under backends:

ELIXIR On-Cloud TES Gateway
0.8.0
https://tesk.rahtiapp.fi
https://tesk.dyn.cloud.e-infra.cz
https://poiesis.rahtiapp.fi
https://poiesis.dyn.cloud.e-infra.cz

These are the TESK and the Poiesis of the FI Node, at CSC (*.rahtiapp.fi), and of the CZ Node, at CERIT-SC (*.dyn.cloud.e-infra.cz). Conquest answers with its name, Conquest, and the workflow languages that it runs: Nextflow (NFL), Snakemake (SMK) and WDL, each with its versions. The version of proTES and the list change over time; the steps below read the list from the file.

Both services refuse requests without a token:

curl -sS -o /dev/null -w '%{http_code}\n' "$TES/tasks"
curl -sS -o /dev/null -w '%{http_code}\n' "$WES/runs"

Check: both print 401.

3. Get your token

proTES and Conquest accept LS Login access tokens that LS Login issued to Krini, the web portal of the deployment:

  1. Open https://portal.elixir-on.cloud and log in with LS Login.
  2. Select Copy access token in the menu at the bottom of the sidebar (see Copy your access token).
  3. Put the token into a variable in your terminal. It isn't shown and isn't saved in the history of the shell:

    read -rs LS_LOGIN_TOKEN   # paste the token, then press Enter
    export LS_LOGIN_TOKEN
    

The curl commands below send the token in a header that they read from a small function, so that it doesn't show in the list of processes of your computer:

auth() { printf 'Authorization: Bearer %s\n' "$LS_LOGIN_TOKEN"; }
curl -sS -o /dev/null -w '%{http_code}\n' -H @<(auth) "$TES/tasks"
curl -sS -o /dev/null -w '%{http_code}\n' -H @<(auth) "$WES/runs"

Check: both print 200. 401 means that the token expired or wasn't copied whole: copy a new one. 403 means that your account isn't a member of ECP_CLN:EOC-Compute yet, or that you were approved after you logged in to Krini: log out of Krini, log in again and copy a new token.

The token is valid for about an hour. When a service answers 401 later on, copy a new token from Krini and repeat step 3.

Keep your token to yourself

Anyone with your token can act as you at the services until it expires. Don't share it, and don't paste it into chats, issues or files.

4. Point the CLI at proTES and Conquest

ga4gh-cli reads the addresses of the services from ~/.ga4gh-cli/config.json (see Configure). Create it with proTES as the TES service and Conquest as the WES service. The command doesn't change a file that already exists; in that case, set the TES and WES sections in a text editor instead, or add them as a profile of their own (see Use several deployments with profiles).

mkdir -p ~/.ga4gh-cli
[ -e ~/.ga4gh-cli/config.json ] || printf '%s\n' '{
  "TES": {
    "base_path": "https://gateway-tes.elixir-on.cloud/ga4gh/tes/v1",
    "oauth_access_token_env": "LS_LOGIN_TOKEN"
  },
  "WES": {
    "base_path": "https://conquest.dyn.cloud.e-infra.cz/ga4gh/wes/v1",
    "oauth_access_token_env": "LS_LOGIN_TOKEN"
  }
}' > ~/.ga4gh-cli/config.json
chmod 600 ~/.ga4gh-cli/config.json

oauth_access_token_env tells the CLI to send the token in the variable LS_LOGIN_TOKEN; the file holds no token.

Check: both lists answer, with your jobs or none:

ga4gh-cli tes list
ga4gh-cli wes list

Part 1: Run tasks at both Nodes

Each task runs one command in a small public container image (Alpine Linux): it says hello and prints the date. proTES forwards it to one of its TES services. By default, proTES chooses; with the tag gateway.backends, you choose (see Pinning tasks to a TES instance in the proTES docs).

5. Pin one task to each TES service

Write one task per TES service that proTES lists, each pinned to its service with gateway.backends of type allow, and send it with curl. The loop writes the pin and the ID of each task into tasks.tsv:

: > tasks.tsv
for tes in $(jq -r '.backends[].url' protes-service-info.json); do
  jq -n --arg tes "$tes" '{
    name: "hello-pinned",
    resources: {cpu_cores: 1},
    tags: {"gateway.backends": ({type: "allow", backends: [$tes]} | tojson)},
    executors: [{
      image: "alpine:3.22",
      command: ["sh", "-c", "echo Hello from ELIXIR On-Cloud; date -u"]
    }]
  }' > task.json
  id=$(curl -sS -H @<(auth) -H 'Content-Type: application/json' \
    --data-binary @task.json "$TES/tasks" | jq -r '.id // empty')
  echo "$tes ${id:-no task ID}"
  printf '%s\t%s\n' "$tes" "$id" >> tasks.tsv
done

Check: one line per TES service, each with the ID of a new task. If a line says no task ID, send that request again without | jq ... to see the answer of proTES: 401 and 403 as in step 3; 503 if that TES service doesn't answer at the moment.

6. Let proTES choose

Send one more task without a pin, this time with the CLI (see Create a task):

jq '.name = "hello-unpinned" | del(.tags)' task.json > task-unpinned.json
id=$(ga4gh-cli tes create task-unpinned.json)
echo "${id:?no task ID}"
printf '%s\t%s\n' "any" "$id" >> tasks.tsv

Check: the CLI prints the ID of the new task. If it ends with an error, see Check for errors.

7. Check where the tasks ran

Ask proTES for each task, with the view BASIC, which includes the tags. proTES records the TES service that ran a task in the tag gateway.backend:

while IFS=$'\t' read -r pin id; do
  curl -sS -H @<(auth) "$TES/tasks/$id?view=BASIC" |
    jq -r --arg pin "$pin" '[.state, "pinned to: " + $pin, "ran at: " + (.tags["gateway.backend"] // "-")] | @tsv'
done < tasks.tsv

Tasks first wait in QUEUED and INITIALIZING until the TES service has resources; repeat the command until all are COMPLETE, usually within a minute or two.

Result: every task is COMPLETE, and every pinned task ran where you pinned it, at both Nodes; the unpinned one ran at one of the four:

COMPLETE  pinned to: https://tesk.rahtiapp.fi              ran at: https://tesk.rahtiapp.fi
COMPLETE  pinned to: https://tesk.dyn.cloud.e-infra.cz     ran at: https://tesk.dyn.cloud.e-infra.cz
COMPLETE  pinned to: https://poiesis.rahtiapp.fi           ran at: https://poiesis.rahtiapp.fi
COMPLETE  pinned to: https://poiesis.dyn.cloud.e-infra.cz  ran at: https://poiesis.dyn.cloud.e-infra.cz
COMPLETE  pinned to: any                                   ran at: https://poiesis.dyn.cloud.e-infra.cz

The columns are separated by tabs, so they may not line up as here.

To read what a task printed, get it with its logs (see Get a task), with the ID of one of your tasks in ID:

ga4gh-cli tes get "$ID" FULL | jq -r '.logs[-1].logs[0].stdout'

The output is the greeting and the date. Some TES services return no standard output in the logs; then the result is null. If a task ends in EXECUTOR_ERROR or SYSTEM_ERROR, jq '.logs' instead shows what the service reported.

Part 2: Run workflows

Conquest runs workflows from public GitHub repositories, at a full commit (revision in the engine parameters). It sends the tasks of each workflow through proTES to the Nodes. These tasks belong to Conquest, not to you, so they don't show in your task list; you follow the workflow run instead. The two workflows here are the Nextflow and the WDL examples of Krini (see Run a workflow).

8. Start a Nextflow workflow with the CLI

nextflow-io/hello runs one process that says hello in four languages, as four tasks (see Start a run):

NFL_RUN=$(ga4gh-cli wes run https://github.com/nextflow-io/hello \
  --type NFL --type_version DSL2 \
  --engine nextflow --engine_version 24.10.4 \
  --engine_parameter revision=3c2cdc9823c2b4636e5e3e73e223878099ff5dc9)
echo "${NFL_RUN:?no run ID}"

Check: the CLI prints the ID of the new run. Conquest may take a moment to answer.

9. Start a WDL workflow with curl

openwdl/learn-wdl has a workflow with one task, which greets the name that it gets as its input. A WES run request is a form (multipart/form-data); --form-string sends each value as it is:

WDL_RUN=$(curl -sS -H @<(auth) \
  --form-string workflow_url=https://github.com/openwdl/learn-wdl \
  --form-string workflow_type=WDL \
  --form-string workflow_type_version=1.0 \
  --form-string workflow_engine=wdl \
  --form-string workflow_engine_version=1.12.1 \
  --form-string 'workflow_params={"HelloInput.name": "ELIXIR On-Cloud"}' \
  --form-string 'workflow_engine_parameters={"revision": "b219e5b5b8d79d2cf940f6f3a614d1eb9501866c", "main_workflow_path": "1_script_examples/1_hello_worlds/4_hello_input_workflow/input-workflow.wdl"}' \
  "$WES/runs" | jq -r '.run_id // empty')
echo "${WDL_RUN:?no run ID}"

Check: curl prints the ID of the new run. If not, send the request again without | jq ... to see the answer of Conquest.

10. Follow the runs and check the results

Ask for the state of both runs, once with the CLI and once with curl, until both are COMPLETE (see Follow a run). The Nextflow run takes about two minutes, the WDL run about one:

ga4gh-cli wes status "$NFL_RUN"
curl -sS -H @<(auth) "$WES/runs/$WDL_RUN/status" | jq -r .state

Then get each run with its log and outputs:

ga4gh-cli wes get "$NFL_RUN" | jq '{state, run_log, outputs}'
curl -sS -H @<(auth) "$WES/runs/$WDL_RUN" | jq '{state, run_log, outputs}'

Result: state is COMPLETE for both; run_log holds the log of the workflow engine, with the start and end times of the run, and outputs lists what the workflow wrote, if anything. If a run ends in EXECUTOR_ERROR or SYSTEM_ERROR, run_log and the logs of its tasks (task_logs, or task_logs_url) say why. Conquest keeps the files of a run for a limited time only, and deletes them afterwards.

Part 3: Federated learning from Krini

In federated learning, each site trains a model on its own data, and only the model updates leave the sites. The NVFlare hub of ELIXIR On-Cloud is a WES service that runs such jobs with NVIDIA FLARE: it runs the server of the job itself, and starts one learning client per site as a TES task, through proTES, at the TES services of the FI and CZ Nodes. The data of the sites is synthetic. This part runs a job in your browser; Tutorial: Federated Learning with NVFlare runs it from your terminal and explains what happens under the hood.

11. Start the run

  1. In Krini, at https://portal.elixir-on.cloud, open Workflows and select Create Workflow.
  2. In Select WES Instance, choose the NVFlare hub (nvflare-wes).
  3. Next to Use an example, select Federated learning. Krini fills in the form: the workflow type NVFLARE, version 2.9, the name of a job of the hub as the workflow URL, and the sites of the hub as the parameters.
  4. Select Submit Run. Krini shows the ID of the run.

The hub runs one run at a time, for all users: if someone else's run is active, yours is refused with 409. Try again a few minutes later.

12. Follow the run and read the result

Workflows lists your runs on the hub. Wait until the run is COMPLETE, which takes about two minutes, then select View Details and open Outputs.

Result: flare_job_status is FINISHED:COMPLETED, and global_model names the path of the trained model at the hub. You can't download the model yet (see Limits of the federated learning tutorial).

13. Clean up

All jobs end on their own. Remove the token from your terminal, and the files of this tutorial and their folder:

unset LS_LOGIN_TOKEN
unset -f auth
rm protes-service-info.json task.json task-unpinned.json tasks.tsv
cd ..
rmdir eoc-end-to-end

rmdir removes only an empty folder, so it keeps any other file that you saved there. The configuration file of the CLI holds no token, so you can keep it for next time. Log out of Krini if you share your computer.

Where to go next

How this tutorial was tested

The steps follow the end-to-end check of the deployment on 2 December 2026 (generic-issues#44), which sent the same requests with curl and ga4gh-cli 0.1.0, with LS Login access tokens from Krini: a task pinned to each of the four TES services through proTES, each of which ran at its pin, two unpinned tasks (with curl and the CLI), the Nextflow run with the CLI and the WDL run with curl on Conquest, all COMPLETE; an account that isn't a member of ECP_CLN:EOC-Compute got 403, and requests without a token 401. The federated learning run from Krini completed on the same day (krini#133), with the example of that day. The service info and the 401 answers of step 2 were checked again when this page was written. The commands on this page, as written here, have not yet been run by someone who didn't write them. If you follow this tutorial, please tell us what didn't work: in the Discussions or in an issue in the docs repository.