TOSIT-IO / tdp-lib

Python library to configure, manage and deploy TDP
Apache License 2.0
4 stars 8 forks source link

Python Version Code style: black

TDP Lib

tdp-lib is a Python library built on top of Ansible. It is designed for managing TDP clusters, offering advanced tools to extend Ansible's capabilities. Key features include:

tdp-lib can be utilized in various ways: as a Python library, through an admin CLI, via a REST API (see tdp-server), or through a web interface (see tdp-ui).

Pre-requisites

To use tdp-lib, ensure you have the following prerequisites:

Optional dependencies for DAG visualization:

Installation

Set the following environment variables:

Ensure Ansible is configured to use the tosit.tdp.inventory plugin. Example ansible.cfg:

[defaults]
inventory=your_inventory,..,~/tdp_vars

[inventory]
enable_plugins = tosit.tdp.inventory,..,your_plugins

Install the library:

# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate
# Install the dependencies
pip install "tdp-lib[visualization]@https://github.com/TOSIT-IO/tdp-lib/tarball/master"
# Initialize the database and tdp_vars
tdp init

CLI Usage

[!NOTE] This section is a work in progress.

tdp --help

Contributing

Contributions are welcome! Here are some guidelines specific to this project:

Developer Documentation

Developer documentation is available here: docs/Developer

Docstrings are used to generate Sphinx documentation. Install the `docs`` extra dependency:

poetry install -E docs

Build the documentation:

poetry run task docs

The built documentation is available at docs/_build/html/index.html.