Skip to content

nsubrahm/launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

101 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Maintenance Mitra is a modular, containerized application for real-time machine data monitoring, alerting, and dashboarding. The system is orchestrated using Docker Compose, with configuration managed via environment templates and stack files.

Overview

The launch process is managed through a set of templates and configuration files, allowing you to tailor deployments for different environments and machine setups.

Key Features:

  • Modular Docker Compose stacks for core services, machine-specific apps, and supporting infrastructure.
  • Configuration driven by environment variable templates (.tmpl files) and generated .env files.
  • Easy customization for machine IDs, database schemas, partitioning, and more.
  • Supports both quick-start and advanced, multi-machine scenarios.

Installation

1. Pre-requisites

  • 64-bit Windows or Linux server with
    • 4 CPU core and 16 GiB RAM.
    • Root volume of 10 GiB.
    • Additional volume of 40 GiB.
  • Docker and Docker Compose installed.
  • Internet access during installation.

The commands in this page is for a Linux machine.

2. Configuration Management

All configuration is managed via environment variable files. Templates in launch/templates/ are rendered via scripts to produce .env files in launch/conf/. These .env files are referenced by the Docker Compose stack files in launch/stacks/. There are two categories of environment variables - general and machine. The general environment variables should be generated once to launch the environment. The machine specific environment variables may be generated for as many machines as required.

To generate configuration, run the following steps.

  1. Clone the repository.
git clone https://github.com/nsubrahm/launcher
cd launcher
  1. Generate general configuration. To edit defaults in config.json, see configuration.
mkdir -p launch/conf/general
python scripts/main.py -f configs/config.json
  1. Generate configuration for a machine. To edit defaults in config.json, see configuration.
mkdir -p launch/conf/m001
tools/config-gen.sh m001
python scripts/main.py -f configs/m001.json -m m001

3. Launch

  1. Launch the infra-structure. This step is to be run once.
export CONF_DIR=general
source launch/conf/${CONF_DIR}/core.env && docker compose --env-file launch/conf/${CONF_DIR}/core.env -f launch/stacks/core.yaml up -d
source launch/conf/${CONF_DIR}/machines.env && docker compose --env-file launch/conf/${CONF_DIR}/machines.env -f launch/stacks/machines.yaml up -d
source launch/conf/${CONF_DIR}/base.env && docker compose --env-file launch/conf/${CONF_DIR}/base.env -f launch/stacks/base.yaml up -d
source launch/conf/${CONF_DIR}/gateway.env && docker compose --env-file launch/conf/${CONF_DIR}/gateway.env -f launch/stacks/gateway.yaml up -d
  1. Launch applications for a machine. This step maybe run as many times as machines are to be added. Ensure that the configuration was generated for the specfied machine. See Configuration management above.
export CONF_DIR=m001
source launch/conf/${CONF_DIR}/init.env && docker compose --env-file launch/conf/${CONF_DIR}/init.env -f launch/stacks/init.yaml up -d
source launch/conf/${CONF_DIR}/apps.env && docker compose --env-file launch/conf/${CONF_DIR}/apps.env -f launch/stacks/apps.yaml up -d

4. Batch set-up

  1. Set-up logs folder.
mkdir -p launch/batch/logs
  1. Add the following cron entry for as many machines that were launched.
0 */8 * * * $HOME/launcher/launch/batch/mljobs.sh m001 stable

5. License Management

The application uses a license key for rate-limiting and feature control.

  • The default license is in conf/license.env.
  • To upgrade, replace the key in this file.

6. Un-installation

See clean-up for steps to un-install.

Usage

  • Data Ingestion: Send POST requests to /data endpoint. See payload structure for more details.
  • Dashboard: Access /ui in your browser.
  • Access the dashboard at http://localhost:80/ui. The default credentials are admin/admin.

See docs/ for payload formats and advanced usage.

About

Launch Maintenance Mitra application

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors