Skip to content

Commit

Permalink
chore: rebrand to distr.sh (#365)
Browse files Browse the repository at this point in the history
Signed-off-by: Jakob Steiner <[email protected]>
  • Loading branch information
kosmoz authored Jan 27, 2025
1 parent be0a0c0 commit c614f1a
Show file tree
Hide file tree
Showing 221 changed files with 464 additions and 579 deletions.
6 changes: 3 additions & 3 deletions .env.development.local
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
DATABASE_URL="postgres://local:local@localhost:5432/glasskube"
DATABASE_URL="postgres://local:local@localhost:5432/distr"
# ENABLE_QUERY_LOGGING=true
JWT_SECRET="VMGocIqEy4x80qpVPJR6l9quthq+OUpr0kOwq08M0pY=" # generate with "openssl rand -base64 32"
GLASSKUBE_HOST="http://localhost:8080"
DISTR_HOST="http://localhost:8080"

MAILER_TYPE="smtp"
MAILER_FROM_ADDRESS="noreply-local@glasskube.cloud"
MAILER_FROM_ADDRESS="noreply-local@distr.sh"
MAILER_SMTP_HOST="localhost"
# mailpit uses port 1025
MAILER_SMTP_PORT=1025
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-agent.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Build agent
name: Build Agents

on:
push:
Expand Down Expand Up @@ -39,13 +39,13 @@ jobs:
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
with:
images: ghcr.io/glasskube/cloud/${{ matrix.agent }}
images: ghcr.io/glasskube/distr/${{ matrix.agent }}
tags: |
type=ref,event=branch
type=sha,event=branch
type=semver,pattern={{version}}
labels: |
org.opencontainers.image.description=Agent software for the Glasskube Cloud Software Distribution Platform
org.opencontainers.image.description=Distr agent software
org.opencontainers.image.vendor=Glasskube
- name: Docker build (push only for tag)
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Build server
name: Build Hub

on:
push:
Expand Down Expand Up @@ -40,18 +40,18 @@ jobs:
run: |
npm run build:prod -- --source-map=true || exit 1
npm run sentry-upload || exit 1
rm internal/frontend/dist/cloud-ui/browser/*.map || exit 1
rm internal/frontend/dist/ui/browser/*.map || exit 1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
VERSION: ${{ github.ref_name }}

- name: Build application
run: go build -ldflags="$LDFLAGS" -o dist/cloud ./cmd/cloud/
run: go build -ldflags="$LDFLAGS" -o dist/distr ./cmd/hub/
env:
CGO_ENABLED: '0'
LDFLAGS: >-
-X github.com/glasskube/cloud/internal/buildconfig.version=${{ github.ref_name }}
-X github.com/glasskube/cloud/internal/buildconfig.commit=${{ steps.hash.outputs.sha_short }}
-X github.com/glasskube/distr/internal/buildconfig.version=${{ github.ref_name }}
-X github.com/glasskube/distr/internal/buildconfig.commit=${{ steps.hash.outputs.sha_short }}
- name: Login to GitHub Container Registry (tag only)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
Expand All @@ -64,19 +64,19 @@ jobs:
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
with:
images: ghcr.io/glasskube/cloud
images: ghcr.io/glasskube/distr
tags: |
type=ref,event=branch
type=sha,event=branch
type=semver,pattern={{version}}
labels: |
org.opencontainers.image.description=Glasskube Cloud Software Distribution Platform
org.opencontainers.image.description=Distr Hub
org.opencontainers.image.vendor=Glasskube
- name: Docker build (push on tag only)
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
with:
context: .
file: Dockerfile.server
file: Dockerfile.hub
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Check pull request title
name: Check Pull Request Title

on:
pull_request_target:
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"version": "0.2.0",
"configurations": [
{
"name": "Launch Server",
"name": "Launch Hub",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/cloud",
"program": "${workspaceFolder}/cmd/hub",
"cwd": "${workspaceFolder}"
},
{
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.docker-agent
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ COPY cmd/agent/docker/ cmd/agent/docker/
COPY internal/ internal/
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build -a -o agent \
-ldflags="-s -w -X github.com/glasskube/cloud/internal/buildconfig.version=${VERSION:-snapshot} -X github.com/glasskube/cloud/internal/buildconfig.commit=${COMMIT}" \
-ldflags="-s -w -X github.com/glasskube/distr/internal/buildconfig.version=${VERSION:-snapshot} -X github.com/glasskube/distr/internal/buildconfig.commit=${COMMIT}" \
./cmd/agent/docker/

FROM docker:27.3.1-alpine3.20
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.server → Dockerfile.hub
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static-debian12:nonroot@sha256:6ec5aa99dc335666e79dc64e4a6c8b89c33a543a1967f20d360922a80dd21f02
WORKDIR /
COPY dist/cloud /cloud
COPY dist/distr /distr
USER 65532:65532
ENTRYPOINT ["/cloud"]
ENTRYPOINT ["/distr"]
2 changes: 1 addition & 1 deletion Dockerfile.kubernetes-agent
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ COPY cmd/agent/kubernetes/ cmd/agent/kubernetes/
COPY internal/ internal/
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} \
go build -a -o agent \
-ldflags="-s -w -X github.com/glasskube/cloud/internal/buildconfig.version=${VERSION:-snapshot} -X github.com/glasskube/cloud/internal/buildconfig.commit=${COMMIT}" \
-ldflags="-s -w -X github.com/glasskube/distr/internal/buildconfig.version=${VERSION:-snapshot} -X github.com/glasskube/distr/internal/buildconfig.commit=${COMMIT}" \
./cmd/agent/kubernetes/

FROM gcr.io/distroless/static-debian12:nonroot@sha256:6ec5aa99dc335666e79dc64e4a6c8b89c33a543a1967f20d360922a80dd21f02
Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GOCMD ?= go
VERSION ?= snapshot
COMMIT = $(shell git rev-parse --short HEAD)
LDFLAGS ?= -s -w -X github.com/glasskube/cloud/internal/buildconfig.version=$(VERSION) -X github.com/glasskube/cloud/internal/buildconfig.commit=$(COMMIT)
LDFLAGS ?= -s -w -X github.com/glasskube/distr/internal/buildconfig.version=$(VERSION) -X github.com/glasskube/distr/internal/buildconfig.commit=$(COMMIT)

.PHONY: tidy
tidy:
Expand Down Expand Up @@ -43,39 +43,39 @@ frontend-prod: node_modules

.PHONY: run
run: frontend-dev tidy
GLASSKUBE_ENV=.env.development.local CGO_ENABLED=0 $(GOCMD) run -ldflags="$(LDFLAGS)" ./cmd/cloud/
DISTR_ENV=.env.development.local CGO_ENABLED=0 $(GOCMD) run -ldflags="$(LDFLAGS)" ./cmd/hub/

.PHONY: run-kubernetes-agent
run-kubernetes-agent: tidy
CGO_ENABLED=0 $(GOCMD) run -ldflags="$(LDFLAGS)" ./cmd/agent/kubernetes

.PHONY: build
build: frontend-prod tidy
CGO_ENABLED=0 $(GOCMD) build -ldflags="$(LDFLAGS)" -o dist/cloud ./cmd/cloud/
CGO_ENABLED=0 $(GOCMD) build -ldflags="$(LDFLAGS)" -o dist/distr ./cmd/hub/

.PHONY: run-kubernetes-agent
build-kubernetes-agent: tidy
CGO_ENABLED=0 $(GOCMD) build -ldflags="$(LDFLAGS)" -o dist/kubernetes-agent ./cmd/agent/kubernetes

.PHONY: docker-build-server
docker-build-server: build
docker build -f Dockerfile.server --tag ghcr.io/glasskube/cloud:$(VERSION) .
.PHONY: docker-build-hub
docker-build-hub: build
docker build -f Dockerfile.hub --tag ghcr.io/glasskube/distr:$(VERSION) .

.PHONY: docker-build-docker-agent
docker-build-docker-agent:
docker build -f Dockerfile.docker-agent --tag ghcr.io/glasskube/cloud/docker-agent:$(VERSION) --build-arg VERSION=$(VERSION) --build-arg COMMIT=$(COMMIT) --network host .
docker build -f Dockerfile.docker-agent --tag ghcr.io/glasskube/distr/docker-agent:$(VERSION) --build-arg VERSION=$(VERSION) --build-arg COMMIT=$(COMMIT) --network host .

.PHONY: docker-build-kubernetes-agent
docker-build-kubernetes-agent:
docker build -f Dockerfile.kubernetes-agent --tag ghcr.io/glasskube/cloud/kubernetes-agent:$(VERSION) --build-arg VERSION=$(VERSION) --build-arg COMMIT=$(COMMIT) --network host .
docker build -f Dockerfile.kubernetes-agent --tag ghcr.io/glasskube/distr/kubernetes-agent:$(VERSION) --build-arg VERSION=$(VERSION) --build-arg COMMIT=$(COMMIT) --network host .

.PHONY: docker-build
docker-build: docker-build-server docker-build-docker-agent docker-build-kubernetes-agent
docker-build: docker-build-hub docker-build-docker-agent docker-build-kubernetes-agent

.PHONY: init-db
init-db:
go run ./cmd/cloud/migrate/
go run ./cmd/hub/migrate/

.PHONY: purge-db
purge-db:
go run ./cmd/cloud/migrate/ --down
go run ./cmd/hub/migrate/ --down
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<h1 align="center">
<a href="https://glasskube.cloud/" target="_blank">
<img alt="Glasskube" src="frontend/cloud-ui/public/glasskube-logo.svg" style="height: 5em;">
<a href="https://distr.sh/" target="_blank">
<img alt="" src="frontend/ui/public/glasskube-logo.svg" style="height: 5em;">
</a>
<br>
Glasskube Cloud
distr.sh
</h1>

<div align="center">
Expand All @@ -12,56 +12,56 @@

</div>

[![GitHub Repo stars](https://img.shields.io/github/stars/glasskube/cloud?style=flat)](https://github.com/glasskube/cloud)
[![GitHub Repo stars](https://img.shields.io/github/stars/glasskube/distr?style=flat)](https://github.com/glasskube/distr)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Docs](https://img.shields.io/badge/docs-glasskube.dev%2Fdocs-blue)](https://glasskube.dev/products/cloud/docs?utm_source=github)
[![Docs](https://img.shields.io/badge/docs-glasskube.dev-blue)](https://glasskube.dev/products/distr/docs/?utm_source=github)

Glasskube Cloud is the easiest way to distribute enterprise software to customer-controlled or shared-responsibility environments.
Distr is the easiest way to distribute enterprise software to customer-controlled or shared-responsibility environments.

- View all deployments and connected agents via the **intuitive web UI**
- Let your customers control their deployments via the **white-label customer portal**
- Access the API using our [**rich SDK**](#glasskube-cloud-sdk)
- Access the API using our [**rich SDK**](#distr-sdk)
- Fully open-source and [self-hostable](#self-hosting)

Check out the hosted version at https://app.glasskube.cloud/
Check out the hosted version at https://app.distr.sh/register/

## Architecture overview

```mermaid
architecture-beta
group ctrl(cloud)[Your Cloud]
service db(database)[PostgreSQL] in ctrl
service server(server)[Control Plane] in ctrl
db:T -- B:server
service hub(server)[Distr Hub] in ctrl
db:T -- B:hub
group customer(cloud)[Customer Cloud]
service agent(internet)[Agent] in customer
agent:L --> R:server
service agent(internet)[Distr Agent] in customer
agent:L --> R:hub
```

## Self-hosting

### Docker

The Glasskube Cloud control plane is distributed as a Docker image.
The Distr Hub is distributed as a Docker image.
Check out [`deploy/docker`](deploy/docker) for our example deployment using Docker Compose.
To get started quickly, do the following:

<!-- x-release-please-start-version -->

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

<!-- x-release-please-end -->

The full self-hosting documentation is at https://glasskube.dev/products/cloud/docs/self-hosting/
The full self-hosting documentation is at https://glasskube.dev/products/distr/docs/self-hosting/

### Building from source

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

- NodeJS (Version 22)
- Go (Version 1.23)
Expand All @@ -80,28 +80,28 @@ make build-docker

### Local development

To run Glasskube Cloud locally you need to clone the repository and run the following commands:
To run the Distr Hub locally you need to clone the repository and run the following commands:

```shell
# Start the database and a mock SMTP server
docker-compose up -d
# Start Glasskube Cloud
# Start Distr Hub
make run
```

Open your browser and navigate to [`http://localhost:8080`](http://localhost:8080) to register a user
and receive the E-Mail verification link via Mailpit on [`http://localhost:8025`](http://localhost:8025).

## Glasskube Cloud SDK
## Distr SDK

Interact with Glasskube Cloud directly from your application code using our first-party SDK.
The Glasskube Cloud SDK is currently available for JavaScript only, but more languages and frameworks are on the roadmap.
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 Glasskube Cloud SDK for JavaScript from [npmjs.org](https://npmjs.org/):
You can install the Distr SDK for JavaScript from [npmjs.org](https://npmjs.org/):

```shell
npm install --save @glasskube/cloud-sdk
npm install --save @glasskube/distr-sdk
```

The full SDK documentation is at https://glasskube.dev/products/cloud/docs/sdk/
The full SDK documentation is at https://glasskube.dev/products/distr/docs/sdk/
Loading

0 comments on commit c614f1a

Please sign in to comment.