- Docker + access to
quay.io/earthcoderegistry kubectlconfigured against the target cluster- Airflow 3+ with S3 DAG sync enabled (
s3://airflow-dags-bc/earthcode/) pixiinstalled (https://pixi.sh) for generating the build context
The docker/ directory is the build context, generated by appligator. It contains a
two-stage Dockerfile (pixi build stage → lean Debian runtime), a pixi.toml, a
pyproject.toml, and a locked pixi.lock.
Why pixi.toml and pyproject.toml are needed alongside pixi.lock:
pixi.toml— pixi unconditionally requires a manifest to run;pixi install --lockedwon't start without one. Thedocker/pixi.tomlis a minimal stub that satisfies this.pyproject.toml— needed by thepip install --no-deps -e .step that installssmos_ardfromsrc/. It cannot be declared inpixi.tomlas apath = "."dependency with--lockedbecause pixi hashes local source at lock time; in Docker the path content differs and pixi refuses to install. Installing with pip afterpixi install --lockedsidesteps this.
procodile and gavicore are installed directly from the eo-tools/eozilla git repo
because the latest changes needed are not yet in a published PyPI release.
Since src/ lives at the project root it must be copied into the build context before
building (docker/src/ is gitignored):
# Copy smos_ard source into the build context
cp -r src docker/src
# Build and push (bump the tag on each release)
docker build -t quay.io/earthcode/smos-ard-pipeline:0.1.6 docker/
docker push quay.io/earthcode/smos-ard-pipeline:0.1.6After pushing, update the image field in dags/smos-ard-service-v2.py to the new tag
and redeploy the DAG (step 4).
The Airflow service account (airflow-sa in the airflow namespace) needs permission to
create and manage pods in the earthcode namespace. Apply once:
kubectl apply -f k8s/rbac.yamlEvery pipeline pod receives credentials from the earthcode-secrets secret:
| Variable | Required | Used by | Description |
|---|---|---|---|
AWS_S3_ACCESS_KEY_ID |
yes | fetch, aggregate, publish | AWS credentials for reading/writing S3 |
AWS_S3_SECRET_ACCESS_KEY |
yes | fetch, aggregate, publish | AWS credentials for reading/writing S3 |
AWS_DEFAULT_REGION |
no | fetch, aggregate, publish | AWS region; defaults to eu-central-1 |
CREODIAS_S3_KEY |
yes | fetch | CREODIAS S3 key for the xcube-smos data store |
CREODIAS_S3_SECRET |
yes | fetch | CREODIAS S3 secret for the xcube-smos data store |
GITHUB_USERNAMEandGITHUB_TOKENare not needed by the pipeline pods. They are only required when runningpublish_trigger.pyseparately to open the OSC catalogue PR.
kubectl create secret generic earthcode-secrets \
--namespace=earthcode \
--from-literal=AWS_S3_ACCESS_KEY_ID=<key> \
--from-literal=AWS_S3_SECRET_ACCESS_KEY=<secret> \
--from-literal=AWS_DEFAULT_REGION=eu-central-1 \
--from-literal=CREODIAS_S3_KEY=<key> \
--from-literal=CREODIAS_S3_SECRET=<secret>Airflow syncs DAGs from s3://airflow-dags-bc/earthcode/. Copy the active DAG there:
aws s3 cp dags/smos-ard-service-v2.py s3://airflow-dags-bc/earthcode/Airflow polls the bucket periodically; the DAG will appear in the UI within a minute or two.
The DAG runs automatically at 23:00 UTC every day (schedule="0 23 * * *").
start_date and end_date are derived from Airflow's {{ ds }} logical date — no manual
input needed for routine updates.
| Template | Resolves to (example: ds = 2026-05-13) |
|---|---|
{{ ds }} |
2026-05-13 |
{{ macros.ds_add(ds, -1) }} |
2026-05-12 |
So each scheduled run fetches [yesterday, today]. The boundary day (yesterday) is already
in the cube and is stripped before appending.
Catchup: catchup=False — if the DAG is paused and re-enabled, only the most recent
interval runs. Backfill missed days with an explicit manual trigger (see below).
After the pipeline runs, catalogue artefacts are staged at:
s3://earthcode-ard-cubes/catalogue-pending/smos-ard-smos-sm-global/
To open the GitHub PR on the OSC metadata repo, run the publish trigger manually
(requires GITHUB_USERNAME, GITHUB_TOKEN, and AWS credentials in the environment):
python -m smos_ard.publish_trigger \
s3://earthcode-ard-cubes/catalogue-pending/smos-ard-smos-sm-global/On success the artefacts are archived to catalogue-published/{collection_id}/{timestamp}/
and the pending prefix is removed.