Skip to content

Commit cd8f78e

Browse files
Simon Emmsmrsimonemms
Simon Emms
authored andcommitted
Update guide to use the Gitpod installer
1 parent 12e9655 commit cd8f78e

11 files changed

+217
-506
lines changed

Diff for: .env.example

-2
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

Diff for: .gitignore

+2
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

Diff for: Dockerfile

+9
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

Diff for: Makefile

+1-5
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ uninstall: ## Uninstall Gitpod
2121
@echo "Starting uninstall process..."
2222
@$(call DOCKER_RUN_CMD, --uninstall)
2323

24-
auth: ## Install OAuth providers
25-
@echo "Installing auth providers..."
26-
@$(call DOCKER_RUN_CMD, --auth)
27-
2824
help: ## Display this help
2925
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
3026

31-
.PHONY: build install uninstall auth help
27+
.PHONY: build install uninstall help

Diff for: README.md

+62-41
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,62 @@ 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
50-
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
79+
NAME READY STATUS RESTARTS AGE
80+
agent-smith-c9v58 2/2 Running 0 7m35s
81+
agent-smith-j7b85 2/2 Running 0 7m35s
82+
agent-smith-mwf5d 2/2 Running 0 7m35s
83+
blobserve-84f895c88c-476m2 2/2 Running 0 7m33s
84+
content-service-57c7fdb84d-dl49k 1/1 Running 0 7m34s
85+
dashboard-b79d84d47-z7hzg 1/1 Running 0 7m34s
86+
image-builder-mk3-5ff7c68bb4-qqbw5 2/2 Running 0 7m34s
87+
jaeger-operator-777d987c8b-ts9gw 1/1 Running 0 7m33s
88+
messagebus-0 1/1 Running 0 7m34s
89+
minio-697975c744-swwp6 1/1 Running 0 7m34s
90+
minio-697975c744-tj96r 1/1 Running 0 7m34s
91+
openvsx-proxy-0 1/1 Running 0 7m34s
92+
proxy-c58846cf5-cbdgb 2/2 Running 0 7m33s
93+
registry-facade-84sgf 2/2 Running 0 7m34s
94+
registry-facade-n6kc9 2/2 Running 0 7m35s
95+
registry-facade-zt7qt 2/2 Running 0 7m34s
96+
server-689b886647-dkd5h 2/2 Running 0 7m34s
97+
ws-48fe6d74-6e6d-4e3e-a6a4-1bf160b4ed3d 1/1 Running 0 2m43s
98+
ws-daemon-v8284 2/2 Running 0 7m35s
99+
ws-daemon-vs59b 2/2 Running 0 7m35s
100+
ws-daemon-w6gmj 2/2 Running 0 7m35s
101+
ws-manager-54c8f9995f-lrrkx 1/1 Running 0 7m34s
102+
ws-manager-bridge-8648cd6b69-nqxnh 2/2 Running 0 7m34s
103+
ws-proxy-574f9dcbcc-qrn5m 1/1 Running 0 7m33s
104+
ws-scheduler-84d99cbbbb-5p86k 2/2 Running 0 7m34s
72105
```
73106

74107
### Test Gitpod workspaces
@@ -85,18 +118,6 @@ It should display the Gitpod login page similar to the next image.
85118

86119
----
87120

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-
100121
## Destroy the cluster and Azure resources
101122

102123
Remove the Azure cluster running:

Diff for: auth-providers-patch.yaml

-19
This file was deleted.

0 commit comments

Comments
 (0)