Skip to content

Commit acbbe40

Browse files
committed
[docs] Update "Install on Kubernetes" + Docker Registry + Ingress (noDomain)
1 parent ae07ccf commit acbbe40

File tree

3 files changed

+87
-18
lines changed

3 files changed

+87
-18
lines changed

docs/self-hosted/install/configure-ingress.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,28 @@ There are several modes of ingress into your Gitpod installation. They mostly hi
1111
Compare [values.yaml](https://github.com/gitpod-io/gitpod/blob/master/chart/values.yaml) for details.
1212

1313

14-
## Example
14+
## IngressMode: `noDomain`
15+
16+
> Custom Docker registry
17+
For this mode to work you need to [configure a custom Docker registry](../docker-registry/) with valid HTTPS certificates.
18+
19+
1. Create a file `values.ingress.yaml` with the following content:
20+
```
21+
hostname: "123-123-123-123.ip.mygitpod.com"
22+
```
23+
Replace 123-123-123-123 with the external IP of your cluster.
24+
25+
Afterwards, do an `helm upgrade --install -f values.ingress.yaml gitpod .` to apply the changes.
26+
27+
> If you don't know the external IP of your cluster try running `kubectl describe svc proxy | grep -i ingress`.
28+
29+
2. Now your installation is available at `https://123-123-123-123.ip.mygitpod.com`
1530
1631
#####TODO
32+
## IngressMode: `pathAndHost`
33+
34+
## IngressMode: `hosts`
35+
1736
1837
### Domain
1938
Gitpod requires a domain resolvable by some nameserver (typically a public domain name, e.g. `your-domain.com`).

docs/self-hosted/install/docker-registry.md

Lines changed: 51 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
url: /docs/self-hosted/latest/install/docker-registry/
33
---
44

5-
#####TODO
65
# Docker Registry
76

87
Gitpod builds Docker images during workspace startup. This enables custom Dockerfiles as part of your workspace config, but is also required for Gitpod itself to function.
@@ -14,20 +13,60 @@ By default Gitpod ships with a built-in Docker registry. If you operate your own
1413
The docker registry requires a Kubernetes PersistentVolume. This registry is not recommended to be used for production.
1514
* Own docker registry: Gitpod can connect to your own docker registry. Compared to its built-in counterpart this enables performance gains and access to otherwise private images.
1615

17-
This helm chart can either deploy its own registry (default but requires [HTTPS certs](../https-certs/)) or use an existing one.
18-
To connect to an existing Docker registry, do the following steps:
16+
This helm chart can either deploy its own registry (default but requires [HTTPS certs](../configures-ingress/)) or use an existing one.
1917

20-
```
21-
echo values/registry.yaml >> configuration.txt
22-
```
18+
## Configuration
19+
To connect to an existing Docker registry, perform the following steps:
2320

24-
In `values/registry.yaml` replace `your.registry.com` with the name of your registry.
21+
1. Create a file `values.docker-registry.yaml` containing:
22+
```
23+
components:
24+
imageBuilder:
25+
registryCerts: []
26+
registry:
27+
# name must not end with a "/"
28+
name: eu.gcr.io/gpl-sh-kubeup-2
29+
secretName: image-builder-registry-secret
30+
path: secrets/registry-auth.json
2531
26-
Login to the registry and safe the authentication
27-
```
28-
docker --config secrets/ login your.registry.com && mv secrets/config.json secrets/registry-auth.json
29-
```
32+
workspace:
33+
pullSecret:
34+
secretName: image-builder-registry-secret
3035
31-
Make sure the resulting JSON file contains the credentials (there should be an `auth` section containing them as base64 encoded string).
36+
docker-registry:
37+
enabled: false
38+
```
39+
Replace `your.registry.com/gitpod` with the domain your registry is available at.
40+
41+
2. Login to the registry and safe the authentication
42+
```
43+
mkdir -p secrets
44+
docker login your.registry.com/gitpod && cp ~/.docker/config.json secrets/registry-auth.json
45+
```
46+
47+
> This does not work for Google Cloud Registries because their login tokens are short-lived. See the [example](#example-google-cloud-registry-credentials) below on how to configure it.
48+
49+
3. Do a `helm upgrade --install -f values.docker-registry.yaml gitpod .` to apply the changes.
50+
51+
Make sure the resulting JSON file contains the credentials (there should be an `auths` section containing them as base64 encoded string).
3252
3353
If that's not the case you might have a credential store/helper set up (e.g. on macOS the _Securely store Docker logins in macOS keychain_ setting).
54+
55+
### Example Google Cloud Registry Credentials
56+
57+
Prerequisites:
58+
- `gcloud` [installed](https://cloud.google.com/sdk/docs/quickstart) and [authenticated](https://cloud.google.com/sdk/gcloud/reference/auth/login)
59+
60+
How to use Google Cloud Registry as Docker registry for Gitpod:
61+
1. Go to [https://console.cloud.google.com/gcr/images/\<your-project-id\>?project=\<your-project-id\>](https://console.cloud.google.com/gcr/images/\<your-project-id\>?project=\<your-project-id\>) and hit "Enable Registry API" (if not already enabled).
62+
63+
1. Execute the following commands:
64+
```
65+
export PROJECT_ID="<your-project-id>"
66+
67+
gcloud iam service-accounts create gitpod-registry-full --project=$PROJECT_ID
68+
gcloud projects add-iam-policy-binding $PROJECT_ID --member="serviceAccount:gitpod-registry-full@$PROJECT_ID.iam.gserviceaccount.com" --role=roles/storage.admin
69+
gcloud iam service-accounts keys create gitpod-registry-full-key.json --iam-account=gitpod-registry-full@$PROJECT_ID.iam.gserviceaccount.com
70+
71+
echo "{\"auths\":{\"gcr.io\": {\"auth\": \"$(echo -n "$(echo -n "_json_key:"; cat gitpod-registry-full-key.json)" | base64 -w 0)\"}}}" > secrets/registry-auth.json
72+
```

docs/self-hosted/install/install-on-kubernetes.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Gitpod is installed using [Helm](https://helm.sh). The chart can be found [here]
1313

1414
## Installation
1515

16-
To perform the installation run the following commands:
16+
To initiate the deployment run the following commands:
1717

1818
```console
1919
git clone https://github.com/gitpod-io/gitpod
@@ -23,16 +23,27 @@ helm repo add charts.gitpod.io https://charts.gitpod.io
2323
helm repo add stable https://charts.helm.sh/stable
2424
helm repo add stable https://helm.min.io/
2525
helm repo update
26+
helm dep up
2627

27-
helm upgrade --install $(for i in $(cat configuration.txt); do echo -e "-f $i"; done) gitpod .
28+
helm install gitpod .
2829
```
29-
#####TODO
30-
## Recommended Configuration
3130

31+
> Review the deployment worked properly by running `kubectl get pods`. Eventually all pods should be up-and-running. In case they are not have a look the the [Troubleshooting Guide](./troubleshooting.md)
32+
33+
1. Configure [ingress into the cluster](../configure-ingress/)
34+
35+
2. Go to https://123-123-123-123.ip.mygitpod.com/workspace and follow the steps to setup OAuth
36+
37+
## Recommended Configuration
3238

39+
Without further configuration the Helm chart installs a working Gitpod installation in a lot of scenarios.
40+
Yet, there are certain things you want to review when installing Gitpod for long term use or a bigger audience:
41+
* [**Database**](../database/): Configure where Gitpod stores all internal runtime data.
42+
* [**Storage**](../storage/): Configure where Gitpod persists workspace content.
43+
* [**Docker Registry**](../docker-registry/): Configure where Gitpod stores workspace images that are build at runtime.
3344

3445
## Customization
3546

36-
* [**Storage**](../storage/): Configure where Gitpod stores stopped workspaces.
47+
Further customizations:
3748
* [**Kubernetes Nodes**](../nodes/): Configure file system layout and the workspace's node associativity.
3849
* [**Workspaces**](../workspaces/): Configure workspace sizing.

0 commit comments

Comments
 (0)