Skip to content

Commit 53404dc

Browse files
author
Simon Emms
committed
Update guide to use the Gitpod installer
1 parent 12e9655 commit 53404dc

File tree

10 files changed

+216
-500
lines changed

10 files changed

+216
-500
lines changed

.env.example

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
# https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal
33
AZURE_SUBSCRIPTION_ID=""
44
AZURE_TENANT_ID=""
5-
AZURE_CLIENT_ID=""
6-
AZURE_CLIENT_SECRET=""
75

86
# The name of the Kubernetes cluster
97
CLUSTER_NAME=gitpod

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.env
22
.kube
33
.idea
4+
gitpod.yaml
5+
gitpod-config.yaml

Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
ARG GITPOD_VERSION="main.1887"
2+
3+
FROM eu.gcr.io/gitpod-core-dev/build/installer:$GITPOD_VERSION as installer
4+
15
FROM mcr.microsoft.com/azure-cli:2.9.1
26

37
RUN apk add --no-cache \
@@ -14,6 +18,11 @@ RUN mkdir -p /tmp/helm/ \
1418
&& cp /tmp/helm/helm /usr/local/bin/helm \
1519
&& rm -rf /tmp/helm
1620

21+
RUN curl -fsSL https://github.com/mikefarah/yq/releases/download/v4.12.2/yq_linux_amd64 -o /usr/local/bin/yq \
22+
&& chmod +x /usr/local/bin/yq
23+
24+
COPY --from=installer /app/installer /usr/local/bin/gitpod-installer
25+
1726
WORKDIR /gitpod
1827

1928
COPY . /gitpod

README.md

Lines changed: 62 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,20 @@ Before starting the installation process, you need:
44

55
- An Azure account
66
- [Create one now by clicking here](https://azure.microsoft.com/en-gb/free/)
7-
- Azure [service principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal). This needs to have "Owner" IAM rights on the subscription and set up with "Group Administrator" ActiveDirectory role
8-
- Log into [portal.azure.com](https://portal.azure.com/) and navigate to [Azure Active Directory](https://portal.azure.com/?quickstart=True#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview).
9-
- Select the [Roles and Administrators](https://portal.azure.com/?quickstart=True#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RolesAndAdministrators)
10-
- Select the role Groups Administrator
11-
- Select "Add assignments" and add your service principal
7+
- A user account with "Owner" IAM rights on the subscription
128
- A `.env` file with basic details about the environment.
139
- We provide an example of such file [here](.env.example).
1410
- [Docker](https://docs.docker.com/engine/install/) installed on your machine, or better, a Gitpod workspace :)
1511

12+
## Azure authentication
13+
14+
For simplicity, this guide does **not** use an Azure [service principal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal).
15+
Authentication is done via an interactive URL, similar to this:
16+
17+
```shell
18+
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code ABC123DEF to authenticate.
19+
```
20+
1621
**To start the installation, execute:**
1722

1823
```shell
@@ -23,13 +28,13 @@ The whole process takes around twenty minutes. In the end, the following resourc
2328

2429
- an AKS cluster running Kubernetes v1.21.
2530
- Azure load balancer.
26-
- ~~Azure MySQL database.~~ MySQL will be provided by Helm until [#5508](https://github.com/gitpod-io/gitpod/issues/5508) solved.
31+
- Azure MySQL database.
2732
- Azure Blob Storage.
2833
- Azure DNS zone.
2934
- Azure container registry.
3035
- [calico](https://docs.projectcalico.org) as CNI and NetworkPolicy implementation.
3136
- [cert-manager](https://cert-manager.io/) for self-signed SSL certificates.
32-
- [Jaeger operator](https://github.com/jaegertracing/helm-charts/tree/main/charts/jaeger-operator) - and Jaeger deployment for gitpod distributed tracing.
37+
- [Jaeger operator](https://github.com/jaegertracing/helm-charts/tree/main/charts/jaeger-operator) - and Jaeger deployment for Gitpod distributed tracing.
3338
- [gitpod.io](https://github.com/gitpod-io/gitpod) deployment.
3439

3540
### Common errors running make install
@@ -41,34 +46,63 @@ The whole process takes around twenty minutes. In the end, the following resourc
4146

4247
*After increasing the quota, retry the installation running `make install`*
4348

49+
- Some pods never start (`Init` state)
50+
51+
```shell
52+
kubectl get pods -l component=proxy
53+
NAME READY STATUS RESTARTS AGE
54+
proxy-5998488f4c-t8vkh 0/1 Init 0/1 0 5m
55+
```
56+
57+
The most likely reason is because the [DNS01 challenge](https://cert-manager.io/docs/configuration/acme/dns01/) has yet to resolve. If using `SETUP_MANAGED_DNS`, you will need to update your DNS records to point to the Azure DNS zone nameserver.
58+
59+
Once the DNS record has been updated, you will need to delete all Cert Manager pods to retrigger the certificate request
60+
61+
```shell
62+
kubectl delete pods -n cert-manager --all
63+
```
64+
65+
After a few minutes, you should see the `https-certificate` become ready.
66+
67+
```shell
68+
kubectl get certificate
69+
NAME READY SECRET AGE
70+
https-certificates True https-certificates 5m
71+
```
72+
4473
## Verify the installation
4574

4675
First, check that Gitpod components are running.
4776

4877
```shell
4978
kubectl get pods
5079
NAME READY STATUS RESTARTS AGE
51-
blobserve-5584456c68-t2vf6 2/2 Running 0 7m40s
52-
content-service-69fbcdf9fc-ngq9n 1/1 Running 0 7m39s
53-
dashboard-86877b7779-8rtdj 1/1 Running 0 7m40s
54-
image-builder-6557d4b5cf-xl9xf 3/3 Running 0 7m39s
55-
jaeger-5dfd44f668-8tj9x 1/1 Running 0 7m46s
56-
messagebus-0 1/1 Running 0 7m40s
57-
minio-76f8b45fb7-brr96 1/1 Running 0 7m40s
58-
mysql-0 1/1 Running 0 7m40s
59-
proxy-69d87469f9-fdx9l 1/1 Running 0 7m40s
60-
proxy-69d87469f9-qsmwg 1/1 Running 0 7m40s
61-
registry-facade-5xlhh 2/2 Running 0 7m39s
62-
registry-facade-qzmft 2/2 Running 0 7m39s
63-
registry-facade-vk9q4 2/2 Running 0 7m39s
64-
server-6bfdcbfd5b-2kwbt 2/2 Running 0 7m39s
65-
ws-daemon-7fqd5 2/2 Running 0 7m39s
66-
ws-daemon-jl46t 2/2 Running 0 7m39s
67-
ws-daemon-q9k9l 2/2 Running 0 7m39s
68-
ws-manager-66f6b48c8-ts286 2/2 Running 0 7m40s
69-
ws-manager-bridge-5dfb558c96-kcxvr 1/1 Running 0 7m40s
70-
ws-proxy-979dd587b-ghjf4 1/1 Running 0 7m39s
71-
ws-proxy-979dd587b-mtkxt 1/1 Running 0 7m39s
80+
agent-smith-67mj5 2/2 Running 0 3m24s
81+
agent-smith-khv98 2/2 Running 0 3m24s
82+
agent-smith-ncvzc 2/2 Running 0 3m24s
83+
blobserve-85c48c8789-hr486 2/2 Running 0 3m24s
84+
content-service-7786d99476-6z7ws 1/1 Running 0 3m24s
85+
dashboard-679cb8dbf-mm6hg 1/1 Running 0 3m24s
86+
dbinit-session-s5v7f 0/1 Completed 0 3m23s
87+
image-builder-mk3-6798697948-h994t 2/2 Running 0 3m24s
88+
jaeger-operator-6cc9f79cc8-t5z7p 1/1 Running 0 3m24s
89+
messagebus-0 1/1 Running 0 3m24s
90+
migrations-j5tcc 0/1 Completed 0 3m23s
91+
minio-bcb6cdddb-7rgwx 1/1 Running 0 3m23s
92+
minio-bcb6cdddb-nhbqv 1/1 Running 0 3m23s
93+
openvsx-proxy-0 1/1 Running 0 3m24s
94+
proxy-589657d8d5-p4xwq 2/2 Running 0 3m23s
95+
registry-facade-pks57 2/2 Running 0 3m24s
96+
registry-facade-rwh5l 2/2 Running 0 3m24s
97+
registry-facade-t8jhb 2/2 Running 0 3m25s
98+
server-84ddd9d6b5-fjlpj 2/2 Running 0 3m23s
99+
ws-daemon-95ms7 2/2 Running 0 3m25s
100+
ws-daemon-psdcv 2/2 Running 0 3m25s
101+
ws-daemon-q2z2f 2/2 Running 0 3m25s
102+
ws-manager-bridge-6f775fb4fc-p475k 2/2 Running 0 3m23s
103+
ws-manager-c89cbc75d-bnw9k 1/1 Running 0 3m23s
104+
ws-proxy-757d8f5bf8-7mv2c 1/1 Running 0 3m23s
105+
ws-scheduler-58c65c759-jwtv5 2/2 Running 0 3m24s
72106
```
73107

74108
### Test Gitpod workspaces
@@ -85,18 +119,6 @@ It should display the Gitpod login page similar to the next image.
85119

86120
----
87121

88-
## Update Gitpod auth providers
89-
90-
Please check the [OAuth providers integration documentation](https://www.gitpod.io/docs/self-hosted/0.5.0/install/oauth) expected format.
91-
92-
We provide an [example here](./auth-providers-patch.yaml). Fill it with your OAuth providers data.
93-
94-
```console
95-
make auth
96-
```
97-
98-
> We are aware of the limitation of this approach, and we are working to improve the Helm chart to avoid this step.
99-
100122
## Destroy the cluster and Azure resources
101123

102124
Remove the Azure cluster running:

auth-providers-patch.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)