Initial Phoenix Sankofa Cloud setup
- Complete project structure with Next.js frontend - GraphQL API backend with Apollo Server - Portal application with NextAuth - Crossplane Proxmox provider - GitOps configurations - CI/CD pipelines - Testing infrastructure (Vitest, Jest, Go tests) - Error handling and monitoring - Security hardening - UI component library - Documentation
This commit is contained in:
26
gitops/infrastructure/claims/vm-claim-example.yaml
Normal file
26
gitops/infrastructure/claims/vm-claim-example.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: proxmox.yourorg.io/v1alpha1
|
||||
kind: ProxmoxVM
|
||||
metadata:
|
||||
name: web-server-01
|
||||
namespace: default
|
||||
spec:
|
||||
forProvider:
|
||||
node: pve1
|
||||
name: web-server-01
|
||||
cpu: 4
|
||||
memory: 8Gi
|
||||
disk: 100Gi
|
||||
storage: local-lvm
|
||||
network: vmbr0
|
||||
image: ubuntu-22.04-cloud
|
||||
site: us-east-1
|
||||
userData: |
|
||||
#cloud-config
|
||||
users:
|
||||
- name: admin
|
||||
ssh-authorized-keys:
|
||||
- ssh-rsa AAAAB3NzaC1yc2E...
|
||||
sshKeys:
|
||||
- ssh-rsa AAAAB3NzaC1yc2E...
|
||||
providerConfigRef:
|
||||
name: proxmox-provider-config
|
||||
44
gitops/infrastructure/compositions/vm-ubuntu.yaml
Normal file
44
gitops/infrastructure/compositions/vm-ubuntu.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
apiVersion: apiextensions.crossplane.io/v1
|
||||
kind: Composition
|
||||
metadata:
|
||||
name: vm-ubuntu
|
||||
labels:
|
||||
provider: proxmox
|
||||
spec:
|
||||
writeConnectionSecretsToRef:
|
||||
name: vm-connection-secret
|
||||
namespace: crossplane-system
|
||||
compositeTypeRef:
|
||||
apiVersion: proxmox.yourorg.io/v1alpha1
|
||||
kind: ProxmoxVM
|
||||
resources:
|
||||
- name: proxmox-vm
|
||||
base:
|
||||
apiVersion: proxmox.yourorg.io/v1alpha1
|
||||
kind: ProxmoxVM
|
||||
spec:
|
||||
forProvider:
|
||||
node: pve1
|
||||
cpu: 2
|
||||
memory: 4Gi
|
||||
disk: 50Gi
|
||||
storage: local-lvm
|
||||
network: vmbr0
|
||||
image: ubuntu-22.04-cloud
|
||||
site: us-east-1
|
||||
patches:
|
||||
- type: FromCompositeFieldPath
|
||||
fromFieldPath: spec.forProvider.name
|
||||
toFieldPath: spec.forProvider.name
|
||||
- type: FromCompositeFieldPath
|
||||
fromFieldPath: spec.forProvider.cpu
|
||||
toFieldPath: spec.forProvider.cpu
|
||||
- type: FromCompositeFieldPath
|
||||
fromFieldPath: spec.forProvider.memory
|
||||
toFieldPath: spec.forProvider.memory
|
||||
- type: FromCompositeFieldPath
|
||||
fromFieldPath: spec.forProvider.disk
|
||||
toFieldPath: spec.forProvider.disk
|
||||
- type: FromCompositeFieldPath
|
||||
fromFieldPath: spec.forProvider.site
|
||||
toFieldPath: spec.forProvider.site
|
||||
101
gitops/infrastructure/xrds/virtualmachine.yaml
Normal file
101
gitops/infrastructure/xrds/virtualmachine.yaml
Normal file
@@ -0,0 +1,101 @@
|
||||
apiVersion: apiextensions.crossplane.io/v1
|
||||
kind: CompositeResourceDefinition
|
||||
metadata:
|
||||
name: virtualmachines.proxmox.yourorg.io
|
||||
spec:
|
||||
group: proxmox.yourorg.io
|
||||
names:
|
||||
kind: VirtualMachine
|
||||
plural: virtualmachines
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
served: true
|
||||
referenceable: true
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
type: object
|
||||
properties:
|
||||
spec:
|
||||
type: object
|
||||
properties:
|
||||
parameters:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: Name of the virtual machine
|
||||
node:
|
||||
type: string
|
||||
description: Proxmox node to deploy on
|
||||
cpu:
|
||||
type: integer
|
||||
description: Number of CPU cores
|
||||
default: 2
|
||||
memory:
|
||||
type: string
|
||||
description: Memory in GB (e.g., "4Gi")
|
||||
default: "4Gi"
|
||||
disk:
|
||||
type: string
|
||||
description: Disk size (e.g., "50Gi")
|
||||
default: "50Gi"
|
||||
storage:
|
||||
type: string
|
||||
description: Storage pool name
|
||||
default: "local-lvm"
|
||||
network:
|
||||
type: string
|
||||
description: Network bridge
|
||||
default: "vmbr0"
|
||||
image:
|
||||
type: string
|
||||
description: OS image template
|
||||
default: "ubuntu-22.04-cloud"
|
||||
site:
|
||||
type: string
|
||||
description: Proxmox site identifier
|
||||
required:
|
||||
- name
|
||||
- node
|
||||
- site
|
||||
required:
|
||||
- parameters
|
||||
status:
|
||||
type: object
|
||||
properties:
|
||||
vmId:
|
||||
type: integer
|
||||
state:
|
||||
type: string
|
||||
ipAddress:
|
||||
type: string
|
||||
conditions:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
status:
|
||||
type: string
|
||||
reason:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
additionalPrinterColumns:
|
||||
- name: VMID
|
||||
type: integer
|
||||
jsonPath: .status.vmId
|
||||
- name: STATE
|
||||
type: string
|
||||
jsonPath: .status.state
|
||||
- name: IP
|
||||
type: string
|
||||
jsonPath: .status.ipAddress
|
||||
- name: AGE
|
||||
type: date
|
||||
jsonPath: .metadata.creationTimestamp
|
||||
claimNames:
|
||||
kind: VirtualMachineClaim
|
||||
plural: virtualmachineclaims
|
||||
|
||||
Reference in New Issue
Block a user