Automatically invoked app factory.
Reason this release was yanked:
orchestrator-lso==1.0.0
Project description
Lightweight Service Orchestrator
LSO: an API that allows for remotely executing Ansible playbooks.
Code documentation
Code documentation can be found at https://workfloworchestrator.org/lso
Quick start
This is a quick setup guide for running on your local machine.
As a Docker container
To run LSO as a Docker container, build an image using the Dockerfile.example
as an example. Be sure to update
requirements.txt
and ansible-galaxy-requirements.yaml
accordingly, depending on your specific Ansible collection and
-role needs.
Use the Docker image to then spin up an environment. An example Docker compose file is presented below:
version: "3.5"
services:
lso:
image: my-lso:latest
environment:
SETTINGS_FILENAME: /app/config.json
ANSIBLE_ROLES_PATH: /app/lso/ansible_roles
volumes:
- "/home/user/config.json:/app/config.json:ro"
- "/home/user/ansible_inventory:/opt/ansible_inventory:ro"
- "~/.ssh/id_ed25519.pub:/root/.ssh/id_ed25519.pub:ro"
- "~/.ssh/id_ed25519:/root/.ssh/id_ed25519:ro"
This will expose the API on port 8000. The container requires some more files to be mounted:
- A
config.json
that references to the location where the Ansible playbooks are stored inside the container. - An Ansible inventory for all host and group variables that are used in the playbooks
- A public/private key pair for SSH authentication on external machines that are targeted by Ansible playbooks.
- Any Ansible-specific configuration (such as
collections_path
,roles_path
, etc.) should be set using environment variables.ANSIBLE_ROLES_PATH
is given as an example in the Docker compose snippet above.
Install the module
As an alternative, below are a set of instructions for installing and running LSO directly on a machine.
One of these should be what you're looking for:
- Install the latest release
python3 -m venv my-venv-directory
. my-venv-directory/bin/activate
pip install orchestrator-lso
- Install the source code
git clone https://github.com/workfloworchestrator/lso.git && cd lso
python3 -m venv my-venv-directory
. my-venv-directory/bin/activate
pip install flit
flit install --deps production
# Or, for the full development environment
flit install --deps develop
Running the app
- Create a settings file, see
config.json.example
for an example. - If necessary, set the environment variable
ANSIBLE_HOME
to a custom path. - Run the app like this (
app.py
starts the server on port 44444):
SETTINGS_FILENAME=/absolute/path/to/config.json python -m lso.app
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 orchestrator_lso-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 582fa2c01391be972fadb8f516feff66275d95cfb073c3c0c8c90f6e4aa0e6f7 |
|
MD5 | e31ead960ebd713c80e14ccfdae40337 |
|
BLAKE2b-256 | 7e270c39e496febd4213da4e669ec354cee67f0999e36cc319ea6f81e7dd2f3d |