Files
Sankofa/scripts/PROXMOX_README.md
defiQUG 9daf1fd378 Apply Composer changes: comprehensive API updates, migrations, middleware, and infrastructure improvements
- Add comprehensive database migrations (001-024) for schema evolution
- Enhance API schema with expanded type definitions and resolvers
- Add new middleware: audit logging, rate limiting, MFA enforcement, security, tenant auth
- Implement new services: AI optimization, billing, blockchain, compliance, marketplace
- Add adapter layer for cloud integrations (Cloudflare, Kubernetes, Proxmox, storage)
- Update Crossplane provider with enhanced VM management capabilities
- Add comprehensive test suite for API endpoints and services
- Update frontend components with improved GraphQL subscriptions and real-time updates
- Enhance security configurations and headers (CSP, CORS, etc.)
- Update documentation and configuration files
- Add new CI/CD workflows and validation scripts
- Implement design system improvements and UI enhancements
2025-12-12 18:01:35 -08:00

4.6 KiB

Proxmox Review and Planning Scripts

This directory contains scripts for connecting to Proxmox instances, reviewing configurations, checking status, and generating deployment plans.

Scripts

1. proxmox-review-and-plan.sh (Bash)

A comprehensive bash script that:

  • Connects to both Proxmox instances
  • Reviews current configurations
  • Checks cluster and node status
  • Generates deployment plans
  • Creates detailed task lists

Requirements:

  • curl (required)
  • jq (optional, for better JSON parsing)

Usage:

./scripts/proxmox-review-and-plan.sh

Output: Files are generated in docs/proxmox-review/

2. proxmox-review-and-plan.py (Python)

A Python script with more detailed API interactions:

  • Better error handling
  • More comprehensive status gathering
  • Detailed node information collection

Requirements:

  • Python 3.6+
  • requests library: pip install requests
  • proxmoxer (optional): pip install proxmoxer

Usage:

python3 ./scripts/proxmox-review-and-plan.py

Output: Files are generated in docs/proxmox-review/

Environment Setup

Before running the scripts, ensure your .env file contains:

# Proxmox Instance 1
PROXMOX_1_API_URL=https://192.168.11.10:8006
PROXMOX_1_USER=root
PROXMOX_1_PASS=your-password
PROXMOX_1_API_TOKEN=  # Optional, preferred over password
PROXMOX_1_INSECURE_SKIP_TLS_VERIFY=false

# Proxmox Instance 2
PROXMOX_2_API_URL=https://192.168.11.11:8006
PROXMOX_2_USER=root
PROXMOX_2_PASS=your-password
PROXMOX_2_API_TOKEN=  # Optional, preferred over password
PROXMOX_2_INSECURE_SKIP_TLS_VERIFY=false

Output Files

After running either script, the following files will be generated in docs/proxmox-review/:

  1. Configuration Review (configuration-review-{timestamp}.md)

    • Current environment configuration
    • Crossplane provider configuration
    • Cloudflare tunnel configurations
  2. Deployment Plan (deployment-plan-{timestamp}.md)

    • Phased deployment approach
    • Current status summary
    • Deployment phases and steps
  3. Task List (task-list-{timestamp}.md)

    • Detailed task breakdown
    • Priority levels
    • Task descriptions and actions
  4. Status JSONs (proxmox-{1|2}-status-{timestamp}.json)

    • Cluster status
    • Node information
    • Storage configuration
    • VM listings

Quick Start

  1. Set up environment:

    cp ENV_EXAMPLES.md .env
    # Edit .env with your Proxmox credentials
    
  2. Run review script:

    ./scripts/proxmox-review-and-plan.sh
    
  3. Review output:

    ls -la docs/proxmox-review/
    cat docs/proxmox-review/task-list-*.md
    
  4. Start with high-priority tasks:

    • Verify connectivity (TASK-001, TASK-002)
    • Test authentication (TASK-003, TASK-004)
    • Review configurations (TASK-005, TASK-006, TASK-007)

Troubleshooting

Connection Issues

If you can't connect to Proxmox instances:

  1. Check network connectivity:

    ping 192.168.11.10
    ping 192.168.11.11
    
  2. Test API endpoint:

    curl -k https://192.168.11.10:8006/api2/json/version
    
  3. Verify firewall rules:

    • Port 8006 should be accessible
    • Check if IP is whitelisted in Proxmox

Authentication Issues

  1. Verify credentials:

    • Check username format: user@realm (e.g., root@pam)
    • Verify password is correct
    • Check if account is locked
  2. Use API tokens (recommended):

    • Create token in Proxmox Web UI
    • Use format: user@realm!token-name=token-secret
    • Set in .env as PROXMOX_*_API_TOKEN
  3. Test authentication manually:

    curl -k -X POST \
      -d "username=root@pam&password=your-password" \
      https://192.168.11.10:8006/api2/json/access/ticket
    

Script Errors

  1. Missing dependencies:

    • Install jq: sudo apt install jq (Debian/Ubuntu)
    • Install Python packages: pip install requests proxmoxer
  2. Permission errors:

    • Make scripts executable: chmod +x scripts/*.sh
  3. JSON parsing errors:

    • Install jq for better parsing
    • Check if API responses are valid JSON

Next Steps

After running the review scripts:

  1. Review the generated task list
  2. Start with high-priority connection tasks
  3. Update configurations based on findings
  4. Proceed with Crossplane provider deployment
  5. Set up monitoring and infrastructure

For detailed task information, see TASK_LIST.md.