DEV Community

Cover image for Building a Unified Infrastructure Dashboard with Python
BuildMintZ Media
BuildMintZ Media

Posted on

Building a Unified Infrastructure Dashboard with Python

BuildMintZ Forge — The Infrastructure Control Plane

Operate Linux. Manage Virtual Machines. Control Kubernetes. Automate Recovery. Monitor Everything. From one platform.

After months of development, countless late nights, and many iterations, I'm excited to release BuildMintZ Forge — an Infrastructure Operations Platform that brings Linux, Virtual Machines, Kubernetes, monitoring, diagnostics, automation, and recovery into a single application.


The Problem

If you've ever managed Linux infrastructure, you know the workflow:

htop           # CPU
free -h        # Memory
df -h          # Disk
virsh list     # Virtual Machines
kubectl get pods   # Kubernetes
kubectl get nodes
kubectl top pods
ip addr        # Networking
ping
dig
curl
nmcli
journalctl
Enter fullscreen mode Exit fullscreen mode

Before long, you're jumping between terminal windows, dashboards, SSH sessions, and browser tabs just to understand what's happening. I wanted one place that could answer: "What is happening across my infrastructure right now?" That became Forge.


What is BuildMintZ Forge?

Forge is a unified Infrastructure Operations Platform for Linux environments. It combines:

  • Linux Host Management — Real-time CPU, RAM, Disk, Network, Swap, Load, Processes
  • Virtual Machine Management — Lifecycle, resource metrics, snapshots, SSH-based monitoring
  • Kubernetes Operations — Nodes, Pods, Deployments, Services, Jobs, CronJobs
  • Network Diagnostics — 10-layer structured diagnostic engine
  • Automated Recovery — Targeted repairs without rebooting
  • Infrastructure Automation — Rule-based job queue with CrashLoop recovery, VM recovery, node auto-repair
  • Integrated Terminal — Full bash shell with history and keyboard shortcuts
  • Audit Logging — Complete operational traceability

Everything updates in real time through WebSockets. No page refreshes needed.


Architecture

┌─────────────────────────────────────────────────────────┐
│                   Web Server (Python)                    │
├─────────────────────────────────────────────────────────┤
│  Collectors          Diagnostics          Repairs        │
│  (iproute2, nmcli,   (10-layer engine,    (bridge,      │
│   libvirt,            physical→HTTPS,      dhcp, dns,   │
│   resolvectl,         structured output)   interface,   │
│   journalctl)                               nm, routing) │
├─────────────────────────────────────────────────────────┤
│              Infrastructure Monitor                      │
│  • System metrics (psutil)                              │
│  • VM management (libvirt + SSH config)                 │
│  • Kubernetes (kubectl)                                 │
│  • Diagnostics & Repair engine                          │
├─────────────────────────────────────────────────────────┤
│         WebSocket API            HTTP REST API           │
│    (real-time broadcasts)    (status, terminal, jobs)   │
└─────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

One Dashboard Instead of Ten Tools

The goal wasn't to replace Linux. The goal was to replace context switching. Linux remains the engine. Forge becomes the control plane.

Traditional Workflow Forge
SSH into server Open dashboard in browser
Run htop Live CPU graph with sparklines
Run free -h Memory widget with used/total
Run df -h Disk usage with percentage bars
Run kubectl get pods Kubernetes Pods view with status badges
Run kubectl get nodes Nodes view with role detection
Run virsh list VM inventory with resource metrics
Run ip addr, ping, dig 10-layer guided diagnostics
Check logs manually Built-in audit trail

Infrastructure Monitoring

Forge continuously monitors CPU, Memory, Disk, Network, Swap, Load averages, Running processes, and System uptime. For virtual machines it also collects resource usage, status, snapshots, and SSH-based metrics. Everything updates automatically via WebSocket without refreshing the page.


Virtual Machine Management

The VM tab shows every node with:

  • Name — k8s-node-01, k8s-node-02, k8s-node-03
  • State — Running, Paused, Shutoff with color badges
  • IP Address — 10.0.0.21, 10.0.0.22, 10.0.0.23
  • CPU — Real-time percentage from SSH
  • RAM — Used/Total with percentage progress bars
  • Disk — Used/Total with percentage progress bars
  • Swap — Usage in MB
  • Pods — How many Kubernetes pods are running on each VM

Click any VM to open a detail drawer showing vCPUs, Memory max, Disks, Interfaces, Snapshots, and Pods running on that node. Actions include Restart, Shutdown, Snapshot, Pause, and Resume.

VM credentials are configured once through nodes.conf:

DEFAULT_SSH_USER="devcyp"
DEFAULT_SSH_PORT="22"
SSH_KEY_PATH="~/.ssh/id_rsa"

NODES=(
  "k8s-node-01|10.0.0.21|devcyp|22"
  "k8s-node-02|10.0.0.22|devcyp|22"
  "k8s-node-03|10.0.0.23|devcyp|22"
)
Enter fullscreen mode Exit fullscreen mode

New users get a first-run setup modal where they can upload their config file or enter nodes manually.


Kubernetes Operations

Forge provides visibility into Nodes, Pods, Deployments, Services, Jobs, and CronJobs with namespace awareness, restart counts, node role detection (control-plane, etcd, worker), and pod-to-VM mapping.

View What You See
Nodes Name, Status (Ready/NotReady), Role, Version, CPU, Memory, Age
Pods Name, Namespace, Status, Node, Restarts, Age
Deployments Name, Namespace, Age, Scale action
Services Name, Namespace, Age
Jobs Name, Namespace, Age

Actions include: Restart pods, Delete pods, Scale deployments, Cordon/Uncordon/Drain nodes.


The Diagnostic Engine

This project started as a network recovery utility. The diagnostic engine remains one of Forge's strongest capabilities. Instead of checking networking with random commands, Forge performs a structured validation across ten layers:

Layer What It Checks
1. Physical Carrier signal, operstate, link speed, duplex
2. Link Interface state, bridge membership, vnet attachment
3. IP IPv4/IPv6 address assignment, duplicate IP detection
4. Routing Default route, blackhole routes, route metrics
5. Gateway ARP entry, ICMP reachability
6. Internet Multi-target ping (ICMP + TCP fallback)
7. DNS Resolution tests, resolver responsiveness, nameserver validation
8. HTTPS curl-based connectivity, captive portal detection, MTU analysis
9. NetworkManager Service status, device state, stale connection detection
10. Virtualization libvirtd health, VM count, bridge attachment

Each layer returns PASS, FAIL, or WARN with detailed output. When problems are detected, Forge applies targeted repairs — DNS cache flush, interface reconnect, ARP cache flush, DHCP renewal, bridge re-enslavement — without requiring a reboot.


Automation Engine

Forge includes a rule-based automation engine with configurable triggers and actions:

  • Pod CrashLoop Recovery — Detect, restart, verify
  • VM Recovery — Ping, SSH test, network restart, reboot escalation
  • Node Auto-Repair — Cordon, restart kubelet, uncordon
  • DNS Auto-Repair — Flush cache, restart resolver, verify
  • High CPU Auto-Scale — Scale deployment when CPU exceeds threshold
  • Snapshot Auto-Schedule — Daily snapshots with retention policies

Each automation rule can be enabled, disabled, or toggled from the UI. Jobs show progress bars with step-by-step logging.


Integrated Terminal

Sometimes you still need a shell. Forge includes an Azure Cloud Shell-style terminal that slides up from the bottom of the page. It supports:

  • Full bash command execution
  • Command history (↑/↓ arrows)
  • Local commands: clear, help, exit
  • Keyboard shortcuts: Ctrl+to toggle,Ctrl+Lto clear,Escape` to close
  • Color-coded output (red for errors, yellow for warnings, green for success)
  • Real-time command output streaming

First-Run Setup

When a new user opens Forge for the first time, they see a setup modal:

  • Upload Config — Drag and drop a nodes.conf file
  • Manual Entry — Enter node name, IP, SSH user, and port
  • Skip for Now — Configure later

No code editing required. No hardcoded credentials. The config is saved to ~/.config/buildmintz-forge/nodes.conf.


Installation

Debian Package (Recommended)

bash
sudo dpkg -i buildmintz-forge_1.0.0_all.deb

After installation, Forge appears in your application menu. Launch it or run:

bash
buildmintz-forge-web

Then open http://localhost:9876.

From Source

bash
git clone https://github.com/BuildMintZ/forge.git
cd forge
python3 web/server.py --host 0.0.0.0 --port 9876

CLI Commands

bash
sudo buildmintz-forge status # Infrastructure health check
sudo buildmintz-forge diagnose # Full 10-layer diagnostic
sudo buildmintz-forge repair # Diagnose and repair
sudo buildmintz-forge snapshot # Save infrastructure state
sudo buildmintz-forge watch # Real-time terminal monitoring

SSH Node Setup

bash
buildmintz-forge setup-ssh


Tech Stack

Forge is built with Python and integrates with existing Linux tooling:

  • Backend: Python 3.8+, psutil, websockets, asyncio
  • Frontend: Vanilla JavaScript, WebSocket client, CSS3
  • Infrastructure: NetworkManager, libvirt, kubectl, iproute2, systemd, SSH
  • Packaging: Debian package (.deb), GitHub Actions CI/CD

Instead of reinventing Linux utilities, Forge builds on top of them to provide a unified operational experience.


CI/CD Pipeline

Every push to main triggers a self-hosted GitHub Actions runner on the MX server that:

  1. Pulls latest code to /home/DevCyp/forge-check
  2. Builds a Debian package
  3. Generates SHA256 checksums
  4. Uploads artifacts to GitHub
  5. Creates GitHub Releases (when versioned)
  6. Restarts the Forge web server with the latest code

Editions

Feature Community Professional Enterprise
Host Management
VM Management
Kubernetes Operations
Network Diagnostics
Automation Engine
Integrated Terminal
Audit Logging
Multi-Site Management
RBAC
LDAP / Active Directory
SSO (SAML/OIDC)
Premium Support
HA Deployment
White Labeling

Roadmap

  • Multi-host management with remote agents
  • Multi-cluster Kubernetes support
  • Role-based access control (RBAC)
  • Alerting engine with webhook integrations
  • Plugin SDK for custom collectors and diagnostics
  • REST API for external integrations
  • Cloud provider integrations (AWS, GCP, Azure)

Why I Open Sourced It

I've always enjoyed building infrastructure software. Open sourcing Forge felt like the natural next step. I'm hoping it becomes useful for developers, DevOps engineers, platform engineers, system administrators, home labs, and small production environments. The project is still young, but the foundation is solid.


Try It

https://github.com/BuildMintZ/forge/releases/tag/v1.0.0

GitHub Repository: https://github.com/BuildMintZ/forge

Bug reports, feature ideas, and pull requests are all welcome.


**BuildMintZ Forge** — The Infrastructure Control Plane. Operate Linux. Manage Virtual Machines. Control Kubernetes. Automate Recovery. Monitor Everything. **From one platform.**

Top comments (0)