Skip to main content

PrivateCloud: one-command installer for a Kubernetes-based private cloud (k3s + monitoring + ingress + storage).

Project description

PrivateCloud

PrivateCloud is a Python CLI installer that provisions a Kubernetes-based private cloud stack.

It focuses on fast deployment, repeatable infrastructure, and production-ready defaults.

v0.3.0 Release Notes

New Features

Web-based GUI Dashboard

  • Start with privatecloud gui --port 8080
  • View cluster health (nodes, pods)
  • One-click backup/restore
  • Safe cluster destruction

Backup & Restore

  • privatecloud backup create - Creates full backup to backups/ directory
  • privatecloud backup list - Lists all available backups
  • privatecloud backup restore <name> - Restores from backup
  • privatecloud backup delete <name> - Deletes a backup
  • Backups include: namespace manifests, Terraform state, kubeconfig, privatecloud.yaml

Security Hardening

  • Automatic .gitignore generation on privatecloud init
  • Secret masking in logs and output
  • Environment variable support for secrets (${VAR} syntax)
  • File permission warnings for config files

Enhanced Destroy Command

  • --yes flag for non-interactive use
  • --dry-run to preview destruction
  • --backup/--no-backup to control pre-destruction backup
  • Auto-backup before destruction (configurable)

Features

  • Provider abstraction — bare-metal SSH or Proxmox VE via Terraform
  • Terraform runner — generates, applies, and destroys infrastructure automatically
  • Config auto-write — Terraform outputs (node IPs) are written back to privatecloud.yaml
  • Helm-based service installation — all services deployed natively via Helm charts
  • Automated teardownprivatecloud destroy removes cloud-provisioned clusters
  • Backup & Restore — full cluster state backup and recovery
  • Web GUI — visual dashboard for cluster management
  • Security features — secret masking, env var support, .gitignore generation
  • Installs K3s Kubernetes on master + worker nodes
  • Deploys production services:
    • Ingress NGINX
    • cert-manager
    • MetalLB
    • Prometheus + Grafana (monitoring)
    • Longhorn (storage)

Requirements

Tool Required
Python 3.9+
ssh / scp
curl
terraform
helm
kubectl optional
flask for GUI

Run privatecloud doctor to verify your system.

Install

pip install privatecloud

Quickstart

# Initialize
privatecloud init                    # generate privatecloud.yaml and .gitignore
privatecloud doctor                  # check dependencies

# Deploy
privatecloud plan                    # preview the install plan
privatecloud install-cluster         # deploy everything
privatecloud install-cluster --dry-run  # preview without changes

# Manage
privatecloud gui --port 8080         # start web dashboard
privatecloud backup create            # create backup
privatecloud backup list             # list backups
privatecloud backup restore <name>    # restore from backup

# Destroy
privatecloud destroy                 # tear down (with backup prompt)
privatecloud destroy --yes          # skip confirmation

Config File

⚠️ DO NOT COMMIT privatecloud.yaml OR YOUR TERRAFORM DIRECTORY TO GIT. Your configuration contains secrets (e.g. Proxmox API tokens). A .gitignore is auto-generated on privatecloud init.

Created automatically by privatecloud init:

cluster_name: my-private-cloud
provider: bare-metal          # or "proxmox"
k3s_version: v1.29.0+k3s1

nodes:
  - host: 192.168.1.10
    user: root
    role: master
  - host: 192.168.1.11
    user: root
    role: worker

proxmox:
  url: https://192.168.1.100:8006/api2/json
  token_id: root@pam!mytoken
  token_secret: "${PROXMOX_TOKEN}"  # Use env var for secrets
  node: pve
  template: ubuntu-2204-template
  master_count: 1
  worker_count: 2
  storage: local-lvm
  bridge: vmbr0

services:
  metallb: true
  ingress_nginx: true
  cert_manager: true
  monitoring: true
  longhorn: true

Security

Use Environment Variables for Secrets

export PROXMOX_TOKEN="your-secret-token"
privatecloud install-cluster

In config, reference with ${VAR_NAME} syntax:

proxmox:
  token_secret: "${PROXMOX_TOKEN}"

Protect Your Config File

chmod 600 privatecloud.yaml

Auto-generated .gitignore

privatecloud init automatically creates .gitignore with:

  • privatecloud.yaml
  • terraform/*.tfstate*
  • backups/
  • kubeconfig
  • Other sensitive files

Provider Modules Roadmap

Provider Status Description
Bare-metal ✅ Stable Direct SSH installation
Proxmox ✅ v0.2.0 Proxmox VE via Terraform
Hetzner 🔜 v0.4.0 Hetzner Cloud API
LibVirt 🔜 v0.4.0 Local KVM/libvirt VMs
vSphere 📋 Backlog VMware vSphere integration
OpenStack 📋 Backlog OpenStack integration

Roadmap

v0.4.0

  • Rolling cluster upgrades (privatecloud upgrade)
  • Idempotent installation (re-running skips completed tasks)
  • Hetzner Cloud provider
  • LibVirt/KVM provider

v1.0 (Production Ready)

  • High-availability K3s with external DB
  • Built-in etcd backup
  • Add-on marketplace (logging, service mesh)
  • Multi-cluster management

Contributing

See CONTRIBUTING.md for development guidelines.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

privatecloud-0.3.0.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

privatecloud-0.3.0-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

Details for the file privatecloud-0.3.0.tar.gz.

File metadata

  • Download URL: privatecloud-0.3.0.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for privatecloud-0.3.0.tar.gz
Algorithm Hash digest
SHA256 583ae2f249d16fbe19aae6480faf2fc527fedcc9c2c13f13acfa12cf3cd4d623
MD5 48987e8686e57dc6490551b697936fd2
BLAKE2b-256 f1fe83dd1cc15bd332d322e1d37ff5eefd985bc0a59d84055998b85cef9cbb9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for privatecloud-0.3.0.tar.gz:

Publisher: publish.yml on Kubenew/privatecloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file privatecloud-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: privatecloud-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 18.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for privatecloud-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0bc53b3bb9b33fa4ea61f83a05c9b28c1d3dbc164a5646cfdd562a79a7352512
MD5 1f688fdd1916766f3759a8381f30c592
BLAKE2b-256 82c6747dc7dbe24be899ae30e99de94595b97c2ba5b643847676e20306dc2856

See more details on using hashes here.

Provenance

The following attestation bundles were made for privatecloud-0.3.0-py3-none-any.whl:

Publisher: publish.yml on Kubenew/privatecloud

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page