Back to All ArticlesHomelab & CI/CD
Homelab & CI/CD2025-05-297 Min Read285 views

From Bare Metal to CI/CD Pipeline: Building a Production DevOps Lab with Proxmox VE

Architecting a multi-tier DevOps homelab on bare metal with Proxmox VE: VLAN segmentation, automated Ansible configuration, Jenkins CI/CD, and Nginx reverse proxying.

Share:𝕏 PostLinkedIn
From Bare Metal to CI/CD Pipeline: Building a Production DevOps Lab with Proxmox VE

From Bare Metal to CI/CD Pipeline: Building a Production DevOps Lab with Proxmox VE — Legion Mind Architecture Dispatch

Key Architecture Takeaways

  • Dedicate at least 50% of bare-metal RAM directly for virtual machine and container allocations.
  • Separate public traffic on vmbr0 from secure internal inter-VM communications on vmbr1.
  • Orchestrate multi-tier environments across Dev, Staging, and Production with Jenkins and Ansible.
  • Terminate TLS at an Nginx reverse proxy with automated Let's Encrypt certificates.

Relying solely on public cloud providers (AWS, Azure, GCP) to experiment with distributed systems, high availability clusters, and CI/CD pipelines quickly becomes expensive. With a single bare-metal server and Proxmox Virtual Environment (VE), you can replicate enterprise production topologies in a controlled, cost-effective lab environment.

This architectural guide covers how to design and build a full-lifecycle DevOps lab: from hypervisor setup and network segmentation to automated configuration management with Ansible, continuous integration with Jenkins, and edge routing with Nginx.


Recommended Hardware & Virtualization Architecture

To comfortably host multiple virtual machines, databases, build runners, and container runtimes, the host machine should meet these baseline specifications:

Hardware ComponentRecommended BaselineProduction Role
CPU8+ Cores (Intel Core i7/i9 or AMD Ryzen 7/9)Multi-tenant virtualization & build concurrency
Memory32 GB – 64 GB DDR4/DDR5Host reserve + VM allocations
Storage1 TB – 2 TB NVMe SSD (ZFS or LVM-thin)High-IOPS container roots & database volumes
Networking1 Gbps / 2.5 Gbps EthernetUpstream WAN gateway & internal VLAN trunking

Logical VM & Container Topology

Rather than creating an unorganized pool of virtual instances, segment your homelab into clear operational tiers that mirror a real-world multi-stage cloud environment:

HostnameTypeOSRole & ServicesMemory
mgmt-controllerVMUbuntu 24.04 LTSAnsible controller, Jenkins CI master, Git CLI4 GB
proxy-edgeLXCDebian 12 MinimalNginx reverse proxy, SSL termination, rate limiting1 GB
app-devLXCUbuntu 24.04 LTSFeature branch deployments via Docker Compose2 GB
app-stageVMRocky Linux 9Staging integration environment (RHEL parity)4 GB
app-prodVMRocky Linux 9Production workload instance4 GB
data-coreVMDebian 12 MinimalPostgreSQL / Redis cluster4 GB
telemetry-opsLXCUbuntu 24.04 LTSPrometheus, Grafana, Node Exporter metrics2 GB

Step 1: Proxmox VE Hypervisor Installation & Baseline

  1. Download the latest official Proxmox VE ISO from proxmox.com.
  2. Flash the installer to a bootable USB drive using Rufus or Balena Etcher.
  3. Install onto the bare-metal host, configuring static network parameters (e.g., 192.168.1.10/24, Gateway 192.168.1.1).
  4. Access the web administration console via https://192.168.1.10:8006.
Enterprise Repository Cleanup

On standard homelab installations without an active subscription, disable the enterprise apt list and activate the pve-no-subscription repository in /etc/apt/sources.list.d/pve-enterprise.list to ensure you receive kernel security updates.


Step 2: Virtual Networking & Bridge Configuration

Configure network segregation inside /etc/network/interfaces on the Proxmox host:

  • vmbr0 (Public Bridge): Bridges the physical NIC for external internet connectivity and upstream LAN routing.
  • vmbr1 (Internal Isolated Bridge): A private, non-routable virtual network (10.10.10.0/24) for intra-VM database queries and backend API traffic.
TEXT
auto lo
iface lo inet loopback

iface enp3s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.1.10/24
        gateway 192.168.1.1
        bridge-ports enp3s0
        bridge-stp off
        bridge-fd 0

auto vmbr1
iface vmbr1 inet static
        address 10.10.10.1/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0

Step 3: Infrastructure Automation with Ansible

Install Ansible on mgmt-controller to manage all instances declaratively:

BASH
sudo apt update && sudo apt install -y ansible

Define your centralized inventory file (/opt/ansible/inventories/hosts.yml):

YAML
all:
  children:
    web_servers:
      hosts:
        app-dev:
          ansible_host: 192.168.1.101
        app-stage:
          ansible_host: 192.168.1.102
        app-prod:
          ansible_host: 192.168.1.103
    database_servers:
      hosts:
        data-core:
          ansible_host: 10.10.10.50
    edge_proxies:
      hosts:
        proxy-edge:
          ansible_host: 192.168.1.100
  vars:
    ansible_user: sysadmin
    ansible_ssh_private_key_file: ~/.ssh/id_ed25519

Create a baseline web server deployment playbook (playbooks/configure_web.yml):

YAML
---
- name: Configure Web Nodes with Docker Runtime
  hosts: web_servers
  become: true
  tasks:
    - name: Install prerequisite packages
      apt:
        name:
          - ca-certificates
          - curl
          - gnupg
        state: present
        update_cache: true

    - name: Ensure Docker service is running
      systemd:
        name: docker
        state: started
        enabled: true

Step 4: Continuous Integration Pipeline with Jenkins

Install the Jenkins automation server on mgmt-controller:

BASH
# Add official Jenkins repository key
curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | \
  sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null

echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian binary/ | \
  sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null

sudo apt update && sudo apt install -y jenkins
sudo systemctl enable --now jenkins

Access the Jenkins controller at http://192.168.1.11:8080 to complete the initial setup.

Declarative Pipeline Pattern (Jenkinsfile)

Commit this pipeline definition into your application repositories to automate test, build, and deploy cycles:

GROOVY
pipeline {
    agent any
    stages {
        stage('Lint & Test') {
            steps {
                sh 'npm ci'
                sh 'npm run lint'
                sh 'npm test'
            }
        }
        stage('Build OCI Container') {
            steps {
                sh 'docker build -t registry.local/webapp:${BUILD_NUMBER} .'
                sh 'docker push registry.local/webapp:${BUILD_NUMBER}'
            }
        }
        stage('Deploy to Staging') {
            steps {
                sh 'ansible-playbook -i /opt/ansible/inventories/hosts /opt/ansible/playbooks/deploy_stage.yml --extra-vars "build_tag=${BUILD_NUMBER}"'
            }
        }
    }
}

Step 5: Edge Routing & Reverse Proxy with Nginx

On proxy-edge, route incoming traffic to your respective environment pools:

NGINX
upstream staging_backend {
    server 192.168.1.102:3000;
}

upstream production_backend {
    server 192.168.1.103:3000;
}

server {
    listen 80;
    server_name stage.lab.local;

    location / {
        proxy_pass http://staging_backend;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

server {
    listen 80;
    server_name prod.lab.local;

    location / {
        proxy_pass http://production_backend;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Step 6: Telemetry, Observability & Health Monitoring

Deploy Prometheus and Grafana on telemetry-ops to track host resource usage across every virtual node:

  1. Install prometheus-node-exporter across all VMs via Ansible.
  2. Configure Prometheus scrapers to poll nodes at 15-second intervals.
  3. Import the Node Exporter Full dashboard (Grafana Dashboard ID 1860) to visualize CPU utilization, memory pressure, disk I/O latency, and network throughput across your cluster in real time.

Summary & Architectural Lessons

By structuring your Proxmox homelab into distinct, automated layers:

  • Zero manual configuration: Everything from operating system configuration to Nginx proxy routes is stored in Git.
  • Fail-safe staging: Development builds can fail without impacting production or the management controller.
  • True cloud parity: Workflows developed in this environment can be transitioned directly to AWS, Azure, Oracle Cloud, DigitalOcean or bare-metal production without redesigning architectures.
Found this architecture guide useful?Share this dispatch with your engineering team
Share:𝕏 PostLinkedIn
Field Engineering Dispatches

Production Runbooks & Architecture Notes

Monthly technical dispatches covering Linux VPS hardening, strict DMARC deliverability, Next.js optimization, and cloud operations. Zero sales fluff.

DevOps & Clustering

Need Zero-Downtime Container Deployments?

We design high-availability Docker Swarm and Proxmox LXC clusters on cost-effective global VPS providers, reducing your cloud bills by up to 50% without vendor lock-in.