You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| 3 |`publish_to_catalogue`| Builds STAC collection + OGC API records via deep-code, opens a GitHub PR on the OSC metadata repo |
59
+
| 3 |`publish_to_catalogue`| Generates `dataset-config.yaml`, `workflow-config.yaml`, and `manifest.json`; writes them to `s3://{bucket}/catalogue-pending/{collection_id}/`|
60
+
| — |`publish_trigger.py`| Separate CLI: reads staged artefacts from S3, calls deep-code to open a GitHub PR on the OSC metadata repo, archives artefacts to `catalogue-published/` on success |
`pipeline_params` is a plain passthrough function with no external dependencies — safe to run without S3 or CREODIAS credentials. Replace `func_qualname` with any other step to test it (credentials required for `fetch_data` onwards).
95
-
96
96
## procodile Workflow (`workflow.py`)
97
97
98
98
`workflow.py` is the single source of truth for the pipeline. It uses the [procodile](https://github.com/deepesdl/procodile) framework to declare the pipeline as a typed, inspectable workflow rather than a plain Python script. Three procodile constructs do the work:
@@ -117,7 +117,7 @@ PublishResult — output of publish_data step
117
117
|`end_date`|`date`| — | End of the time range to process |
118
118
|`bbox`|`bbox`|`[-180, -90, 180, 90]`| Spatial extent. Defaults to global; use a smaller bbox for demos |
119
119
|`output_prefix`|`string`|`smos-sm/global`| S3 key prefix for staging and ARD stores. Use a unique prefix for demo/test runs to avoid writing to the production cube |
120
-
|`stac_s3_bucket`|`string`|`null`| S3 bucket for the STAC catalog and deep-code user storage. Defaults to the ARD cube bucket when not set |
120
+
|`stac_s3_bucket`|`string`|`s3://deep-esdl-public/stac/smos-sm/global/`| S3 bucket for the STAC catalog and deep-code user storage. Defaults to the ARD cube bucket when not set |
121
121
122
122
### Running the workflow
123
123
@@ -157,112 +157,12 @@ pixi run appligator smos_ard.workflow:registry \
157
157
158
158
## Airflow DAG
159
159
160
-
The hand-written DAG in `dags/smos_ard_update_dag.py` uses `KubernetesPodOperator`. Each step runs `run_step.py` as the container entrypoint, which:
160
+
The active DAG (`dags/smos-ard-service-v2.py`) uses `KubernetesPodOperator`. Each step runs `run_step.py` as the container entrypoint, which:
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`.
203
-
204
-
**Why `pixi.toml` and `pyproject.toml` are needed alongside `pixi.lock`:**
205
-
-`pixi.toml` — pixi unconditionally requires a manifest to run; `pixi install --locked` won't start without one. The lock file has all resolved packages, but pixi still needs the manifest to know the project name, channels, and which environments exist. The `docker/pixi.toml` is a minimal stub that satisfies this requirement.
206
-
-`pyproject.toml` — needed by the `pip install --no-deps -e .` step that installs the `smos_ard` package from the copied `src/`. `smos-ard-pipeline` cannot be declared in `pixi.toml` as a `path = "."` dependency and use `--locked`, because pixi hashes the local source when generating the lock file on the host; in Docker the path content differs, so pixi reports the lock as out-of-date and refuses to install. Installing it separately with pip after `pixi install --locked` sidesteps this.
207
-
208
-
`procodile` and `gavicore` exist on PyPI but the latest changes needed by this pipeline are only on the `main` branch and not yet in a published release, so the Dockerfile installs them directly from the [`eo-tools/eozilla`](https://github.com/eo-tools/eozilla) git repo during the build stage. The `smos_ard` package is installed from `src/` which is copied in from the project root.
209
-
210
-
The build context is `docker/`. Since `src/` lives at the project root it must be copied in before building (`docker/src/` is gitignored):
The Airflow service account (`airflow-sa` in the `airflow` namespace) needs permission to create and manage pods in the `earthcode` namespace. Apply the role and binding once:
224
-
225
-
```bash
226
-
kubectl apply -f k8s/rbac.yaml
227
-
```
228
-
229
-
### 3. Create Kubernetes secret
230
-
231
-
Every pod receives these environment variables from the `earthcode-secrets` secret:
|`AWS_DEFAULT_REGION`| no | fetch, aggregate, publish | AWS region; defaults to `eu-central-1`|
238
-
|`CREODIAS_S3_KEY`| yes | fetch | CREODIAS S3 key for the xcube-smos data store |
239
-
|`CREODIAS_S3_SECRET`| yes | fetch | CREODIAS S3 secret for the xcube-smos data store |
240
-
|`GITHUB_USERNAME`| yes | publish | GitHub username for opening the OSC catalogue PR |
241
-
|`GITHUB_TOKEN`| yes | publish | GitHub PAT with `repo` scope for opening the OSC catalogue PR |
242
-
243
-
> `publish` also needs `S3_USER_STORAGE_{BUCKET,KEY,SECRET}` (expected by deep-code). `KEY` and `SECRET` are derived at runtime from `AWS_S3_ACCESS_KEY_ID` / `AWS_S3_SECRET_ACCESS_KEY`. `BUCKET` defaults to the ARD cube bucket but can be overridden via the `stac_s3_bucket` DAG parameter when the STAC catalog should live in a separate bucket.
0 commit comments