3.0 KiB
3.0 KiB
Cluster Configurations
This directory contains cluster configuration definitions for the provisioning system. Clusters represent complete deployments that combine multiple task services and infrastructure components.
Available Clusters
Web Cluster (web/)
Purpose: Basic web service cluster deployment
- Configuration: Simple web service with configurable name validation
- Dependencies: None (self-contained)
- Use Case: Basic web applications and static sites
OCI Registry (oci-reg/)
Purpose: Full OCI-compliant container registry deployment
- Configuration: Comprehensive container registry with storage, security, and networking
- Features:
- Multiple storage drivers with deduplication and garbage collection
- Authentication via htpasswd and TLS support
- UI interface and search capabilities
- Registry synchronization and CVE scanning
- Structured logging and monitoring
- Dependencies: Requires provisioning module base schemas
- Use Case: Private container registries for Kubernetes clusters
Planned Clusters
- buildkit: Container build infrastructure
- cdci-argocd: GitOps CD pipeline with ArgoCD
- cdci-tekton: CI/CD with Tekton pipelines
- git: Git repository hosting
- pod_repo: Pod repository management
- postgresql: Database cluster
- repository: General repository services
Usage
Creating a Cluster
# Using the main CLI
provisioning/core/cli/provisioning cluster create <cluster-name> <infra-name>
# Using workflow system
nu -c "use core/nulib/workflows/cluster.nu *; cluster create '<cluster-name>' '<infra-name>' --check"
Listing Clusters
provisioning/core/cli/provisioning cluster list
Deleting a Cluster
nu -c "use core/nulib/workflows/cluster.nu *; cluster delete '<cluster-name>' '<infra-name>' --check"
Configuration Structure
Cluster configurations are defined using KCL schemas:
schema ClusterName:
name: str = "cluster-name"
# Cluster-specific configuration
check:
len(name) > 0, "Cluster name cannot be empty"
Integration
Clusters integrate with:
- Providers: AWS, UpCloud, Local for infrastructure provisioning
- Task Services: Container runtimes, networking, storage, monitoring
- Orchestrator: Workflow management and coordination
- Configuration System: KCL schema validation and type safety
Development
Adding a New Cluster
- Create cluster directory:
mkdir <cluster-name> - Create KCL directory:
mkdir <cluster-name>/kcl - Define cluster schema:
<cluster-name>/kcl/<cluster-name>.k - Add module definition:
<cluster-name>/kcl/kcl.mod - Update cluster registry in main provisioning module
KCL Module Structure
[package]
name = "cluster-name"
edition = "v0.11.2"
version = "0.0.1"
[dependencies]
provisioning = { path = "../../../kcl", version = "0.0.1" }
For more information, see the main provisioning documentation.