Skip to content
Riccardo Casula edited this page Jan 22, 2025 · 2 revisions

Federated Node Task Controller (FNTC)

For the time being is on a separate repo, it might get merged in the main Federated Node one: PHEMS_federated_node

This python controller aims to monitor a CRD which is defined in this manifest and translate it into an internal request to the federated node to POST /tasks.

After creating a task successfully, it will periodically check for the status and (TODO) push the results, once the pod completes, ideally outside the environment.

Assumptions

GitHub should be set as IdP (Identity Provider) in the FN keycloak, so that the user that triggers the task from GH, can be mapped with the internal permission system, basically acting as a bridge between analytics code and the Data Permission Platform.

How does this work?

Let's imagine that the source code to run some analytics is hosted in github in repo average_analysis.

In this repo there will be a folder where the CRD defined here is hosted as template.

ArgoCD will start monitoring this repo on a dedicated branch, set to read-only for all users, except the Admins.

There will also be a pipeline (i.e example) that refers to another actions template (provided by us), which takes care of (upon merge to a user-defined branch) merging the CRD changes to a third branch (i.e. monitor) which ArgoCD is monitoring for changes. It also injects the username on the PR author dynamically.

The researcher would then open a PR that aims to modify the CRD template, or add a new one. Once merged we expect ArgoCD to detect the change, and create the CRD entity.

This will then cause the controller to start its active work.

Clone this wiki locally