Metadata-Version: 2.4
Name: privatecloud
Version: 0.2.1
Summary: PrivateCloud: one-command installer for a Kubernetes-based private cloud (k3s + monitoring + ingress + storage).
Author: Kubenew
License: MIT
Project-URL: Homepage, https://github.com/Kubenew/PrivateCloud
Project-URL: Repository, https://github.com/Kubenew/PrivateCloud
Keywords: private-cloud,kubernetes,k3s,installer,terraform,ansible,helm
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Developers
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.12.0
Requires-Dist: rich>=13.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: jinja2>=3.1.0
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Dynamic: license-file

# 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**.

## Features (v0.2.0)

- **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 teardown** — `privatecloud destroy` removes cloud-provisioned clusters
- 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 |

Run `privatecloud doctor` to verify your system.

## Install

```bash
pip install privatecloud
```

## Quickstart

```bash
privatecloud init          # generate privatecloud.yaml
privatecloud doctor        # check dependencies
privatecloud plan          # preview the install plan
privatecloud install-cluster          # deploy everything
privatecloud install-cluster --dry-run  # preview without changes
privatecloud destroy       # tear down (Terraform providers only)
```

## Config File

> [!WARNING]
> **DO NOT COMMIT `privatecloud.yaml` OR YOUR TERRAFORM DIRECTORY TO GIT.** 
> Your configuration contains secrets (e.g. Proxmox API tokens). Add `privatecloud.yaml` and `.terraform*` to your `.gitignore`.

Created automatically by `privatecloud init`:

```yaml
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: your-secret-here
  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
```

> When `provider: proxmox`, nodes are provisioned dynamically via Terraform and their IPs are auto-written back into the config.

## Provider Modules Roadmap

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

Contributions welcome!

## License
MIT
