Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Appwrite Helm Chart - Sprint Plan Overview

This directory contains detailed documentation for each sprint in the development of the production-grade Appwrite Helm chart.

Sprint Breakdown

Timeline: 2-4 hours
Goal: Get Appwrite running on K8s ASAP

Key Deliverables:

  • ✅ Helm chart structure (Chart.yaml, values.yaml, templates)
  • ✅ Core infrastructure (MariaDB, Redis, InfluxDB, Telegraf)
  • ✅ Essential services (Appwrite API, Realtime, Assistant)
  • ✅ Critical workers (5 workers: databases, mails, webhooks, deletes, builds)
  • ✅ Basic networking (Services, Ingress with Traefik, TLS)
  • ✅ Configuration (ConfigMap, Secrets)

Status: 🟡 In Progress


Timeline: 3-5 hours
Goal: Complete all components and make it production-ready

Key Deliverables:

  • ✅ All remaining workers (7 more: certificates, functions, messaging, migrations, audits, maintenance, schedule, usage)
  • ✅ Advanced storage (S3/MinIO integration, dynamic PVC provisioning)
  • ✅ Health & resilience (liveness/readiness probes, resource limits, PDBs, init containers)
  • ✅ Comprehensive configuration management
  • ✅ Database initialization jobs

Status: ⚪ Pending (Sprint 1)


Timeline: 2-3 hours
Goal: Enable horizontal scaling and implement best practices

Key Deliverables:

  • ✅ Horizontal Pod Autoscaling (HPA for API, Realtime, Workers)
  • ✅ Advanced networking (NetworkPolicies, multiple ingress configs)
  • ✅ Observability (Prometheus ServiceMonitor, Grafana dashboards)
  • ✅ Multi-environment support (dev/staging/prod values)
  • ✅ Security enhancements (Pod Security Context, TLS everywhere)

Status: ⚪ Pending (Sprint 2)


Timeline: 2-3 hours
Goal: Finalize, document, test, and prepare for community contribution

Key Deliverables:

  • ✅ Comprehensive documentation (README, INSTALL, TROUBLESHOOTING, ARCHITECTURE, etc.)
  • ✅ Testing & validation (Helm tests, CI/CD pipeline, validation scripts)
  • ✅ Advanced features (backup/restore jobs, migration guides)
  • ✅ OSS contribution prep (CONTRIBUTING, CHANGELOG, packaging)

Status: ⚪ Pending (Sprint 3)


Total Estimated Time

10-15 hours of focused development across 4 sprints

Prerequisites

Infrastructure Requirements

  • Kubernetes cluster (k0s, k3s, or any distribution)
  • Kubernetes version: 1.24+
  • Helm 3.8+
  • Storage: OpenEBS or any PersistentVolume provisioner
  • Ingress: Traefik (tested) or nginx
  • TLS: cert-manager with Let's Encrypt
  • S3 Storage: MinIO, AWS S3, or compatible

Development Tools

  • kubectl
  • helm
  • docker (for local testing with k3d)
  • git

Development Approach

Iterative Development

Each sprint builds on the previous one:

  1. Sprint 1: Get it working (MVP)
  2. Sprint 2: Make it complete (all features)
  3. Sprint 3: Make it scalable (production-grade)
  4. Sprint 4: Make it shareable (documentation & OSS)

Testing Strategy

  • Local testing with k3d after Sprint 1
  • Staging deployment after Sprint 2
  • Load testing after Sprint 3
  • External validation after Sprint 4

Version Control

  • Git branches for each sprint
  • Tag releases: v0.1.0 (Sprint 1), v0.2.0 (Sprint 2), etc.
  • Main branch always deployable

Success Criteria

Sprint 1 Success

  • Helm chart installs without errors
  • Appwrite console accessible
  • Can create database and collection
  • All pods running

Sprint 2 Success

  • All workers operational
  • Data persists across restarts
  • S3 storage working
  • Survives pod failures

Sprint 3 Success

  • Auto-scales under load
  • Network policies enforced
  • Metrics visible in Prometheus
  • Multiple environments supported

Sprint 4 Success

  • Documentation complete
  • External tester deploys successfully
  • Passes Helm best practice checks
  • Ready for Artifact Hub

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│                     Kubernetes Cluster                       │
│                                                              │
│  ┌────────────┐         ┌──────────────────────────────┐   │
│  │  Traefik   │────────▶│   Appwrite Services          │   │
│  │  Ingress   │         │  - API (HPA: 2-10 pods)      │   │
│  └────────────┘         │  - Realtime (HPA: 2-8 pods)  │   │
│                         │  - Assistant                  │   │
│  ┌────────────┐         └──────────────────────────────┘   │
│  │ cert-mgr   │                        │                    │
│  │ (Let's     │                        │                    │
│  │  Encrypt)  │         ┌──────────────▼──────────────┐    │
│  └────────────┘         │   Workers (12 deployments)   │    │
│                         │  - databases, mails, webhooks │    │
│  ┌────────────┐         │  - builds, functions, certs   │    │
│  │ Prometheus │◀────────│  - messaging, migrations      │    │
│  │  Grafana   │         │  - audits, deletes, schedule  │    │
│  └────────────┘         │  - maintenance, usage         │    │
│                         └──────────────────────────────┘    │
│                                        │                     │
│                         ┌──────────────▼──────────────┐     │
│                         │   Infrastructure             │     │
│                         │  - MariaDB (StatefulSet)     │     │
│                         │  - Redis (StatefulSet)       │     │
│                         │  - InfluxDB (StatefulSet)    │     │
│                         │  - Telegraf (Deployment)     │     │
│                         └──────────────────────────────┘     │
│                                        │                     │
│                         ┌──────────────▼──────────────┐     │
│                         │   Storage                    │     │
│                         │  - OpenEBS PVCs              │     │
│                         │  - MinIO S3 (external)       │     │
│                         └──────────────────────────────┘     │
└─────────────────────────────────────────────────────────────┘

Key Technical Decisions

1. Storage Strategy

  • Database: OpenEBS PVCs (local storage for low latency)
  • Files: MinIO S3 (scalable, distributed)
  • Rationale: Best of both worlds - fast DB, scalable files

2. Scaling Strategy

  • API/Realtime: HPA based on CPU/Memory
  • Workers: HPA with potential for KEDA (queue-based)
  • Databases: StatefulSet, manual scaling
  • Rationale: Auto-scale stateless, controlled scaling for stateful

3. Security Approach

  • Network: NetworkPolicies (default deny)
  • Secrets: Support for sealed-secrets, external secrets operator
  • Pod Security: Non-root users, security contexts
  • TLS: cert-manager with Let's Encrypt
  • Rationale: Defense in depth

4. Configuration Management

  • Base Config: ConfigMap (non-sensitive)
  • Secrets: Kubernetes Secrets (sealed)
  • Overrides: values.yaml per environment
  • Rationale: Separation of concerns, environment parity

5. Observability

  • Metrics: Prometheus + Grafana
  • Logs: Fluent-based (future)
  • Traces: OpenTelemetry (future)
  • Health: Kubernetes probes + custom checks
  • Rationale: Industry standard, widely supported

Comparison with Alternatives

vs. byawitz/appwrite-k8s

Feature Our Chart byawitz
Status Production-ready Semi-ready
Helm Chart Complete WIP
Documentation Comprehensive Basic
Autoscaling Yes (HPA) Manual only
NetworkPolicies Yes No
Monitoring Prometheus InfluxDB only
Multi-env Yes No
Tests Yes No

vs. Docker Compose (Official)

Feature Kubernetes Docker Compose
Scalability Excellent Limited
HA Built-in Manual
Orchestration Kubernetes Docker Swarm
Cloud Native Yes No
Learning Curve Steeper Easier
Production Grade Yes Yes

Contributing

We welcome contributions! Each sprint's documentation includes:

  • Detailed technical specs
  • Implementation guidelines
  • Test criteria
  • Known limitations

See Sprint 1 to get started.

License

MIT (same as Appwrite)

Maintainers

Acknowledgments

  • Appwrite team for the amazing platform
  • byawitz for pioneering K8s support
  • Helm community for best practices