Skip to content

Instantly share code, notes, and snippets.

@cavemandaveman
Last active January 13, 2022 21:57
Show Gist options
  • Save cavemandaveman/6d7abee874bfe9c79c1703f8b6d0eacf to your computer and use it in GitHub Desktop.
Save cavemandaveman/6d7abee874bfe9c79c1703f8b6d0eacf to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -exo pipefail
# Prep
apt-get clean
apt-get update -y
apt-get upgrade -y
# Install Python3 and PIP
apt-get install -y --no-install-recommends \
python3 \
python3-dev \
python3-pip \
python3-venv \
python-is-python3
# Install and configure PIPX
PIPX_ENV_FILE=/etc/profile.d/pipx.sh
export PIPX_BIN_DIR=/usr/local/bin
export PIPX_HOME=/opt/pipx
echo "export PIPX_BIN_DIR=$PIPX_BIN_DIR" | tee -a $PIPX_ENV_FILE
echo "export PIPX_HOME=$PIPX_HOME" | tee -a $PIPX_ENV_FILE
python -m pip install pipx
python -m pipx ensurepath
# Install Ansible, Azure CLI
pipx install ansible-core
pipx install azure-cli
# Add Terraform APT repo
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
# Install terraform, maven, Java 8, tree
# not Java 11
apt-get install -y --no-install-recommends \
terraform \
maven \
openjdk-11*- \
openjdk-8-jdk \
tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment