Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit f8b16d7

Browse files
committed
Add docker image
1 parent c2ad0e9 commit f8b16d7

File tree

4 files changed

+50
-14
lines changed

4 files changed

+50
-14
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.env
2+
.github
3+
.git
4+
*.json

Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM alpine:3.14
2+
3+
RUN apk add --no-cache \
4+
bash \
5+
curl \
6+
python3 \
7+
py3-pip \
8+
jq
9+
10+
ARG CLOUD_SDK_VERSION=351.0.0
11+
ARG HELM_VERSION=v3.6.3
12+
13+
RUN curl -fsSL "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl \
14+
&& chmod +x /usr/local/bin/kubectl
15+
16+
RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz \
17+
&& tar xzf google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz \
18+
&& rm google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz
19+
20+
RUN mkdir -p /tmp/helm/ \
21+
&& curl -fsSL https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz | tar -xzvC /tmp/helm/ --strip-components=1 \
22+
&& cp /tmp/helm/helm /usr/local/bin/helm \
23+
&& rm -rf /tmp/helm
24+
25+
ENV PATH /google-cloud-sdk/bin:$PATH
26+
27+
RUN gcloud components install beta
28+
RUN gcloud components install alpha
29+
30+
WORKDIR /gitpod
31+
32+
COPY . /gitpod
33+
34+
ENTRYPOINT ["/gitpod/setup.sh"]

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ build: ## Build docker image containing the required tools for the installation
99
@docker build --quiet . -t ${IMG}
1010

1111
DOCKER_RUN_CMD = docker run -it \
12-
--env-file ${PWD}/.env \
13-
--volume ${PWD}/.kubeconfig:/gitpod/.kubeconfig \
14-
--volume ${PWD}/eks-cluster.yaml:/gitpod/eks-cluster.yaml \
12+
--env GOOGLE_APPLICATION_CREDENTIALS=/gcloud/application_default_credentials.json \
13+
--volume $$HOME/.config/gcloud:/root/.config/gcloud \
14+
--volume $$PWD:/gitpod \
1515
${IMG} $(1)
1616

1717
install: ## Install Gitpod
1818
@echo "Starting install process..."
19-
@touch ${PWD}/.kubeconfig
20-
@$(call DOCKER_RUN_CMD, --install)
19+
@test -s $$HOME/.config/gcloud/application_default_credentials.json || { echo "GCP default dredentials do not exist. Run [gcloud auth application-default login] to configure them"; exit 1; }
20+
$(call DOCKER_RUN_CMD, --install)
2121

2222
uninstall: ## Uninstall Gitpod
2323
@echo "Starting uninstall process..."

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Before starting the installation process, you need:
66

77
- A GCP account with Administrator access
8-
- [Create one now by clicking here](https://aws.amazon.com/getting-started/)
8+
- [Create one now by clicking here](https://console.cloud.google.com/)
99
- GCP credentials set up.
1010
- A `.env` file with basic details about the environment.
1111
- We provide an example of such file [here](.env.example).
@@ -20,9 +20,9 @@ make install
2020
The whole process takes around twenty minutes. In the end, the following resources are created:
2121

2222
- a GKE cluster running Kubernetes v1.21
23-
24-
- ALB load balancer with TLS termination and re-encryption
23+
- GCP L4 load balancer
2524
- Cloud SQL Mysql database
25+
- Cloud DNS zone
2626
- In-cluster docker registry using [Cloud Storage](https://cloud.google.com/storage) as storage backend
2727
- [calico](https://docs.projectcalico.org) as CNI and NetworkPolicy implementation
2828
- [cert-manager](https://cert-manager.io/) for self-signed SSL certificates
@@ -60,15 +60,13 @@ When the provisioning and configuration of the cluster is done, the script shows
6060
like:
6161

6262
```shell
63-
Load balancer hostname: k8s-default-gitpod-.......elb.amazonaws.com
63+
Load balancer IP address: XXX.XXX.XXX.XXX
6464
```
6565

66-
This is the value of the `CNAME` field that needs to be configured in the DNS domain, for the record `<domain>`, `*.ws.<domain>` and `*.<domain>`
67-
68-
After these three records are configured, please open the URL `https://<domain>/workspaces`.
66+
Please open the URL `https://<domain>/workspaces`.
6967
It should display the gitpod login page similar to the next image.
7068

71-
> If the property `ROUTE53_ZONEID` is enabled in the .env file, we install [external-dns](https://github.com/kubernetes-sigs/external-dns) and such update is not required
69+
*DNS propagation* can take several minutes.
7270

7371
![Gitpod login page](./images/gitpod-login.png "Gitpod Login Page")
7472

@@ -88,7 +86,7 @@ make auth
8886
8987
## Destroy the cluster and GCP resources
9088

91-
Remove the GKE cluster running:
89+
Remove the GCP cluster running:
9290

9391
```shell
9492
make uninstall

0 commit comments

Comments
 (0)