ProxShift

OpenShift clusters on Proxmox made simple


Project maintained by randyoyarzabal Hosted on GitHub Pages — Theme by mattgraham

ProxShift Function Reference

Overview

ProxShift provides a modern ps.* function interface for managing OpenShift clusters on Proxmox. All functions support the --dry-run flag to preview commands before execution.

Loading Functions

The main script is now located in the project root for easy access:

# From project root
source proxshift.sh

# Or from anywhere with PROXSHIFT_ROOT set
source $PROXSHIFT_ROOT/proxshift.sh

Core Functions

ps.clusters

List all available clusters from inventory.

ps.clusters

ps.validate_cluster

Validate that a cluster exists in the inventory.

ps.validate_cluster <cluster_name>

ps.root

Change to the ProxShift project root directory.

ps.root

Cluster Management

ps.provision

Complete cluster provisioning workflow (recommended for most users).

ps.provision <cluster_name> [--dry-run]

ps.generate_manifests

Generate OpenShift install manifests only (useful for customization).

ps.generate_manifests <cluster_name> [--dry-run]

VM Lifecycle

ps.start

Start VMs for a cluster.

ps.start <cluster_name> [--dry-run]

ps.deprovision

Delete VMs for a cluster.

ps.deprovision <cluster_name> [--dry-run]

Post-Installation

ps.post

Run post-installation tasks (storage labels, certificates, etc.).

ps.post <cluster_name> [--dry-run]

ps.acm_import

Import cluster to ACM hub.

ps.acm_import <cluster_name> [--dry-run]

ps.backup_certs

Backup certificate secrets from EXISTING cluster.

ps.backup_certs [--dry-run]

Backs up:

Files saved to: $gitops_root/backups/ using format: {namespace}-{secret-name}.yaml

ps.restore_certs

Restore certificate secrets to REBUILT cluster.

ps.restore_certs [--dry-run]

Restores:

Files read from: $gitops_root/backups/ using format: {namespace}-{secret-name}.yaml

GitOps and Vault

ps.gitops

Apply GitOps configuration.

ps.gitops <cluster_name> [--dry-run]

ps.gitops_loop

Run GitOps reconciliation loop for specified cluster.

ps.gitops_loop [--dry-run]

ps.vault

Store cluster credentials in Vault.

ps.vault <cluster_name> [--dry-run]

Advanced Operations

ps.force

Force complete cluster deployment with timing.

ps.force <cluster_name> [extra_args] [--dry-run]

ps.force_nohub

Force deployment without ACM import.

ps.force_nohub <cluster_name> [extra_args] [--dry-run]

ps.force_blank

Force deployment with minimal components (blank cluster).

ps.force_blank <cluster_name> [extra_args] [--dry-run]

Installation Monitoring

ps.install_watch

Watch OpenShift installation progress.

ps.install_watch <cluster_name>

Environment Variables

Variable Default Description
PROXSHIFT_ROOT $(pwd) Project root directory
PROXSHIFT_VAULT_PASS ${PROXSHIFT_ROOT}/config/.vault_pass Ansible vault password file
PROXSHIFT_GITOPS_ROOT ${HOME}/gitops GitOps directory for install_watch

Examples

Complete Cluster Deployment

# Preview the full deployment
ps.provision my-cluster --dry-run

# Execute the deployment
ps.provision my-cluster

Manifest Generation Only

# Generate manifests for customization
ps.generate_manifests my-cluster

# Review generated files
ls ocp_install/my-cluster/

Blank Cluster (No GitOps/ACM)

# Deploy minimal cluster
ps.force_blank my-cluster

Post-Installation Tasks

# Apply storage labels, backup certs, configure GitOps
ps.post my-cluster

Dry Run Mode

All functions support --dry-run mode to preview commands:

ps.provision my-cluster --dry-run
# Output:
# 🧪 DRY RUN - Command that would be executed:
#    ansible-playbook site.yaml -e cluster_name=my-cluster -e force_install=true --skip-tags=backup,restore

Migration from ocp.* Functions

Old Function New Function Notes
ocp.list_clusters ps.clusters Modern name
ocp.provision ps.provision Same functionality
ocp.ansible_* ps.* Removed “ansible” prefix
ocp.generate_templates ps.generate_manifests Renamed for clarity

The new ps.* functions provide the same functionality with cleaner naming conventions.