Skip to content

Platform Services v0.2

Prasad Talasila edited this page Mar 30, 2026 · 2 revisions

The dtaas-services CLI is a command-line tool for managing DTaaS platform services including MongoDB, InfluxDB, RabbitMQ, and Grafana.

These services can only be installed in secure (TLS) mode.

The following services can be installed:

  • Influx time-series database and dashboard service
  • Grafana visualization and dashboard service
  • RabbitMQ AMQP broker and its' management interface The MQTT plugin of this broker has been enabled. So, it can also be used as MQTT broker.
  • MongoDB database server

Features

  • Project Initialization: Generate project structure with config and data directories
  • Automated Setup: One command setup of TLS certificates and permissions
  • Service Management: Start, stop, and check status of all services
  • User Management: Easy creation of user accounts in InfluxDB, RabbitMQ, and ThingsBoard
  • Cross platform: Works on Linux, macOS, and Windows
  • Configuration-driven: Reads settings from config/services.env

Installation

Prerequisites

  • Python 3.10 or higher
  • Docker and Docker Compose
  • TLS certificates

Install using pip:

pip install dtaas_services-0.2.0-py3-none-any.whl

This installs the dtaas-services command. To verify the installation:

dtaas-services --help

Quick Start

  1. Navigate to where you want to set up the services and generate the project structure and run:

    dtaas-services generate-project

    This creates:

    • config/ directory with configuration templates. It is used for storing the service configuration
    • data/ directory for service data
    • compose.services.secure.yml for main services
    • certs is used for storing the TLS certificates needed by the services.
    • compose.thingsboard.secure.yml for ThingsBoard and PostgreSQL (this file can be ignored for now)
  2. Update config/services.env with your environment values:

    • SERVICES_UID: User ID for service file ownership
    • SERVICES_GID: Group ID for service file ownership
    • SERVER_DNS: Your server hostname
    • Port numbers for each service

Usage

Service Setup

After generating the project and configuring your settings:

dtaas-services setup

This command will:

  • Copy TLS certificates to the correct locations
  • Set up MongoDB certificates and permissions
  • Set up InfluxDB certificates and permissions
  • Set up RabbitMQ certificates and permissions

Service Management

The following commands are useful for service management.

dtaas-services clean # Clean all data and log files for services with user confirmation
dtaas-services start -s rabbitmq # starts MQTT and RabbitMQ services
dtaas-services start -s grafana,influxdb # starts MQTT and RabbitMQ services
dtaas-services stop services # stop all services
dtaas-services status
dtaas-services restart # restart services
dtaas-services remove # remove services with user confirmation
dtaas-services remove -v # Remove services and their data

Options:

The dtaas-services can take the following options.

  • -s, --services Comma-separated list of specific services to manage
  • --volumes, -v (remove command only) Remove volumes as well
  • --yes (clean command only) Skip confirmation prompt

User Account Management

  1. Edit config/credentials.csv with user accounts (format: username,password,email)

  2. Add users to services:

    dtaas-services user add

    This creates user accounts in InfluxDB, and RabbitMQ.

Clone this wiki locally