Skip to content

Instantly share code, notes, and snippets.

@esell
Last active July 26, 2017 20:46
Show Gist options
  • Save esell/ed155570c6d55f1bba46535c6cd4aa17 to your computer and use it in GitHub Desktop.
Save esell/ed155570c6d55f1bba46535c6cd4aa17 to your computer and use it in GitHub Desktop.
#!/bin/bash
# appears azure doesn't like to update
# their agent during setup so we'll hold it
apt-mark hold walinuxagent
# get Ubuntu updates
apt-get update
if [ $? -ne 0 ]; then
echo "update failed"
exit 1
fi
apt-get upgrade -y
if [ $? -ne 0 ]; then
echo "upgrade failed"
exit 1
fi
# some pre-reqs for node later
apt-get install -y g++ build-essential
# make the azure agent available
# for updates
apt-mark unhold walinuxagent
# install latest node
curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs
# install azure CLI 1.0
npm install --unsafe-perm -g azure-cli
# install azure CLI 2.0
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
apt-key adv --keyserver packages.microsoft.com --recv-keys 417A0893
apt-get update
apt-get install -y azure-cli
# install go
cd /tmp
wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.8.3.linux-amd64.tar.gz
# dotfiles
apt-get install -y fonts-hack-otf fonts-hack-ttf
mkdir /home/esell/git
cd /home/esell/git
git clone https://git.esheavyindustries.com/esell/dotfiles.git
cd /home/esell/git/dotfiles
export HOME=/home/esell
/usr/bin/make
chown -R esell:esell /home/esell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment