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.

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 Component | Recommended Baseline | Production Role |
|---|---|---|
| CPU | 8+ Cores (Intel Core i7/i9 or AMD Ryzen 7/9) | Multi-tenant virtualization & build concurrency |
| Memory | 32 GB – 64 GB DDR4/DDR5 | Host reserve + VM allocations |
| Storage | 1 TB – 2 TB NVMe SSD (ZFS or LVM-thin) | High-IOPS container roots & database volumes |
| Networking | 1 Gbps / 2.5 Gbps Ethernet | Upstream 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:
| Hostname | Type | OS | Role & Services | Memory |
|---|---|---|---|---|
| mgmt-controller | VM | Ubuntu 24.04 LTS | Ansible controller, Jenkins CI master, Git CLI | 4 GB |
| proxy-edge | LXC | Debian 12 Minimal | Nginx reverse proxy, SSL termination, rate limiting | 1 GB |
| app-dev | LXC | Ubuntu 24.04 LTS | Feature branch deployments via Docker Compose | 2 GB |
| app-stage | VM | Rocky Linux 9 | Staging integration environment (RHEL parity) | 4 GB |
| app-prod | VM | Rocky Linux 9 | Production workload instance | 4 GB |
| data-core | VM | Debian 12 Minimal | PostgreSQL / Redis cluster | 4 GB |
| telemetry-ops | LXC | Ubuntu 24.04 LTS | Prometheus, Grafana, Node Exporter metrics | 2 GB |
Step 1: Proxmox VE Hypervisor Installation & Baseline
- Download the latest official Proxmox VE ISO from proxmox.com.
- Flash the installer to a bootable USB drive using Rufus or Balena Etcher.
- Install onto the bare-metal host, configuring static network parameters (e.g.,
192.168.1.10/24, Gateway192.168.1.1). - Access the web administration console via
https://192.168.1.10:8006.
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.
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:
sudo apt update && sudo apt install -y ansible
Define your centralized inventory file (/opt/ansible/inventories/hosts.yml):
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):
---
- 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:
# 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:
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:
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:
- Install
prometheus-node-exporteracross all VMs via Ansible. - Configure Prometheus scrapers to poll nodes at 15-second intervals.
- 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.
Related Technical Dispatches
Production Runbooks & Architecture Notes
Monthly technical dispatches covering Linux VPS hardening, strict DMARC deliverability, Next.js optimization, and cloud operations. Zero sales fluff.
