actinia-cloudevent-plugin
This is a plugin for actinia-core which translates cloudevents into a process definition for actinia-core and runs as standalone app.
Installation and Setup
Use docker-compose for installation:
docker compose -f docker/docker-compose.yml build
docker compose -f docker/docker-compose.yml up -d
DEV setup with vscode
- Start actinia-core locally via local dev-setup as described in the actinia-docker repository
- Have this repository open locally with vscode and press
F5. After a few seconds, a browser window should be openend, pointing to the version endpoint.
Alternatively, configure actinia-core to run jobs via actinia-worker.
In the actinia-core dev-setup, use the per_job queue in
actinia-docker/actinia-dev/actinia.cfg:
[QUEUE]
# queue_type = local
[QUEUE]
queue_type = per_job
kvdb_queue_server_url = valkey
kvdb_queue_server_password = pass
worker_queue_prefix = job_queue
And restart the vscode debugger. This way, a job is registered in the valkey DB, but not directly started.
Configuration
- the URL of actinia-core and the cloudevent receiver is defined
within config/mount/sample.ini:
[EVENTRECEIVER](Default value defined within src/actinia_cloudevent_plugin/resources/config.py)
Requesting endpoint
Note: Assuming cloudevent-plugin is running as described in previous setup.
You can test the plugin and request the / endpoint, e.g. with:
JSON=tests/examples/cloudevent_example.json
curl -X POST -H 'Content-Type: application/json' --data @$JSON localhost:3003/
Or test with per_job queue
JSON=tests/examples/cloudevent_example.json
curl -X POST -H 'Content-Type: application/json' --data @$JSON localhost:3003/
# Get the actinia job queue name from the response
QUEUE_NAME=job_queue_resource_id-d4d9be86-5938-47ff-9c6d-7c79964862c0
docker run --rm --network actinia-docker_actinia-dev \
-v $HOME/actinia/grassdb:/actinia_core/grassdb \
-v $HOME/actinia/grassdb_user:/actinia_core/userdata \
--entrypoint actinia-worker actiniacore -q $QUEUE_NAME
Exemplary returned cloudevent: tests/examples/cloudevent_example_return.json
Running tests
You can run the tests in the actinia test docker. These are the same steps which the github workflow is executing.
docker compose -f docker/docker-compose.yml up -d --build
sleep 10 && \
docker logs docker-actinia-cloudevent-1 && echo && \
docker logs docker-actinia-core-1 && echo && \
docker logs docker-event-receiver-server-1
docker exec -t docker-actinia-cloudevent-1 make integrationtest
docker compose -f docker/docker-compose.yml down
Possible setup
graph
1[Event Emitter, e.g. UI]
2[Kafka Queue Broker]
subgraph actinia
direction TB
3[actinia-cloudevent-plugin Transformer Service]
%%3@{ shape: braces, label: "Transformer Service" }
4[actinia worker JobSink]
%%4@{ shape: braces, label: "JobSink" }
5[actinia-core]
%%5@{ shape: braces, label: " write job to valkey" }
6[valkey]
end
1 -- Cloudevent --> 2
2 <-- Cloudevent --> 3
3 -- 1: func,RDC --> 5
5 -- 2: func,RDC --> 6
3 -- 3: Cloudevent (queue Name) per HTTP --> 4
4 -- 4: func,RDC --> 6
4 -- 5: webhook --> 3
3 -- Cloudevent (status) --> 2
sequenceDiagram
autonumber
create participant event receiver
create actor event sender
create participant A as actinia-cloudevent-plugin<br/>Transformer Service
%% Note right of A: Transformer Service #9829;
event sender-->>A: Cloudevent
create participant D as actinia-core
A->>D: func,RDC
create participant V as valkey
D->>V: func,RDC
D->>A: return <<QUEUE NAME>>
create participant W as actinia worker<br/>JobSink
A-XW: Cloudevent with <<QUEUE NAME>> per HTTP
A-->>event receiver: new Cloudevent with <<QUEUE NAME>>
destroy event sender
A-->>event sender: return "Received event <<ID>><br>and returned event <<ID 2>><br> with actinia-job <<QUEUE NAME>>."
rect rgb(191, 223, 255)
W->>V: func,RDC
par Processing
loop process
W->>W:
end
and Webhook
opt Optional
W->>A: status webhook (running)
A-->>event receiver: Cloudevent (status)
end
end
destroy W
W->>A: status webhook (finished / error)
A-->>event receiver: Cloudevent (status)
end
Metadata
Release files for actinia-cloudevent-plugin 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| actinia_cloudevent_plugin-1.0.1.tar.gz | 26.4 kB | Without provenance | Details for actinia_cloudevent_plugin-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| actinia_cloudevent_plugin-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for actinia_cloudevent_plugin-1.0.1-py3-none-any.whl |
Total release size: 56.0 kB
Release files / actinia_cloudevent_plugin-1.0.1.tar.gz
| Download URL | actinia_cloudevent_plugin-1.0.1.tar.gz |
|---|---|
| Size | 26.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69d698c85f9b5a8d449fc338e141cb912c8c4158a3f1aab004919ce69069d404
|
|
BLAKE2b-256 checksum How to use checksums |
cff0c696c2271ef2360b2cbbfeeb9802a11752b09d8528b9bec1ed44c1ad9f72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / actinia_cloudevent_plugin-1.0.1-py3-none-any.whl
| Download URL | actinia_cloudevent_plugin-1.0.1-py3-none-any.whl |
|---|---|
| Size | 29.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20186bb18cd8d3f416015149023639f9c599bb75769baef1fa430573a27fc72a
|
|
BLAKE2b-256 checksum How to use checksums |
a5c7f0ba5266b5f70cef9caf63b0d19f7b8b730e5e12bc201ce57135ff8ebcc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for actinia-cloudevent-plugin 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.