TDP Manager Installation

TDP Manager is an orchestrator based on Ansible allowing to deploy the TDP stack.

Note: Even if it brings many features, the use of TDP Manager is not mandatory. TDP can be manually deployed.

Architecture

TDP Manager is composed as follows:

  • tdp-lib, an SDK exposing objects that allow to plan, execute (via Ansible) and monitor deployments based on a DAG. tdp-lib also includes an administration CLI allowing to manage the cluster.
  • tdp-server, a web server providing a REST API on top of tdp-lib. It adds a user authentication layer.
  • tdp-ui, a web interface that includes the functionalities of tdp-server and tdp-lib.

A relational database shared between tdp-lib and tdp-server is used to store metadata related to deployments.

tdp-server and tdp-ui can be connected to an OpenID Connect provider to authenticate users.

TDP Manager architecture

Note: Each module of TDP manager is designed to abstract the lower layers. For example, the administration CLI (tdp-lib) can be used alone, tdp-server can be used without tdp-ui, etc.

Prerequisites

The prerequisites to install TDP Manager are as follows:

Admin CLI Installation

Installation

The creation of a virtual environment is recommended. For example using venv. The installation of tdp-lib can be done via pip:

# Creation and activation of a virtual environment (optional)
python3 -m venv .venv
source .venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Installation of dependencies
pip install --upgrade setuptools wheel
# Installation of tdp-lib and the CLI
pip install "tdp-lib[visualization]@https://github.com/TOSIT-IO/tdp-lib/tarball/master"

Configuration

Ansible configuration

tdp-lib uses the ansible-playbook command to execute playbooks. It must be callable without options and without user interaction (Ansible Vault, privilege escalation, etc.).

Settings given in the control node page ensure that Ansible is correctly configured.

CLI configuration

Most options passed to the CLI can be configured via environment variables. It is recommended to define in a .env file at the root of the project the variables commonly used:

  • TDP_COLLECTION_PATH, list of paths to collections, separated by the path separator of the operating system (verifiable with the command python -c "import os; print(os.pathsep)").
  • TDP_RUN_DIRECTORY, the directory in which the Ansible commands will be executed (must contain the ansible.cfg file).
  • TDP_VARS, the directory containing the cluster variables. It can be empty if the initialization is done via the CLI.
  • TDP_DATABASE_DSN, address of the database to use. (For example for a SQLite database: sqlite:///tdp.db)

Initialization

The CLI relies on:

  • A relational database that stores metadata related to deployments.
  • A folder that centralizes the configurations of the different services (tdp_vars).

These two elements are initialized via the command:

# Initialization of the database and the tdp_vars folder
tdp init

The tdp_vars folder is populated by concatenating the tdp_vars_default folders defined in each collection as well as all the folders provided via the --overrides option.

Usage

See the CLI documentation.

Server Installation

The server is a work in progress.

UI Installation

The ui is a work in progress.