Skip to main content

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

Project description

PrivateCloud

PyPI Version Python Versions License: MIT Tests Downloads Docker Pulls

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.


Features Overview (v0.8.0)

Deployment

  • Provider abstraction — bare-metal SSH, Proxmox VE, or HPE Morpheus VM Essentials via Terraform
  • Terraform runner — generates, applies, and destroys infrastructure automatically
  • Config auto-write — Terraform outputs (node IPs) written back to privatecloud.yaml
  • Helm-based service installation — all services deployed via Helm charts

Cluster Management

  • Cluster upgradeprivatecloud upgrade v1.30.0+k3s1
  • Multi-cluster — manage multiple clusters with cluster list/add/switch/remove
  • HA setup — high availability with multiple masters
  • Add-on marketplace — one-command install of common tools

Backup & Restore

  • Local backups — full cluster state to backups/ directory
  • Encrypted backups — age encryption with --encrypt
  • Cloud storage — S3, GCS, Azure Blob integration
  • Scheduled backups — cron/systemd timers with backup schedule
  • etcd snapshotsbackup create --etcd-snapshot
  • Longhorn PITR — snapshots and point-in-time restore

Security

  • GUI authentication--auth flag with env var credentials
  • Secret masking — tokens/passwords masked in logs
  • Environment variables${VAR} syntax for secrets
  • Auto .gitignore — prevents accidental secret commits

GUI Dashboard

  • Web UIprivatecloud gui --port 8080
  • Cluster metrics — nodes, pods, health status
  • One-click actions — backup, restore, destroy

Operations

  • Diagnosticsprivatecloud doctor --diagnostics
  • Configuration lintingprivatecloud lint
  • Release notesprivatecloud release-notes

Requirements

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

Install

pip install privatecloud

Quickstart

# Initialize
privatecloud init                      # generate privatecloud.yaml
privatecloud doctor --diagnostics      # check dependencies and cluster health
privatecloud lint                      # validate config

# 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 upgrade v1.30.0+k3s1     # upgrade cluster
privatecloud cluster list              # list managed clusters

# Backup & Restore
privatecloud backup create                         # create backup
privatecloud backup create --encrypt              # encrypted backup
privatecloud backup create --s3 my-bucket        # upload to S3
privatecloud backup create --etcd-snapshot       # include etcd
privatecloud backup schedule daily --keep 7       # schedule backups
privatecloud backup list                          # list backups
privatecloud backup restore <name>               # restore backup
privatecloud backup restore <name> --force       # force restore

# Snapshots & PITR
privatecloud snapshot my-volume                   # create snapshot
privatecloud snapshots-list                      # list all snapshots
privatecloud restore my-volume snap-123          # restore from snapshot

# Add-ons
privatecloud addon list                           # list available add-ons
privatecloud addon install monitoring-stack       # install add-on
privatecloud addon search logging                 # search add-ons

# Destroy
privatecloud destroy                             # with backup prompt
privatecloud destroy --yes                        # skip confirmation

Configuration

cluster_name: my-private-cloud
provider: bare-metal          # or "proxmox" or "morpheus"
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

# morpheus:
#   url: https://morpheus.example.com
#   username: admin
#   password: ${MORPHEUS_PASSWORD}
#   group_name: My Group
#   cloud_name: My Cloud
#   instance_type_name: Ubuntu
#   layout_name: VMware VM
#   plan_name: 1 CPU, 2GB Memory
#   master_count: 1
#   worker_count: 2
#   cloud_type: vmware

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

Provider Modules Roadmap

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

Roadmap

v0.7.0

  • Hetzner Cloud provider
  • LibVirt/KVM provider
  • Cluster backup verification
  • Rollback from failed upgrade

v1.0 (Production Ready)

  • High-availability k3s with external DB
  • Rolling cluster upgrades
  • Multi-cluster management UI
  • Add-on marketplace with 20+ tools
  • Cloud storage backup with lifecycle policies

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.8.0.tar.gz (53.1 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.8.0-py3-none-any.whl (55.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: privatecloud-0.8.0.tar.gz
  • Upload date:
  • Size: 53.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for privatecloud-0.8.0.tar.gz
Algorithm Hash digest
SHA256 7b01b090815798b1ed35ffebfb68ca33ce884a64e3d659b3b48202905531bc66
MD5 6c8e1d1c356468d5fcaec50497591f6e
BLAKE2b-256 8f00aaef71f0619048bd351b5fb51964b2cf9cfdfe98d956c91ccd154d2543de

See more details on using hashes here.

File details

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

File metadata

  • Download URL: privatecloud-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 55.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for privatecloud-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0238edf65312b7c4d183be9ca5ae4b228f9f95382e327c238dbf0fee614d63e7
MD5 4335ebb90a9dd623ab104f01378aa247
BLAKE2b-256 5efd5e341e981a41c48e0b57ed044398fb08c645cd4a90a67f31faeb6c1a0db1

See more details on using hashes here.

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