A python based plugable and extensible manifest processing system
Project description
py_animus
animus
as in a sense of purpose and reason
A python based plugable and extensible manifest processing system
The general idea is to create an extensible system that would be responsible for processing YAML Manifest files (similar to Kubernetes) in a consistent way.
Any Manifest file has the following top-level attribute names:
kind
apiVersion
metadata
spec
The goal is to implement classes that can process any kind
of manifest of a specific version (or range of versions).
Processing a class means essentially to take the metadata
and spec
sub-attributes into consideration to ensure the stated configuration is applied during processing.
Processing must ensure that the desired end-state of the manifest can be implemented by user-defined logic.
Overall the system needs to be able to derive the implemented state versus the desired state in order to calculate and implement changes required to reach a desired state as defined in the manifest.
If this sounds very familiar, then yes - it is basically how Kubernetes work. The difference is that this library is not Kubernetes specific and aims to be more generalized methods that could be employed by potentially any system that must be continuously monitored and updated to fit a desired state.
Warning I have labeled this software
BETA
, but keep in mind testing in the real world has been limited and there may be a number of enhancements or changes forthcoming.
Use
Installation
This project is also hosted on https://pypi.org/project/py-animus/
Installation:
pip install py-animus
Note It is always a good idea to use Python Virtual environments and I encourage it as well.
Using pre-built Docker Image
Pull the image:
docker pull ghcr.io/nicc777/py-animus:release
Get quick help:
docker run --rm -e "DEBUG=1" ghcr.io/nicc777/py-animus:release -h
Use (as per the hello world example):
docker run --rm -e "DEBUG=1" \
-v $PWD/examples/hello-world/src:/tmp/src \
-v $PWD/examples/hello-world/manifest:/tmp/data \
-v /tmp/results:/tmp/hello-world-result \
ghcr.io/nicc777/py-animus:release apply -m /tmp/data/hello-v1.yaml -s /tmp/src
More complex example:
docker run --rm -e "DEBUG=1" \
-v $PWD/examples/linked-manifests/src:/tmp/src \
-v $PWD/examples/linked-manifests/manifest:/tmp/data \
-v /tmp/results:/tmp/example-page-result \
ghcr.io/nicc777/py-animus:release apply -m /tmp/data/linked-v1.yaml -s /tmp/src
To reverse out any of the applied commands, just use the command delete
instead of apply
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for py_animus-0.9.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fee3c9d14cfb356f43b466eda938f4717a9686b6a9f974322e30dfe706768e2b |
|
MD5 | 9ae16d2ca92d0112c0ba0e5ea23dab69 |
|
BLAKE2b-256 | 3873632a9ea4bc5650867c2bc84c91b085c5fb049d54ff6be8823d5be8188e84 |