Skip to content

ATLAS Cluster Installation Guide

This guide documents the installation of the ATLAS Kubernetes cluster on a single server, designed for Le Havre Normandie University's research platform.

Architecture Overview

                              Internet


                    ┌─────────────────────────────────┐
                    │         Host Server             │
                    │         (Public IP)             │
                    │                                 │
                    │  ┌───────────────────────────┐  │
                    │  │           K3s             │  │
                    │  │       (Kubernetes)        │  │
                    │  └─────────────┬─────────────┘  │
                    │               │                 │
                    │  ┌─────────────▼─────────────┐  │
                    │  │      Cilium Ingress       │  │
                    │  │      (Envoy proxy)        │  │
                    │  │       :80 / :443          │  │
                    │  └─────────────┬─────────────┘  │
                    │               │                 │
                    │  ┌───┬───┬───┬┴──┬───┬───┬───┐  │
                    │  ▼   ▼   ▼   ▼   ▼   ▼   ▼   ▼  │
                    │ auth cloud chat ecrin redcap   │
                    │   git argocd grafana vault     │
                    │        flags hubble longhorn   │
                    └─────────────────────────────────┘

    Internal services (not exposed): PostgreSQL, Redis, SeaweedFS

Key Design Principles

1. Centralized Identity Management with Authentik

All authentication is managed by Authentik:

  • OIDC provider for all compatible services
  • Forward Auth proxy for legacy services (REDCap, Longhorn, Hubble)
  • MFA (TOTP, WebAuthn) for admin services
  • Group-based access control
  • Custom attributes for feature flags

2. Centralized Secrets Management with Vault

All secrets are managed by HashiCorp Vault:

  • No plaintext secrets on disk
  • Automatic rotation support via External Secrets Operator
  • Audit logging for compliance
  • Dynamic secrets for databases

3. Mutualized Databases

Instead of one database per service, we use shared clusters:

  • PostgreSQL HA: Single cluster with multiple databases (Authentik, Mattermost, Nextcloud, Gitea, Vault, Flipt, REDCap)
  • Redis Sentinel: Single cluster for sessions/cache (Authentik, Mattermost, Nextcloud, Gitea)

4. Encryption at Rest

All data is encrypted:

  • etcd: AES-256 encryption for Kubernetes secrets
  • Longhorn: LUKS encryption for all persistent volumes
  • Network: WireGuard encryption between all pods (Cilium)

5. Zero-Trust Network

Cilium Network Policies enforce:

  • Default deny all traffic
  • Explicit allow rules per service
  • L7 filtering where needed

6. Feature Flags with Flipt

Centralized feature flag management:

  • OpenFeature SDK compatibility
  • OIDC authentication via Authentik
  • Audit logs for all flag changes
  • GitOps support (flags as code)

Components

ComponentRoleRAMHA Replicas
K3sKubernetes orchestration~500MB1
CiliumCNI + Ingress + mTLS~400MB1
LonghornEncrypted storage~400MB1
VaultSecrets management~200MB1
External SecretsVault → K8s secrets~100MB1
PostgreSQL HAShared database~1.5GB3
Redis SentinelShared cache/sessions~450MB3
cert-managerTLS certificates~100MB1
SeaweedFSS3-compatible storage~500MB3
AuthentikIAM/SSO/OIDC/MFA~576MB2
MattermostTeam messaging~256MB1
NextcloudFiles + collaboration~512MB1
OnlyOffice DSDocument editing~1GB1
REDCapResearch forms~256MB1
ECRINResearcher platform~128MB1
FliptFeature flags~64MB1
GiteaGit forge~256MB1
ArgoCDGitOps deployment~400MB1
PrometheusMetrics collection~500MB1
GrafanaDashboards~200MB1
LokiLog aggregation~256MB1

Total estimated: ~8GB RAM for applications (+ ~4-8GB for OS/K3s/buffers = 16GB system minimum)

Service Access Matrix

ServiceURLAuth MethodPolicyTarget Users
Authentikauth.example.comNative2FAAdmins
Nextcloudcloud.example.comOIDC1FAResearchers, Technicians
Mattermostchat.example.comOIDC1FAResearchers, Technicians
ECRINecrin.example.comOIDC1FAResearchers
REDCap Surveysredcap.example.com/surveys/*NoneBypassPublic
REDCap Projectsredcap.example.comForward Auth1FAResearchers
REDCap Adminredcap.example.com/ControlCenter/*Forward Auth2FAREDCap Admins
Giteagit.example.comOIDC1FADevelopers, Researchers
Fliptflags.example.comOIDC2FAAdmins, Developers
ArgoCDargocd.example.comOIDC2FAAdmins
Grafanagrafana.example.comOIDC2FAAdmins
Vaultvault.example.comOIDC2FAAdmins
Longhorn UIlonghorn.example.comForward Auth2FAAdmins
Hubble UIhubble.example.comForward Auth2FAAdmins

Legend: 1FA = password, 2FA = password + TOTP

Installation Phases

  1. Ubuntu Hardening - SSH, auditd, fail2ban, auto-updates (production only)
  2. System Preparation - OS setup, firewall, prerequisites
  3. K3s Core - K3s, Cilium, Longhorn with encryption
  4. Vault - Secrets management setup
  5. Shared Databases - PostgreSQL HA, Redis Sentinel
  6. Core Services - Authentik, Mattermost, Nextcloud, REDCap, ECRIN, Flipt
  7. DevOps - Gitea, ArgoCD
  8. Monitoring - Prometheus, Grafana, Loki, alerting
  9. Security - Network policies, access control
  10. Operations - Backups, secret rotation, maintenance

Prerequisites

  • Ubuntu 24.04 LTS server with root access
  • Public IP address
  • DNS records pointing to the server:
    • auth.example.com (Authentik)
    • cloud.example.com (Nextcloud)
    • chat.example.com (Mattermost)
    • ecrin.example.com (ECRIN)
    • redcap.example.com (REDCap)
    • git.example.com (Gitea)
    • flags.example.com (Flipt)
    • argocd.example.com (ArgoCD)
    • grafana.example.com (Grafana)
    • vault.example.com (Vault)
    • longhorn.example.com (Longhorn UI)
    • hubble.example.com (Hubble UI)
  • Minimum resources:
    • RAM: 16GB (32GB recommended)
    • Disk: 200GB for /var/lib/longhorn
    • CPU: 4 cores (8 recommended)
  • Admin IP for kubectl access (not exposed publicly)

Quick Start

bash
# Clone the installation scripts
git clone https://github.com/univ-lehavre/atlas-infra.git
cd atlas-infra

# Configure your domain and IPs
cp .env.example .env
vim .env

# Run the installation
./install.sh

Or follow the manual installation guides linked above.

Admin Dashboard

After installation, administrators can access all services from Authentik's user interface, which provides links to:

ServicePurpose
AuthentikIdentity & Access Management
FliptFeature Flags
GrafanaMetrics & Logs
ArgoCDGitOps Deployments
VaultSecrets Management
LonghornStorage Management
HubbleNetwork Observability