Proxmox GitOps provides a robust CI/CD environment for automating the provisioning and management of Linux Containers in Proxmox VE. With an Infrastructure-as-Code approach, it simplifies lifecycle management—bootstrapping, deploying, configuring, and validating containers—all through automated, version-controlled processes.
Proxmox GitOps is a robust solution for automating the lifecycle of Linux Containers (LXC) in Proxmox VE, utilizing a self-sufficient, extensible CI/CD environment. By adopting an Infrastructure-as-Code (IaC) approach, this project streamlines the processes of provisioning, configuring, and orchestrating containers through version-controlled automation.
This project facilitates automated management of container infrastructure, ensuring consistent and reproducible deployments. With Proxmox GitOps, the entire lifecycle—from bootstrapping and deployment to configuration and validation—is effectively managed.
The architecture comprises a multi-stage pipeline that can recursively deploy and configure itself, ensuring a seamless transition from local development to production environments. The initial setup occurs via a local Docker environment, with further deployments targeting Proxmox VE.
local/.config.json.local/run.sh.Create reusable container definitions in the libs folder, and follow these steps:
config.env file, such as:
IP=192.168.178.42
ID=42
HOSTNAME=apache
CORES=2
MEMORY=2048
SWAP=512
DISK=local-lvm:8
BOOT=yes
gitea/workflows:
on:
workflow_dispatch:
push:
branches: [ release, main, develop ]
jobs:
include:
runs-on: shell
steps:
- id: init
uses: srv/config/.gitea/workflows@main
with:
repo: ${{ gitea.repository }}
ref: ${{ gitea.ref_name }}
cache_bust: ${{ gitea.run_number }}
# ./libs/apache/recipes/default.rb
package 'apache2'
service 'apache2' do
action [:enable, :start]
end
file '/var/www/html/index.html' do
content "<h1>Hello from #{Env.get(node, 'login')}</h1>"
mode '0644'
owner 'app'
group 'app'
end
Env.get() and Env.set() for environment variables access.release branch of a new repository and adding it to the Meta-/Mono-Repository for deployment.For detailed recommendations, refer to the Wiki.
Proxmox GitOps exemplifies efficient, automated management of containerized environments while supporting a modular and extensible architecture.
No comments yet.
Sign in to be the first to comment.