OpenShift clusters on Proxmox made simple
Deep dive into how ProxShift works under the hood.
┌──────────────────────────────────────────────────────────────┐
│ ProxShift Architecture │
├──────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ User │ │ Ansible │ │ HashiCorp │ │
│ │ Interface │───▶│ Playbooks │───▶│ Vault │ │
│ │ │ │ │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ proxshift.sh│ │ Collection │ │ Secrets │ │
│ │ Commands │ │ Roles │ │ Management │ │
│ │ │ │ │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ Proxmox Infrastructure │ │
│ │ │ │
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │
│ │ │ VM Node 1 │ │ VM Node 2 │ │ VM Node 3 │ │ │
│ │ │ │ │ │ │ │ │ │
│ │ │ OpenShift │ │ OpenShift │ │ OpenShift │ │ │
│ │ │ Master │ │ Master │ │ Worker │ │ │
│ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │
│ └─────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
proxshift.sh)Purpose: Provides easy-to-use commands for cluster operations
Key Functions:
ps.provision - Full cluster provisioningps.generate_manifests - Template generation onlyps.clusters - Show available clustersps.start/ps.deprovision - VM lifecycle managementPortable Design: Works from any directory via PROXSHIFT_ROOT
site.yaml)Workflow:
1. Pre-tasks: Vault secret retrieval
2. Install Preparation: Directory setup, validation
3. Manifest Generation: OpenShift install/agent configs
4. VM Provisioning: Proxmox VM creation
5. Cluster Installation: OpenShift bootstrap
6. Post-Installation: ACM import, GitOps setup
ansible_collections/proxshift/
├── openshift/ # OpenShift management
│ ├── roles/
│ │ ├── acm_import/ # ACM integration
│ │ ├── cluster_auth/ # Cluster authentication
│ │ ├── oc_kubeadmin/ # Kubeadmin authentication
│ │ ├── ocp_manifests/ # OpenShift manifests
│ │ └── secret_management/ # Secret operations
│ └── readme.md # OpenShift collection docs
├── hashi_vault/ # Vault integration
│ ├── roles/
│ │ └── hashicorp_vault/ # Secret retrieval
│ └── readme.md # Vault collection docs
└── proxmox/ # Infrastructure management
├── roles/
│ ├── proxmox_vm/ # VM lifecycle
│ └── vm_lifecycle/ # VM operations
└── readme.md # Proxmox collection docs
# inventory/clusters.yml
cluster_name:
hosts:
node_name:
ip: "x.x.x.x" # Static IP assignment
mac: "xx:xx:xx:xx" # MAC address
role: "master|worker" # Node role
vmid: 100 # Proxmox VM ID
memory: 16384 # RAM in MB
cores: 4 # CPU cores
node: "pve-node1" # Proxmox node
Vault Structure:
secret/data/openshift/
├── registry/
│ └── pull_secret # Container registry credentials
├── access/
│ └── public_key # SSH public key
└── clusters/
├── cluster1/
│ ├── kubeadmin # Admin password
│ ├── kubeconfig # Cluster access config
│ └── api # API URL
└── cluster2/
└── ...
hashicorp_vault rolevault_values dictionaryVM Specifications:
- CPU: Host passthrough for optimal performance
- Memory: Configurable per node role
- Storage: Thin-provisioned disks
- Network: Bridge networking with static IPs
- Boot: UEFI with secure boot
- OS: RHCOS via ISO mounting
1. Environment Validation
├── Check PROXSHIFT_ROOT
├── Validate Ansible collections
├── Verify Vault connectivity
└── Test Proxmox API access
2. Secret Retrieval
├── Connect to HashiCorp Vault
├── Retrieve pull secret
├── Get SSH public key
└── Fetch certificates (if configured)
3. Configuration Preparation
├── Load site configuration
├── Parse cluster inventory
├── Validate node specifications
└── Create output directories
1. Template Processing
├── Detect cluster type (SNO/multi-node)
├── Generate install-config.yaml
├── Create agent-config.yaml
└── Backup previous configs
2. Network Configuration
├── Calculate IP assignments
├── Configure DNS settings
├── Set up cluster networking
└── Define node interfaces
1. VM Creation (per node)
├── Create VM on Proxmox
├── Configure CPU/Memory
├── Attach storage disks
├── Setup network interfaces
└── Mount OpenShift ISO
2. VM Lifecycle
├── Start VMs in sequence
├── Monitor boot process
├── Verify network connectivity
└── Confirm OpenShift agent startup
1. Cluster Bootstrap
├── Monitor installation progress
├── Wait for API availability
├── Validate cluster readiness
└── Extract credentials
2. Credential Storage
├── Store kubeconfig in Vault
├── Save kubeadmin password
├── Record API endpoint
└── Set cluster metadata
1. ACM Integration (if configured)
├── Connect to hub cluster
├── Create ManagedCluster resource
├── Apply cluster labels
└── Import to hub
2. GitOps Setup
├── Configure External Secrets Operator
├── Setup ArgoCD applications
├── Apply cluster policies
└── Enable monitoring
3. Cluster Finalization
├── Apply node labels
├── Configure storage classes
├── Setup ingress routes
└── Validate cluster health
PROXSHIFT_ROOT{# install-config.yaml.j2 #}
# Multi-node configuration
compute:
- name: worker
replicas:
controlPlane:
name: master
replicas:
# Real-time log monitoring
tail -f ocp_install/cluster-name/.openshift_install.log
# Progress tracking
watch "oc get nodes --kubeconfig ocp_install/cluster-name/auth/kubeconfig"
# Cluster readiness
oc get clusterversion,nodes,co
| Cluster Type | VM Creation | OpenShift Install | Total Time |
|---|---|---|---|
| SNO | 2-3 minutes | 45-60 minutes | ~1 hour |
| Compact (3 nodes) | 3-5 minutes | 60-75 minutes | ~1.5 hours |
| Full (6 nodes) | 5-8 minutes | 75-90 minutes | ~2 hours |
| Component | CPU | Memory | Storage |
|---|---|---|---|
| Master Node | 4 cores | 16 GB | 120 GB |
| Worker Node | 8 cores | 32 GB | 500 GB |
| SNO Node | 8 cores | 32 GB | 120 GB |
# Add custom role to appropriate collection
ansible_collections/proxshift/openshift/roles/custom_role/
├── tasks/main.yml
├── defaults/main.yml
├── meta/argument_specs.yml
└── readme.md
# Or for Vault-related functionality:
ansible_collections/proxshift/hashi_vault/roles/custom_vault_role/
# Or for Proxmox-related functionality:
ansible_collections/proxshift/proxmox/roles/custom_proxmox_role/
ProxShift - Where Proxmox meets OpenShift