MADAM (TM) Multi Agent Digital Asset Manager - a MAM server for Docker Swarm to handle higly distributed media processes
Project description
MADAM
MADAM is the Multi Agent Digital Asset Manager.
It provides a three-tier architecture platform to handle workflow processing in a distributed environment.
It uses Docker swarm to dispatch processes in a cluster of machines.
It is a free (as freedom) software written in Python.
Requirements
You will need Camunda Modeler 4.11+ to easily create Zeebe BPMN XML workflows for MADAM.
Licensing
MADAM is licensed under the Gnu Public License Version 3.
Camunda Modeler is licensed under the MIT License (MIT).
At its core, MADAM use adhesive-zebe, a BPMN workflow python engine able to execute Zeebe BPMN XML workflows. It is a fork of adhesive under the original adhesive license that is GNU Affero General Public License v3.0
System environment setup
-
Configure userns-remap to map container user
root
to a host non-root user. -
Configure the dev station as a Docker Swarm Manager.
-
Install a Postgresql database server.
You can use the Ansible playbook provided to install PostgreSQL locally with Docker,
after configuring hosts.yaml
:
make environment
Python environment setup
-
It requires Python 3.8+.
-
Pyenv should be used to choose the right version of Python, without breaking the default Python of the Operating System.
-
A Python virtual environment should be created in a
.venv
folder.
pyenv install 3.8.0
pyenv shell 3.8.0
python -m venv .venv
source .venv/bin/activate`
Installation/Update
From PyPI:
In a Python virtualenv:
pip install -U madam-mam
In your user install directory:
pip install --user -U madam-mam
Development environment
Install Poetry with the custom installer:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
Install Python dependencies:
poetry install --no-root
Get madam-cli bash shell completion:
_MADAM_CLI_COMPLETE=source_bash bin/madam-cli > madam-cli-complete.sh
sudo cp madam-cli-complete.sh /etc/bash_completion.d/.
For another shell, replace source_bash
by source_zsh
or source_fish
Configuration
Make a copy of the environment config example file:
cp .env.example .env
Edit .env
to suit your needs, then:
export $(grep -v '^#' .env | xargs -d '\n')
Make a copy of the Ansible inventory example file:
cp hosts.yaml.example hosts.yaml
Edit hosts.yaml
to suit your needs.
Make a copy of the MADAM config example file:
cp madam.yaml.example madam.yaml
Edit madam.yaml
to suit your needs.
Make a copy of the MADAM config example file for the test environment:
cp madam_tests.yaml.example madam_tests.yaml
Edit madam_tests.yaml
to suit your needs.
Make a copy of the MADAM config example file for the local deploy:
cp madam_deploy.yaml.example madam_deploy.yaml
Edit madam_deploy.yaml
to suit your needs.
Set and tag project version in Git
make version VERSION=1.0.0
Build MADAM python package and Docker images
make build
The wheel package will be build in the dist
directory.
Deploy MADAM as local docker container
To deploy MADAM container on localhost:
make deploy
Check static type and code quality
make check
Run tests
Run all pytest tests with:
make tests
Run only some tests by using bin/tests.sh
:
bin/tests.sh tests/domains/test_workflows.py::test_create
Database setup
Set DATABASE_URL
and DATABASE_URL_TESTS
environment variable in .env
file:
DATABASE_URL=postgresql://postgres:xxxxx@hostname:5432/madam?sslmode=allow
DATABASE_URL_TESTS=postgresql://postgres:xxxxx@hostname:5432/madam_tests?sslmode=allow
Migrations scripts
Add/Edit scripts in resources/migrations
directory:
# version.name.[rollback].sql
00001.init_tables.sql
00001.init_tables.rollback.sql
Migrate commands
make databases
make databases_rollback
make databases_list
Project details
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
File details
Details for the file madam-mam-0.5.9.tar.gz
.
File metadata
- Download URL: madam-mam-0.5.9.tar.gz
- Upload date:
- Size: 60.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.8.0 Linux/4.15.0-162-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c24236ce746082e751375731b274ed58c53f5fce5af808044356eac2fbe6759a |
|
MD5 | 15061c7b1bfd99eb720b2a7b4127371a |
|
BLAKE2b-256 | 960a37c2648ebc3883224fd57731db43db7b8e4cce8a345b686e45d8a4026571 |
File details
Details for the file madam_mam-0.5.9-py3-none-any.whl
.
File metadata
- Download URL: madam_mam-0.5.9-py3-none-any.whl
- Upload date:
- Size: 135.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.8.0 Linux/4.15.0-162-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a3028bacdd52896ddc0c40fbc31ed4ec3fdf6b35474204385ed9198461449a3 |
|
MD5 | 3a45b94c6281696128fabed761e20293 |
|
BLAKE2b-256 | 1f58b164c0c8c3122121591c7a0965708d7ea9f06168e2acbdbd1c5c1348fa71 |