Skip to main content

Distr – Unified Distribution & Visibility Layer

Distr is an open-source platform for distributing applications & artifacts across heterogeneous customer or internal environments (fully self-managed, BYOC, air‑gapped, and edge) while retaining centralized visibility, governance, and lifecycle control. This tutorial paraphrases and expands upon the official docs: https://distr.sh/docs/getting-started/what-is-distr/ (see source for authoritative reference).

1. Why Distr Matters

Modern software vendors and platform teams must ship containerized applications, Helm charts, configuration bundles, and model/AI artifacts into customer-controlled infrastructure that may be:

ScenarioChallengesDistr Value
Fully Self-ManagedCustomer networks, varied Kubernetes/Docker maturityUnified packaging, health telemetry
BYOC (Bring Your Own Cloud)Multi-cloud permutations, IAM varianceConsistent release + license gating
Air-GappedNo outbound internet, controlled ingressOffline sync, token-based artifact pulls
Edge DeploymentsConstrained compute, intermittent linksLightweight agent, staged rollouts
Enterprise Internal DistributionMultiple internal clusters / business unitsCentral catalog & policy enforcement

2. Core Concepts

ConceptDescription
Vendor PortalControl plane where publishers onboard apps, manage versions, policies, licenses.
Customer PortalWhite-labeled interface for end users to deploy, update, view health & status.
Deployment AgentComponent installed in target environment (cluster/host) that pulls instructions and reports status.
Artifact RegistryOCI-compliant storage (container images, Helm charts, Compose bundles, generic assets).
Distribution ModelsModes: fully self-managed, assisted self-managed, BYOC, air-gapped, edge.
Package FormatsDocker images, Helm charts, Docker Compose, generic OCI artifacts.
Licensing & Access ControlFine-grained entitlement by version/tag or application component.
ObservabilityCentralized aggregation of deployment status, versions, health metrics.
BrandingWhite-label customization for customer-facing portal.
API & SDKProgrammatic automation of onboarding, licensing, deployments.

3. High-Level Architecture

          +---------------------+              +------------------------+
| Vendor Portal | | Customer Portal |
| (Mgmt UI + API) | | (Tenant-scoped UI) |
+----------+----------+ +-----------+------------+
| |
| (Publish, license, assign) | (Deploy, monitor)
v v
+-------------+ +-------------+
| Registry / |<-(OCI pulls, auth)->| Deployment |
| Artifact DB | | Agents |
+------+------+ +------+------+
^ |
| (Health / status callbacks) |
+---------------------------------+

Key flows:

  1. Publish: Vendor pushes artifacts (images, charts) & metadata.
  2. Entitle: Apply license + access rules per customer or group.
  3. Deploy: Customer portal / agent retrieves approved versions.
  4. Report: Agents send version, health, consumption metrics.
  5. Govern: Vendor monitors fleet state; triggers rollouts or revocations.

4. Supported Distribution Models

ModelNotesTypical Use
Fully Self-ManagedCustomer runs entire stackRegulated industries
Assisted Self-ManagedVendor helps bootstrapComplex enterprise onboarding
BYOCArtifacts delivered into customer cloud accountsCloud neutrality
Air-GappedOffline sync (portable media or internal mirror)Defense, critical infra
EdgeAgents at remote/branch sitesIoT / low-latency workloads

5. Use Cases

PersonaOutcome
ISV / SaaS vendorStandardize release & license gating across hybrid customers
AI platformDistribute model servers, vector DB plugins, evaluation bundles
Internal platform teamCurate internal service catalog with lifecycle tracking
Ops / SREFleet upgrade coordination & version drift reporting

6. Installation & Deployment Approaches

Exact commands depend on self-hosting vs SaaS; adapt to official quickstart if deploying production-grade.

6.1 SaaS (Hosted)

  1. Sign up on official portal.
  2. Create organization / vendor account.
  3. Add first application (image + metadata).
  4. Invite test customer / internal tenant.

6.2 Self-Hosting (Docker Compose)

Example (simplified skeleton — replace images with real tags and add persistence):

docker-compose.yml
services:
distr-server:
image: ghcr.io/glasskube/distr:latest
environment:
- DATABASE_URL=postgres://distr:secret@db/distr
- REGISTRY_URL=http://registry:5000
ports:
- "8080:8080"
depends_on: [db, registry]
registry:
image: registry:2
ports:
- "5000:5000"
db:
image: postgres:15
environment:
- POSTGRES_DB=distr
- POSTGRES_USER=distr
- POSTGRES_PASSWORD=secret
volumes:
- dbdata:/var/lib/postgresql/data
volumes:
dbdata: {}

6.3 Kubernetes

Use official Helm chart (outline):

helm repo add distr https://distr.sh/helm
helm install distr-platform distr/platform \
--set registry.enabled=true \
--set postgres.auth.password=secret

6.4 Air-Gapped Strategy

  1. Mirror required container images into internal registry.
  2. Export Helm chart + manifests bundle.
  3. Transfer via approved medium (e.g., signed USB, secure gateway).
  4. Import & deploy using local registry endpoints.

7. Onboarding an Application

Workflow:

  1. Prepare OCI image (or Helm chart).
  2. Push artifact to Distr-managed or external registry.
  3. Define metadata (name, description, category, version constraints).
  4. Attach licensing / access tags.
  5. Publish version; optionally mark as beta or stable.

Example: Registering via CLI / API (Pseudo)

distr app create --name payment-gateway --display "Payment Gateway" \
--category core --license-tier enterprise

distr artifact push --app payment-gateway --type helm \
--file charts/payment-gateway-1.2.0.tgz --version 1.2.0 --channel stable

8. Licensing & Entitlements

MechanismPurpose
Version-based licensingAllow only specific versions per contract
Tag-based accessGrant features via artifact tags (e.g., llm-addon)
Expiration policiesAuto-revoke after term unless renewed
Audit logs (enterprise)Trace who accessed / deployed what

Policy example (conceptual YAML):

licenses:
- customer: acme
app: payment-gateway
allowed_versions: ["1.2.x", "1.3.x"]
features: ["analytics", "llm-addon"]
expires: 2025-12-31

9. Deployment Agents

Agents run in target clusters / hosts to:

  • Authenticate & pull approved artifacts
  • Apply deployments (Helm install / Docker Compose up)
  • Collect status (version, health, last heartbeat)
  • Report metrics back (optionally anonymized usage)

Kubernetes example (conceptual):

apiVersion: apps/v1
kind: Deployment
metadata:
name: distr-agent
spec:
replicas: 1
selector: { matchLabels: { app: distr-agent } }
template:
metadata:
labels: { app: distr-agent }
spec:
serviceAccountName: distr-agent
containers:
- name: agent
image: ghcr.io/glasskube/distr-agent:latest
env:
- name: DISTR_SERVER_URL
value: https://vendor.example.com
- name: DISTR_TOKEN
valueFrom:
secretKeyRef:
name: distr-agent-secret
key: token

10. Release & Version Management

PracticeBenefit
Semantic version channels (alpha/beta/stable)Controlled rollout & feedback cycles
Canary subset of customersEarly detection of regressions
Forced minimum version (security patch)Reduce vulnerable fleet exposure
Deprecation schedulingCommunicate upgrade timelines

11. Observability & Fleet Visibility

Collected signals (conceptual):

SignalUse
Deployed versionDrift & compliance tracking
Health status (OK/Warn/Fail)Rollout gating
Last check-in timestampDetect offline agents
Error categoriesPrioritize backlog (network vs config)
License consumptionRenewal & upsell analytics

Dashboards highlight % of customers on latest patch, upgrade velocity, error clusters.

12. Security & Compliance

AreaControl
AuthN/AuthZTokens, role-based vendor vs customer scopes
Supply ChainOCI digests, SBOM attach, signature verification (cosign)
Data ResidencySelf-host variant for jurisdiction constraints
Air-Gapped IntegritySigned bundles, offline verification steps
Secrets HandlingUse K8s secrets or external vault providers

13. Air-Gapped Workflow Deep Dive

Steps:

  1. Generate artifact export manifest (includes digests + license file).
  2. Export OCI images via skopeo copy or oras pull to tar archives.
  3. Transport offline => target network.
  4. Rehydrate registry: skopeo copy docker-archive:img.tar docker://registry.local/repo:tag.
  5. Apply manifests referencing local registry endpoints.
  6. Agent operates in offline heartbeat mode, buffering status until connectivity path (if any) is restored or using manual sync packages.

14. Edge Deployment Considerations

ConstraintStrategy
Limited bandwidthDelta updates (pull new layers only), schedule off-peak
Intermittent connectivityRetry with exponential backoff, local caching
Small storageMulti-stage builds, prune old versions post-upgrade
Latency sensitivityCo-locate inference/model services at edge site

15. Integration Points

ToolIntegration Idea
GitHub ActionsAuto-publish new image + call Distr API to promote channel
HelmCharts reference private registry credentials injected by Distr
Docker ComposeBundle + license gate optional services (e.g., premium module)
SBOM Tools (Syft/Grype)Attach scan results as artifact metadata
LLM Model ServingDistribute model weight packages & inference sidecars

16. Automation Pipeline Example

flowchart LR
A[CI Build] --> B[Security Scan]
B --> C[Push OCI Artifacts]
C --> D[Call Distr API: publish]
D --> E[License Assignment]
E --> F[Customer Agents Pull]
F --> G[Health Metrics Return]
G --> H[Rollout Dashboard]

17. Comparison Snapshot (Conceptual)

FeatureDistrGeneric RegistryHelm Repo Only
Multi Deployment Models
Licensing / Entitlements
Customer Portal
Fleet Health Visibility
Edge / Air-Gap WorkflowsManualManual
Branding / White-label

18. Troubleshooting

SymptomPossible CauseAction
Agent not reportingToken invalid / network blockRotate token, check outbound firewall
Version drift persistsCustomer pinned versionCommunicate & enforce min version policy
License not appliedTag mismatchVerify license spec & artifact tags
Slow air-gap importLarge images unoptimizedUse multi-stage builds & layer reuse
Digest mismatch errorIntegrity check failRe-export bundle & verify signatures

19. Best Practices

  1. Standardize semantic versioning; use channels for progressive rollout.
  2. Attach SBOM + signature to every release artifact.
  3. Instrument agents with minimal but actionable health metrics (avoid sensitive PII).
  4. Keep license definitions declarative (YAML in version control) for change auditing.
  5. Automate revocation when security CVEs trigger forced patch policy.
  6. Provide sandbox tenants for new customers to shorten onboarding.
  7. Maintain compatibility matrix doc (K8s versions, runtime assumptions).
  8. Test air-gap export monthly; treat as disaster recovery drill.

20. Learning & Next Steps

  • Explore official Core Concepts and Quickstart for hands-on specifics.
  • Prototype a minimal self-host (Compose) + single agent cluster.
  • Integrate CI pipeline to auto-publish & license new builds.
  • Design a rollout policy (alpha → beta → stable) with metrics gating.

Attribution: Concepts adapted & paraphrased from the official Distr documentation (see original site for exact wording & updates).
Last reviewed: 2025-09-17

Have org-specific distribution patterns? Add a section or open a PR.