Skip to content

[Infra] Containerize components and setup Docker Compose orchestration #17

@varev-dev

Description

@varev-dev

Goal

Deliver a production-ready containerization and orchestration layer using Docker and Docker Compose to enable single-command deployment of the entire NMM stack (Agent, Server, Dashboard) while ensuring environment consistency across different platforms.

Acceptance criteria

  • docker compose up --build runs all 3 services (agent, server, dashboard) without extra manual configuration on a clean machine.
  • The Agent successfully sends metrics to the Server inside the dedicated compose network (no gRPC port exposure to the host machine).
  • The Dashboard is accessible at http://localhost:8080 and displays live metrics from the running agent.
  • Configuration variables (e.g., measurement interval, log level) can be overridden via env_file or compose environment variables without modifying the docker-compose.yml file.
  • Stopping and restarting the compose stack does not result in configuration loss.
  • The README.md file contains a complete "Quick Start" section allowing a new developer to run the stack in less than 10 minutes.

Sub-tasks & Scope of work

  • T17-1: Agent Dockerization: Create a multi-stage Dockerfile for the C++ agent (build stage: clang/cmake, runtime stage: debian:bookworm-slim). Ensure only the binary is copied to the runtime image and set a proper ENTRYPOINT.
  • T17-2: Server Dockerization: Create a multi-stage Dockerfile for the Go server (build stage: golang:1.22-alpine, runtime stage: alpine:3.19). Focus on minimizing runtime layer size.
  • T17-3: Compose Orchestration: Define docker-compose.yml with agent, server, and dashboard services. Implement internal bridge networking, environment variable mapping via env_file, and health-checks for the server ingest.
  • T17-4: End-to-End Validation: Perform E2E testing on a clean reference environment (Ubuntu 24.04 LTS). Verify the full data flow from agent to dashboard.
  • T17-5: Documentation: Update README.md with a "Quick Start" section (covering docker commands and ports) and a "Development Setup" section for local builds without Docker.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions