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:
defiQUG
2025-12-12 18:01:35 -08:00
parent e01131efaf
commit 9daf1fd378
968 changed files with 160890 additions and 1092 deletions

View File

@@ -1,11 +1,11 @@
apiVersion: proxmox.yourorg.io/v1alpha1
apiVersion: proxmox.sankofa.nexus/v1alpha1
kind: ProxmoxVM
metadata:
name: web-server-01
namespace: default
spec:
forProvider:
node: pve1
node: ML110-01
name: web-server-01
cpu: 4
memory: 8Gi
@@ -13,14 +13,139 @@ spec:
storage: local-lvm
network: vmbr0
image: ubuntu-22.04-cloud
site: us-east-1
site: us-sfvalley
userData: |
#cloud-config
# Package management
package_update: true
package_upgrade: true
# Required packages
packages:
- qemu-guest-agent
- curl
- wget
- net-tools
- chrony
- unattended-upgrades
# Time synchronization (NTP)
ntp:
enabled: true
ntp_client: chrony
servers:
- 0.pool.ntp.org
- 1.pool.ntp.org
- 2.pool.ntp.org
- 3.pool.ntp.org
# User configuration
users:
- name: admin
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2E...
sshKeys:
- ssh-rsa AAAAB3NzaC1yc2E...
groups: sudo
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
lock_passwd: false
# Note: Add SSH keys via userData or use Proxmox API to inject keys
# ssh_authorized_keys:
# - ssh-rsa YOUR_PUBLIC_SSH_KEY_HERE
# Boot commands - executed in order
runcmd:
# Verify packages are installed
- |
echo "=========================================="
echo "Verifying required packages are installed..."
echo "=========================================="
for pkg in qemu-guest-agent curl wget net-tools chrony unattended-upgrades; do
if ! dpkg -l | grep -q "^ii.*$pkg"; then
echo "ERROR: Package $pkg is not installed"
exit 1
fi
echo "✅ Package $pkg is installed"
done
echo "All required packages verified"
# Verify qemu-guest-agent package details
- |
echo "=========================================="
echo "Checking qemu-guest-agent package details..."
echo "=========================================="
if dpkg -l | grep -q "^ii.*qemu-guest-agent"; then
echo "✅ qemu-guest-agent package IS installed"
dpkg -l | grep qemu-guest-agent
else
echo "❌ qemu-guest-agent package is NOT installed"
echo "Attempting to install..."
apt-get update
apt-get install -y qemu-guest-agent
fi
# Enable and start QEMU Guest Agent
- |
echo "=========================================="
echo "Enabling and starting QEMU Guest Agent..."
echo "=========================================="
systemctl enable qemu-guest-agent
systemctl start qemu-guest-agent
echo "QEMU Guest Agent enabled and started"
# Verify guest agent service is running
- |
echo "=========================================="
echo "Verifying QEMU Guest Agent service status..."
echo "=========================================="
for i in {1..30}; do
if systemctl is-active --quiet qemu-guest-agent; then
echo "✅ QEMU Guest Agent service IS running"
systemctl status qemu-guest-agent --no-pager -l
exit 0
fi
echo "Waiting for QEMU Guest Agent to start... ($i/30)"
sleep 1
done
echo "⚠️ WARNING: QEMU Guest Agent may not have started properly"
systemctl status qemu-guest-agent --no-pager -l || true
echo "Attempting to restart..."
systemctl restart qemu-guest-agent
sleep 3
if systemctl is-active --quiet qemu-guest-agent; then
echo "✅ QEMU Guest Agent started after restart"
else
echo "❌ QEMU Guest Agent failed to start"
fi
# Configure NTP (Chrony)
- |
echo "Configuring NTP (Chrony)..."
systemctl enable chrony
systemctl restart chrony
sleep 3
if systemctl is-active --quiet chrony; then
echo "NTP (Chrony) is running"
chronyc tracking | head -1 || true
else
echo "WARNING: NTP (Chrony) may not be running"
fi
# Final message
final_message: |
==========================================
System Boot Completed Successfully!
==========================================
Services Status:
- QEMU Guest Agent: $(systemctl is-active qemu-guest-agent)
- NTP (Chrony): $(systemctl is-active chrony)
System Information:
- Hostname: $(hostname)
- IP Address: $(hostname -I | awk '{print $1}')
- Time: $(date)
Packages Installed:
- qemu-guest-agent, curl, wget, net-tools
- chrony (NTP), unattended-upgrades (Security)
==========================================
providerConfigRef:
name: proxmox-provider-config

View File

@@ -9,36 +9,43 @@ spec:
name: vm-connection-secret
namespace: crossplane-system
compositeTypeRef:
apiVersion: proxmox.yourorg.io/v1alpha1
kind: ProxmoxVM
apiVersion: proxmox.sankofa.nexus/v1alpha1
kind: VirtualMachine
resources:
- name: proxmox-vm
base:
apiVersion: proxmox.yourorg.io/v1alpha1
apiVersion: proxmox.sankofa.nexus/v1alpha1
kind: ProxmoxVM
metadata:
labels:
tenant-id: "TENANT_ID_PLACEHOLDER"
managed-by: sankofa-phoenix
spec:
forProvider:
node: pve1
node: ML110-01
cpu: 2
memory: 4Gi
disk: 50Gi
storage: local-lvm
network: vmbr0
image: ubuntu-22.04-cloud
site: us-east-1
site: us-sfvalley
patches:
- type: FromCompositeFieldPath
fromFieldPath: spec.forProvider.name
fromFieldPath: spec.parameters.name
toFieldPath: spec.forProvider.name
- type: FromCompositeFieldPath
fromFieldPath: spec.forProvider.cpu
fromFieldPath: spec.parameters.cpu
toFieldPath: spec.forProvider.cpu
- type: FromCompositeFieldPath
fromFieldPath: spec.forProvider.memory
fromFieldPath: spec.parameters.memory
toFieldPath: spec.forProvider.memory
- type: FromCompositeFieldPath
fromFieldPath: spec.forProvider.disk
fromFieldPath: spec.parameters.disk
toFieldPath: spec.forProvider.disk
- type: FromCompositeFieldPath
fromFieldPath: spec.forProvider.site
fromFieldPath: spec.parameters.site
toFieldPath: spec.forProvider.site
- type: FromCompositeFieldPath
fromFieldPath: metadata.labels['tenant-id']
toFieldPath: metadata.labels['tenant-id']

View File

@@ -1,9 +1,9 @@
apiVersion: apiextensions.crossplane.io/v1
kind: CompositeResourceDefinition
metadata:
name: virtualmachines.proxmox.yourorg.io
name: virtualmachines.proxmox.sankofa.nexus
spec:
group: proxmox.yourorg.io
group: proxmox.sankofa.nexus
names:
kind: VirtualMachine
plural: virtualmachines