展示HN:Distr 2.0 – 一年学习如何交付到客户环境
Show HN: Distr 2.0 – A year of learning how to ship to customer environments

原始链接: https://github.com/distr-sh/distr

## Distr:开源软件分发平台 Distr是一个开源平台,旨在简化在复杂、自管理环境中向客户分发软件和AI应用,包括本地部署、VPC、BYOC和边缘部署。它提供了一个集中的Web UI,用于管理部署、制品、代理和客户访问。 主要功能包括通过预构建代理(Helm & Docker)进行部署自动化、白标客户门户、许可证管理以及具有细粒度访问控制的容器注册表。Distr支持分发OCI兼容制品,并提供强大的API和SDK(目前为JavaScript)。 它可以完全自托管(通过Docker或Helm charts),也可以作为托管服务使用。Distr利用PostgreSQL、对象存储和专用的OCI注册表等组件。Distr MCP服务器是一个关键组件,可实现与代理工作流和LLM客户端的集成。 通过提供的Docker Compose或Helm chart示例快速入门,或通过Discord访问完整文档和社区支持:[https://distr.sh/](https://distr.sh/)。

## Distr 2.0:简化复杂的软件部署 Distr 是一个开源平台,旨在帮助软件供应商管理部署到客户环境,尤其是在复杂的本地部署环境中。经过一年的开发和来自 200 多家供应商(包括财富 500 强企业)的反馈,Distr 2.0 引入了基于实际复杂情况的重大改进。 主要更新包括**客户组织**,以实现更好的用户管理和基于角色的访问控制;内置的 **OCI 容器注册表**;以及强大的 **许可证管理**,用于规范供应商-客户协议。Distr 还提供关键的可视性,包括 **容器日志和指标**(存储在 Postgres 中)和安全的 **密钥管理**。 该平台支持跨各种环境的部署——本地、云(AWS、GCP、GovCloud),甚至与外部网络隔离的系统。展望 Distr 3.0,团队正专注于对 Terraform/OpenTofu 和 Zarf 的原生支持,从而实现更广泛的基础设施配置和自带云 (BYOC) 功能。 Distr 旨在取代手动、容易出错的流程,例如基于脚本的更新和现场修复,为现代软件分发提供集中式解决方案。
相关文章

原文

  • Centralized Management: View & manage all deployments, artifacts, connected agents, self-managed & BYOC customers via the intuitive web UI
  • Deployment Automation: Optional prebuilt Helm and Docker agents manage deployments, collect logs and metrics, and allow remote troubleshooting.
  • White-label customer portal: Let your customers control their deployments or download your artifacts
  • License Management: Distribute specific versions of your application to specific customers
  • Container registry: Distribute OCI-compatible artifacts (Docker images, Helm charts, Terraform modules) with built-in granular access control and analytics.
  • Access the API using our rich SDK
  • Fully Open Source and self-hostable

Check out the hosted version at https://distr.sh/get-started/.

Distr is an Open Source software distribution platform that provides a ready-to-use setup with prebuilt components to help software and AI companies distribute applications to customers in complex, self-managed environments.

Use cases include:

  • On-premises, VPC and self-managed software deployments
  • Bring Your Own Cloud (BYOC) automation
  • Edge & Fleet management

Read more about Distr and our use cases at https://distr.sh/docs/getting-started/about/

architecture-beta
    group ctrl(cloud)[Distr Saas or Your Cloud]
    service hub(server)[Distr Hub] in ctrl
    service db(database)[PostgreSQL] in ctrl
    service oci(database)[Distr OCI Registry] in ctrl
    service s3(disk)[Object Storage] in ctrl
    oci:R -- L:hub
    db:T -- B:hub
    oci:B -- T:s3

    junction customerjunction

    hub:R <-- L:customerjunction
    customerjunction:T -- B:agent
    customerjunction:B -- T:client


    group agentcustomer(cloud)[Customer Cloud]
    service agent(internet)[Distr Agent] in agentcustomer
    service app(server)[Your Application] in agentcustomer
    agent:L --> R:app

    group ocicustomer(cloud)[Fully self managed customer]
    service client(internet)[OCI client] in ocicustomer
Loading

In case you get stuck, have questions, or need help, we're happy to support you, drop by our Discord.

The Distr Hub is distributed as a Docker image via ghcr.io. Check out deploy/docker for our example deployment using Docker Compose. To get started quickly, do the following:

mkdir distr && cd distr && curl -fsSL https://github.com/distr-sh/distr/releases/latest/download/deploy-docker.tar.bz2 | tar -jx
# make necessary changes to the .env file
docker-compose up -d

Distr is also available as a Helm chart distributed via ghcr.io. Check out deploy/charts/distr for our Helm Chart source code. To install Distr in Kubernetes, simply run:

helm upgrade --install --wait --namespace distr --create-namespace \
  distr oci://ghcr.io/distr-sh/charts/distr \
  --set postgresql.enabled=true --set minio.enabled=true

For a quick testing setup, you don't have to modify the values. However, if you intend to use distr in production, please revisit all available configuration values and adapt them accordingly. You can find them in the reference values.yaml file.


Register your first account at http://localhost:8080/register

The full self-hosting documentation is at https://distr.sh/docs/self-hosting/self-hosting/

Using Distr agents on macOS? Follow the guide to get started.

To build Distr Hub from source, first ensure that the following build dependencies are installed:

  • NodeJS (Version 22)
  • Go (Version 1.25)
  • Docker (when building the Docker images)

We recommend that you use mise to install these tools, but you do don't have to.

All build tasks can be found in the mise.toml file, for example:

# Build the control plane
mise run build:hub
# Build all docker images
mise run "docker-build:**"

Local development & Contributing

Check out our contributing guidelines.

Interact with Distr directly from your application code using our first-party SDK. The Distr SDK is currently available for JavaScript only, but more languages and frameworks are on the roadmap. Let us know what you would like to see!

You can install the Distr SDK for JavaScript from npmjs.org:

npm install --save @distr-sh/distr-sdk

The full SDK documentation is at https://distr.sh/docs/integrations/sdk/

Use the Distr MCP server to connect your deployments, applications, artifacts and licenses to agentic workflows, or to interact with the Distr platform in LLM Clients.

The Distr MCP server is hosted on HyprMCP (hyprmcp.com & hyprmcp/jetski). It can either be used as a Remote MCP server via the streamable HTTP protocol or used locally via stdio.

Note

The Distr MCP server requires authentication via a personal access token.

Configure a personal access token (PAT) in an Authorization header when calling the MCP server.

Header name: Authorization Header value: AccessToken distr-bc46...

Example configuration for Claude Code would look like:

claude mcp add --transport http distr https://glasskube.hyprmcp.cloud/distr/mcp --header "Authorization: AccessToken distr-bc46..."

The full MCP Server documentation is at https://distr.sh/docs/integrations/mcp/

联系我们 contact @ memedata.com