heleosv2 multi-tenant hosting platform (infra + CLI)
Find a file
Bart Van Geyt fe4cbbe36a Phase 4: provisioning CLI (heleosctl)
Python control-panel package driving the full provisioning flow from a
site's site.yaml (docs/05):

- provision: ZFS web dataset + ownership, per-site DB + least-priv user,
  generated .env encrypted to secrets.enc.yaml (SOPS/age), render the
  profile templates + persist site.yaml, per-customer chrooted SFTP
  account, docker compose up.
- deprovision (gated: data destroyed only with --purge, after a final
  backup), backup (ZFS snapshot + mariadb-dump), restore (rollback +
  import), render (preview), list.

Design: one command/file runner with a real --dry-run (prints every
action, redacts secrets); idempotent steps; Config + Site validation
mirroring docs/03; passwords never logged.

Modules: cli, config, naming, context, render, runner, zfs, database,
secrets, sftp, compose, provision, backup. Plus pyproject (heleosctl
entry point), config.example.yaml, an example site, and a README.

Tests: 22 pure-logic unit tests (naming, config validation, template
render across all profiles + db on/off) — all passing. Full provision and
deprovision verified end-to-end in --dry-run.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 17:18:36 +02:00
.forgejo/workflows Phase 3: site templates & base images 2026-07-07 17:06:25 +02:00
control-panel Phase 4: provisioning CLI (heleosctl) 2026-07-07 17:18:36 +02:00
deployments Refine to nested customer -> site model 2026-07-07 12:37:39 +02:00
docs Refine to nested customer -> site model 2026-07-07 12:37:39 +02:00
platform-infra Phase 2: platform service stacks + CLAUDE.md 2026-07-07 16:58:18 +02:00
site-templates Phase 3: site templates & base images 2026-07-07 17:06:25 +02:00
.gitattributes Phase 0: architecture docs, ADRs, and repo scaffold 2026-07-07 12:26:00 +02:00
.gitignore Phase 4: provisioning CLI (heleosctl) 2026-07-07 17:18:36 +02:00
CLAUDE.md Phase 4: provisioning CLI (heleosctl) 2026-07-07 17:18:36 +02:00
README.md Phase 0: architecture docs, ADRs, and repo scaffold 2026-07-07 12:26:00 +02:00

heleosv2 — Multi-Tenant Web Hosting Platform

A rebuild of a small web-hosting business on modern, isolation-first infrastructure: container-per-customer + ZFS-dataset-per-customer, with repeatable CLI-driven provisioning and clean per-customer backup/restore.

Core philosophy — the customer is the boundary. Isolation (containers), backup (ZFS), and restore all line up on the same boundary, so a compromised or broken site is contained and restorable without touching neighbours.

Status

Phase 0 — writing the design documents before any platform code. See docs/00-roadmap.md.

Repository layout

This monorepo groups four logical areas whose contents have different lifecycles (see docs/07-repo-layout-gitops.md):

Path Purpose
docs/ Architecture, ADRs, runbooks, conventions.
platform-infra/ Ansible + base compose for host, Traefik, MariaDB, Forgejo, monitoring.
site-templates/ Dockerfiles for standard images + compose templates per site profile.
deployments/ Rendered per-customer configs (GitOps state). No plaintext secrets.
control-panel/ Provisioning CLI now; customer-facing panel later.

Key decisions

  • Single bare-metal host, Docker Compose per customer, no orchestrator.
  • Shared MariaDB (per-site DB + least-privilege user).
  • Decoupled backups: web files via ZFS snapshot/send; DB via automysqlbackup + rsync; logs via Loki.
  • Lightweight DevOps: Forgejo + built-in registry + Trivy.
  • CLI-first provisioning; web panel deferred until the platform is proven.

The full approved architecture plan lives at docs/architecture-plan.md.