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
This commit is contained in:
204
docs/proxmox/SCRIPT_REFERENCE.md
Normal file
204
docs/proxmox/SCRIPT_REFERENCE.md
Normal file
@@ -0,0 +1,204 @@
|
||||
# Proxmox Deployment - Script Reference
|
||||
|
||||
**Last Updated**: 2024-12-19
|
||||
|
||||
## Overview
|
||||
|
||||
This document provides a complete reference for all deployment and utility scripts.
|
||||
|
||||
## Script Categories
|
||||
|
||||
### Deployment Scripts
|
||||
|
||||
#### `quick-deploy.sh`
|
||||
**Purpose**: Interactive full deployment
|
||||
**Usage**: `./scripts/quick-deploy.sh`
|
||||
**Description**: Guides through all deployment steps interactively
|
||||
|
||||
#### `deploy-crossplane-provider.sh`
|
||||
**Purpose**: Deploy Crossplane provider to Kubernetes
|
||||
**Usage**: `./scripts/deploy-crossplane-provider.sh`
|
||||
**Options**:
|
||||
- `BUILD_PROVIDER=false` - Skip building provider
|
||||
- `NAMESPACE=crossplane-system` - Target namespace
|
||||
|
||||
#### `deploy-test-vms.sh`
|
||||
**Purpose**: Deploy test VMs to both instances
|
||||
**Usage**: `./scripts/deploy-test-vms.sh`
|
||||
**Options**:
|
||||
- `WAIT_TIMEOUT=300` - Timeout in seconds
|
||||
|
||||
### Setup Scripts
|
||||
|
||||
#### `setup-dns-records.sh`
|
||||
**Purpose**: Create DNS records via Cloudflare API
|
||||
**Usage**:
|
||||
```bash
|
||||
export CLOUDFLARE_ZONE_ID="zone-id"
|
||||
export CLOUDFLARE_API_TOKEN="token"
|
||||
./scripts/setup-dns-records.sh
|
||||
```
|
||||
|
||||
#### `setup-proxmox-agents.sh`
|
||||
**Purpose**: Install agents on Proxmox nodes
|
||||
**Usage**:
|
||||
```bash
|
||||
SITE=us-sfvalley NODE=ML110-01 ./scripts/setup-proxmox-agents.sh
|
||||
```
|
||||
|
||||
#### `setup-monitoring.sh`
|
||||
**Purpose**: Configure Prometheus and Grafana
|
||||
**Usage**: `./scripts/setup-monitoring.sh`
|
||||
|
||||
#### `setup-dev-environment.sh`
|
||||
**Purpose**: Set up development environment
|
||||
**Usage**: `./scripts/setup-dev-environment.sh`
|
||||
|
||||
### Verification Scripts
|
||||
|
||||
#### `verify-provider-deployment.sh`
|
||||
**Purpose**: Verify provider deployment status
|
||||
**Usage**: `./scripts/verify-provider-deployment.sh`
|
||||
|
||||
#### `test-proxmox-connectivity.sh`
|
||||
**Purpose**: Test Proxmox connectivity and authentication
|
||||
**Usage**:
|
||||
```bash
|
||||
export PROXMOX_TOKEN='user@realm!token-id=token-secret'
|
||||
./scripts/test-proxmox-connectivity.sh
|
||||
```
|
||||
|
||||
#### `validate-configs.sh`
|
||||
**Purpose**: Validate all configuration files
|
||||
**Usage**: `./scripts/validate-configs.sh`
|
||||
|
||||
#### `check-dependencies.sh`
|
||||
**Purpose**: Check if required dependencies are installed
|
||||
**Usage**: `./scripts/check-dependencies.sh`
|
||||
|
||||
### Utility Scripts
|
||||
|
||||
#### `create-proxmox-secret.sh`
|
||||
**Purpose**: Create Kubernetes secret for credentials
|
||||
**Usage**: `./scripts/create-proxmox-secret.sh`
|
||||
|
||||
#### `discover-proxmox-resources.sh`
|
||||
**Purpose**: Discover Proxmox resources
|
||||
**Usage**: `./scripts/discover-proxmox-resources.sh`
|
||||
|
||||
## Script Execution Order
|
||||
|
||||
### Initial Deployment
|
||||
|
||||
1. **Check Dependencies**
|
||||
```bash
|
||||
./scripts/check-dependencies.sh
|
||||
```
|
||||
|
||||
2. **Validate Configurations**
|
||||
```bash
|
||||
./scripts/validate-configs.sh
|
||||
```
|
||||
|
||||
3. **Test Connectivity**
|
||||
```bash
|
||||
./scripts/test-proxmox-connectivity.sh
|
||||
```
|
||||
|
||||
4. **Setup DNS**
|
||||
```bash
|
||||
./scripts/setup-dns-records.sh
|
||||
```
|
||||
|
||||
5. **Deploy Provider**
|
||||
```bash
|
||||
./scripts/deploy-crossplane-provider.sh
|
||||
```
|
||||
|
||||
6. **Create Secret**
|
||||
```bash
|
||||
./scripts/create-proxmox-secret.sh
|
||||
```
|
||||
|
||||
7. **Apply ProviderConfig**
|
||||
```bash
|
||||
kubectl apply -f crossplane-provider-proxmox/examples/provider-config.yaml
|
||||
```
|
||||
|
||||
8. **Verify Deployment**
|
||||
```bash
|
||||
./scripts/verify-provider-deployment.sh
|
||||
```
|
||||
|
||||
9. **Deploy Test VMs**
|
||||
```bash
|
||||
./scripts/deploy-test-vms.sh
|
||||
```
|
||||
|
||||
10. **Setup Monitoring**
|
||||
```bash
|
||||
./scripts/setup-monitoring.sh
|
||||
```
|
||||
|
||||
### Or Use Quick Deploy
|
||||
|
||||
```bash
|
||||
./scripts/quick-deploy.sh
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
### Cloudflare
|
||||
- `CLOUDFLARE_ZONE_ID` - Cloudflare zone ID
|
||||
- `CLOUDFLARE_API_TOKEN` - Cloudflare API token
|
||||
- `DOMAIN` - Domain name (default: sankofa.nexus)
|
||||
|
||||
### Proxmox
|
||||
- `PROXMOX_USERNAME` - Proxmox username
|
||||
- `PROXMOX_PASSWORD` - Proxmox password
|
||||
- `PROXMOX_TOKEN` - Proxmox API token
|
||||
|
||||
### Kubernetes
|
||||
- `NAMESPACE` - Target namespace (default: crossplane-system)
|
||||
- `BUILD_PROVIDER` - Build provider (default: true)
|
||||
|
||||
## Script Output
|
||||
|
||||
All scripts provide:
|
||||
- Color-coded output (green=success, red=error, yellow=warning)
|
||||
- Timestamped logs
|
||||
- Clear error messages
|
||||
- Exit codes (0=success, non-zero=failure)
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Script Fails with "command not found"
|
||||
```bash
|
||||
# Check if script is executable
|
||||
chmod +x scripts/*.sh
|
||||
|
||||
# Check dependencies
|
||||
./scripts/check-dependencies.sh
|
||||
```
|
||||
|
||||
### Script Fails with Permission Denied
|
||||
```bash
|
||||
# Make script executable
|
||||
chmod +x scripts/<script-name>.sh
|
||||
```
|
||||
|
||||
### Validation Script Fails
|
||||
```bash
|
||||
# Install yamllint
|
||||
pip3 install yamllint
|
||||
|
||||
# Or use Python validation
|
||||
python3 -c "import yaml; yaml.safe_load_all(open('file.yaml'))"
|
||||
```
|
||||
|
||||
## Related Documentation
|
||||
|
||||
- [Quick Start Guide](./QUICK_START.md)
|
||||
- [Deployment Checklist](./DEPLOYMENT_CHECKLIST.md)
|
||||
- [Development Guide](./DEVELOPMENT.md)
|
||||
|
||||
Reference in New Issue
Block a user