Skip to content

xgueret/proxmox-vms

Repository files navigation

🚀 Proxmox VM Automation Project

Stars Last CommitStatus License Terraform Ansible

This project provides Terraform and Ansible automation for managing virtual machines in a Proxmox VE environment.

🌟 Features

  • Infrastructure as Code: Complete VM lifecycle management
  • Modular Design: Reusable components for different use cases
  • Secure Practices: Encrypted secrets and pre-commit checks
  • Multi-project Support: Various infrastructure components

📋 Prerequisites

  • Terraform (≥ 1.11.0)
  • Ansible
  • Proxmox VE cluster
  • Python 3.8+
  • Pre-commit (for development)

🏗️ Project Structure

.
├── modules/ # Reusable Terraform modules
├── projects/ # Infrastructure projects
├── github/ # GitHub repository management
├── ansible.cfg # Ansible configuration
├── .pre-commit-config.yaml # Git hooks
└── requirements.txt # Python dependencies

🔐 Security

  • Sensitive data encrypted with Ansible Vault
  • Pre-commit hooks verify encryption
  • Secure API token handling
  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt
    pre-commit install
    
  3. Configure your Proxmox credentials
  4. Navigate to the desired project directory

🚦 Getting Started

🛠️ Usage in each project

1. VM Provisioning with Terraform

  1. **Go to the **terraform/ directory
  2. **Create a **terraform.tfvars file with your variables (example below)
  3. Run:
    terraform init
    terraform plan
    terraform apply
    
    

2. Configuration with Ansible

  1. **Go to the **ansible/ directory
  2. Configure variables in:
    • group_vars/project_name/vault/main.yml (encrypted with ansible-vault)
    • roles/.../vars/main.yml
  3. Run the playbook:
    ansible-playbook deploy.yml
    

📂 Projects

🦖 DNSzilla

Location: projects/dnszilla/ Automates deployment of PowerDNS server with PowerDNS-Admin web interface. Includes:

  • Terraform VM provisioning
  • Ansible configuration for DNS services
  • MySQL backend integration

⚛️ Neutron

Location: projects/neutron/
Description: Complete containerization stack with reverse proxy and management tools for homelab environments.

Core Components:

  • Traefik: Reverse proxy with automatic SSL certificates
  • Portainer Agent: Docker container management
  • Homer: Customizable dashboard for homelab services
  • Excalidraw: Collaborative whiteboarding tool
  • Planka: Open-source Trello alternative
  • PostgreSQL: Database backend for applications

Key Features:

  • Terraform-provisioned VM optimized for container workloads
  • Secure Docker installation with proper user permissions
  • Automated service deployment via Docker Compose
  • Centralized authentication via Traefik middleware
  • Service discovery through Docker provider
  • Let's Encrypt integration for automatic HTTPS

Technical Stack:

  • Provisioning: Terraform
  • Configuration: Ansible
  • Container Runtime: Docker with Compose plugin
  • Reverse Proxy: Traefik v2.5
  • Database: PostgreSQL

🐳 kubeBeast

Location: projects/kubeBeast/
Description: Automated deployment of a Kubernetes cluster with all necessary components for container orchestration.

Core Components:

  • Kubernetes Control Plane: Master node for cluster management
  • Worker Nodes: Scalable worker nodes for running containers
  • Container Runtime: Containerd for efficient container execution
  • CNI Plugins: Networking components for pod communication
  • Monitoring: Metrics server for resource tracking

Key Features:

  • Terraform-provisioned VMs optimized for Kubernetes
  • Ansible-automated cluster initialization
  • Secure container runtime with Containerd
  • Calico networking for pod-to-pod communication
  • Kubernetes dashboard for cluster management
  • Metrics server for resource monitoring

👥 Contributors

  • Author: Xavier GUERET GitHub followersTwitter FollowLinkedIn

🤝 Contributing

**Contributions are welcome! Please feel free to submit a **Pull Request.

About

Managed by Terraform:[HomeLab] proxmox-vms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published