Process updated for GitHub CLI and gcp service account.

Co-authored-by: jmhbnz <mail@jamesblair.net>
This commit is contained in:
Daljit Singh
2021-02-17 18:15:07 +13:00
parent bd70187287
commit f7c3a796b4
10 changed files with 87 additions and 24 deletions

25
1-install-utilities.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
# Step 1 - Ensure GCP SDK is installed
# To automate our interactions with Google Cloud Platform we'll use the [[https://cloud.google.com/sdk/docs/install#deb][GCP SDK]] which provides us with a number of command line tools to interact with the platform, such as ~gcloud~, ~gsutil~ and ~kubectl~.
# Tangle the shell block below to a shell script by pressing *, b t* in emacs command mode:
# #+NAME: Install google cloud sdk
# Add the Cloud SDK distribution URI as a package source
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee /etc/apt/sources.list.d/google-cloud-sdk.list
# Make sure apt-transport-https is installed
sudo apt-get install -y apt-transport-https ca-certificates gnupg
# Import the Google Cloud public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
# Update and install the SDK
sudo apt-get update && sudo apt-get install -y google-cloud-sdk
# Install GitHub CLI
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
sudo apt-add-repository https://cli.github.com/packages
sudo apt-get update && sudo apt-get install gh