ProxShift

OpenShift clusters on Proxmox made simple


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

ProxShift Modular Task Structure

Overview

ProxShift has been restructured with modular tasks for better granular control over the cluster deployment workflow. This allows you to run specific parts of the deployment process independently.

Task Files

Preparation and Validation

tasks/install_prep.yml

Purpose: Validation and preparation

Tags: always, manifests, create_iso

Manifest and ISO Creation

tasks/generate_manifests.yml

Purpose: OpenShift manifest generation only

Tags: manifests

tasks/create_iso.yml

Purpose: Bootable ISO creation only

Tags: create_iso

Installation Process

tasks/installation.yml

Purpose: Installation orchestration

Tags: install, vault, cluster_login

tasks/wait_for_installation.yml

Purpose: Installation waiting only

Tags: install

tasks/store_credentials.yml

Purpose: Vault credential storage

Tags: vault

tasks/cluster_login.yml

Purpose: Reusable cluster authentication

Tags: cluster_login, eso, gitops, acm_import

Usage Examples

Generate Manifests Only

# Using ps.* functions
source proxshift.sh
ps.generate_manifests my-cluster

# Using ansible directly
ansible-playbook site.yaml -e cluster_name=my-cluster --tags=manifests

Create ISO Only (manifests must exist)

# Using ansible directly  
ansible-playbook site.yaml -e cluster_name=my-cluster --tags=create_iso

Installation Only (VMs already running)

# Wait for installation + store credentials + login
ansible-playbook site.yaml -e cluster_name=my-cluster --tags=install,vault,cluster_login

Store Credentials Only

# Store existing credentials in Vault
ansible-playbook site.yaml -e cluster_name=my-cluster --tags=vault

Full Workflow (traditional)

# Using ps.* functions
source proxshift.sh
ps.provision my-cluster

# Using ansible directly
ansible-playbook site.yaml -e cluster_name=my-cluster

Custom Workflow

# 1. Generate manifests
ansible-playbook site.yaml -e cluster_name=my-cluster --tags=manifests

# 2. Customize manifests manually
# Edit files in ocp_install/my-cluster/

# 3. Create ISO with customized manifests  
ansible-playbook site.yaml -e cluster_name=my-cluster --tags=create_iso

# 4. Continue with VM provisioning
ansible-playbook site.yaml -e cluster_name=my-cluster --tags=vm_create,vm_start

# 5. Wait for installation
ansible-playbook site.yaml -e cluster_name=my-cluster --tags=install,vault,cluster_login

Reusable Cluster Login

Login to Newly Provisioned Cluster

- name: "Login to newly provisioned cluster"
  ansible.builtin.include_tasks:
    file: tasks/cluster_login.yml
  vars:
    login_cluster_name: ""
    login_cluster_api_url: ""
    login_auth_method: "kubeadmin"

Login to ACM Hub Cluster

- name: "Login to ACM hub for import operations"
  ansible.builtin.include_tasks:
    file: tasks/cluster_login.yml
  vars:
    login_cluster_name: ""
    login_cluster_api_url: ""
    login_auth_method: "kubeadmin"

Benefits

Granular Control

Development Workflow

πŸ“ Customization

Efficiency

πŸ”„ Reusability

Workflow Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  install_prep   β”‚ ← Always runs (validation & setup)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚generate_manifestsβ”‚ ← --tags=manifests
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   create_iso    β”‚ ← --tags=create_iso  
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   VM Creation   β”‚ ← Continue with rest of workflow
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  installation   β”‚ ← Installation orchestration
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β”œβ”€β†’ wait_for_installation
          β”œβ”€β†’ store_credentials  
          └─→ cluster_login

Migration from Previous Version

Before (monolithic):

After (modular):

No Breaking Changes: Existing ps.provision workflow remains identical.

Error Handling

Missing Manifests

If you try to create ISO without manifests:

TASK [Fail if required manifest files are missing] ***
fatal: [localhost]: FAILED! => 
  msg: |
    Required manifest file 'install-config.yaml' not found.
    
    Generate manifests first:
      - Run with 'manifests' tag: --tags=manifests  
      - Or use ps.generate_manifests function

Installation Timeout

TASK [Check installation status] ***
fatal: [localhost]: FAILED! => 
  msg: |
    βœ— Installation timed out after 3600 seconds.
    
    Troubleshooting:
      - Check logs in: ocp_install/my-cluster
      - Review agent.x86_64.iso boot process
      - Verify network connectivity and DNS
      - Check Proxmox VM console for errors

Failed Cluster Login

TASK [Verify cluster login success] ***
  msg: |
    βœ— Login failed for cluster: my-cluster
    Check cluster status and credentials

This provides clear guidance on what steps are needed and how to troubleshoot issues.