From 7eea9bb11bb7c4ed365a80fad571286ab7120560 Mon Sep 17 00:00:00 2001 From: daljitdokal Date: Wed, 20 Jan 2021 18:17:43 +1300 Subject: [PATCH] Added docker-compose install. Co-authored-by: jmhbnz --- 4-install-docker.sh | 5 +++++ 5-teardown-cloud-resources.sh | 4 +++- README.org | 5 +++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/4-install-docker.sh b/4-install-docker.sh index 8a010db..0fb2c30 100755 --- a/4-install-docker.sh +++ b/4-install-docker.sh @@ -11,3 +11,8 @@ export gcp_machine_name=$(gcloud compute instances list --limit=1 --format='valu # Connect to the machine using ssh gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh" + +# Install docker compose +gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "sudo curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose" + +gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "sudo chmod +x /usr/local/bin/docker-compose" diff --git a/5-teardown-cloud-resources.sh b/5-teardown-cloud-resources.sh index 378ff11..857e54c 100755 --- a/5-teardown-cloud-resources.sh +++ b/5-teardown-cloud-resources.sh @@ -1,7 +1,9 @@ #!/bin/bash # Step 5 - Teardown cloud resources -# The Google Cloud Platform resources created by this process come at a cost, so it's important we have an easy way to teardown those resources as soon as we're finished with them. +# The Google Cloud Platform resources created by this process come at a cost, so it's important we have an easy way to teardown those resources as soon as we're finished with them! + +# The script below will delete any projects containing ~gitlab~ in the name along with any compute instances running in those projects. # Tangle the shell block below to a shell script by pressing *, b t* in emacs command mode: diff --git a/README.org b/README.org index 3e8c443..4013d64 100644 --- a/README.org +++ b/README.org @@ -99,6 +99,11 @@ export gcp_machine_name=$(gcloud compute instances list --limit=1 --format='valu # Connect to the machine using ssh gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh" + +# Install docker compose +gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "sudo curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose" + +gcloud compute ssh $gcp_machine_name --ssh-key-file ~/.ssh/$USER -- "sudo chmod +x /usr/local/bin/docker-compose" #+end_src