Skip to content

Instantly share code, notes, and snippets.

@ao
Last active July 30, 2024 08:33
Show Gist options
  • Save ao/6909211f42297fa633a913cae6f21ff3 to your computer and use it in GitHub Desktop.
Save ao/6909211f42297fa633a913cae6f21ff3 to your computer and use it in GitHub Desktop.
ubuntu_devops_tools_quickstart.sh
#!/bin/bash
apt install jq -y
# Install Terraform (latest version)
LATEST_TF_VERSION=$(curl -s https://api.github.com/repos/hashicorp/terraform/releases/latest | jq -r '.tag_name')
curl -LO "https://releases.hashicorp.com/terraform/${LATEST_TF_VERSION#v}/terraform_${LATEST_TF_VERSION#v}_linux_amd64.zip"
unzip "terraform_${LATEST_TF_VERSION#v}_linux_amd64.zip"
sudo mv terraform /usr/local/bin/
rm "terraform_${LATEST_TF_VERSION#v}_linux_amd64.zip"
# Install kubectl (latest version)
LATEST_KUBECTL_VERSION=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$LATEST_KUBECTL_VERSION/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
# Install Docker
sudo apt-get update
sudo apt-get install -y docker.io
# Install Helm (latest version)
curl -LO "https://get.helm.sh/helm-$(curl -s https://api.github.com/repos/helm/helm/releases/latest | jq -r '.tag_name')-linux-amd64.tar.gz"
tar -zxvf "helm-$(curl -s https://api.github.com/repos/helm/helm/releases/latest | jq -r '.tag_name')-linux-amd64.tar.gz"
sudo mv linux-amd64/helm /usr/local/bin/
rm -rf linux-amd64 helm-*.tar.gz
echo "Installation completed!"
@ao
Copy link
Author

ao commented Jul 29, 2024

sudo curl -L -s https://gist.githubusercontent.com/ao/6909211f42297fa633a913cae6f21ff3/raw/c9eea6138c079227c3f34d7fb9d46114bc00076b/ubuntu_devops_tools_quickstart.sh | sudo bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment