Skip to content
This repository was archived by the owner on May 20, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/JesterOrNot/Gitpod-AWS)

Gitpod running on AWS! This likley will be a temporary repo untill its hopefully merged into Gitpod Self Hosted! But who knows?
Gitpod running on AWS! This likley will be a temporary repo untill its hopefully
merged into Gitpod Self Hosted! But who knows?

To install it run the following

Expand All @@ -22,4 +23,7 @@ You can find the defaults in src/variables.tf

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/JesterOrNot/Gitpod-AWS)

You will need to setup the following enviornment variables though to get the AWS setup to work [configure the following enviornment in Gitpod](https://www.gitpod.io/docs/environment-variables/) `AWS_SECRET_ACCESS_KEY` and `AWS_ACCESS_KEY_ID`
You will need to setup the following enviornment variables though to get the AWS
setup to work
[configure the following enviornment in Gitpod](https://www.gitpod.io/docs/environment-variables/)
`AWS_SECRET_ACCESS_KEY` and `AWS_ACCESS_KEY_ID`
18 changes: 9 additions & 9 deletions scripts/install-gitpod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@ cd src || exit
terraform init
did_fail="failed"
# Take varriardic arguments from $1 on, the or statement will be used for error handling incase the install fails
echo 'yes' | terraform apply "${@: 1}" || did_fail=""
if [ -z $did_fail ]; then
printf "\x1b[31mSomething went wrong during the installation of Gitpod Self Hosted for AWS. This should not happen. Destroying any dangling infrastructure. Please file an issue at https://github.com/gitpod-io/self-hosted\x1b[m"
echo 'yes' | terraform destroy
exit
echo 'yes' | terraform apply "${@:1}" || did_fail=""
if [ -z "$did_fail" ]; then
printf "\x1b[31mSomething went wrong during the installation of Gitpod Self Hosted for AWS. This should not happen. Destroying any dangling infrastructure. Please file an issue at https://github.com/gitpod-io/self-hosted\x1b[m"
echo 'yes' | terraform destroy
exit
fi
# Configure local machine for the kubernetes cluseter
aws eks --region "$(cat <(terraform output region))" update-kubeconfig --name "$(cat <(terraform output cluster_name))"
kubectl apply -f <(terraform output config_map_aws_auth)
# Clone self-hosted if it doesn't exist
if ! [ -d self-hosted ]; then
git clone "https://github.com/gitpod-io/self-hosted.git"
git clone "https://github.com/gitpod-io/self-hosted.git"
fi
cd self-hosted || exit
# Necassary Kubernetes stuffs
kubectl create -f utils/helm-2-tiller-sa-crb.yaml
helm repo add charts.gitpod.io "https://charts.gitpod.io"
helm dep update
# The point of this script is automation as I couldn't get it done in a provisioner and since we require a static IP its the first argument
cat << EOF > values.yaml
cat <<EOF >values.yaml
gitpod:
hostname: $1
components:
Expand All @@ -34,9 +34,9 @@ gitpod:
EOF
# If self-hosted already exists there is a chance that there is extra configuration for self-hosted which the following honors
if [ -f "configuration.txt" ]; then
helm upgrade --install $(for i in $(cat configuration.txt); do echo -e "-f $i"; done) gitpod .
helm upgrade --install "$(for i in "$(cat configuration.txt)"; do echo -e "-f $i"; done)" gitpod .
else
helm install gitpod .
helm install gitpod .
fi
cd .. || exit
rm -rf self-hosted
Expand Down