github.com/bigcommerce/nomad@v0.9.3-bc/scripts/vagrant-linux-priv-config.sh (about) 1 #!/usr/bin/env bash 2 3 export DEBIAN_FRONTEND=noninteractive 4 5 # Update and ensure we have apt-add-repository 6 apt-get update 7 apt-get install -y software-properties-common 8 9 # Add i386 architecture (for libraries) 10 dpkg --add-architecture i386 11 12 # Update with i386, Go and Docker 13 apt-get update 14 15 # Install Core build utilities for Linux 16 apt-get install -y \ 17 build-essential \ 18 git \ 19 libc6-dev-i386 \ 20 libpcre3-dev \ 21 linux-libc-dev:i386 \ 22 pkg-config \ 23 zip 24 25 # Install Development utilities 26 apt-get install -y \ 27 curl \ 28 default-jre \ 29 htop \ 30 jq \ 31 qemu \ 32 silversearcher-ag \ 33 tree \ 34 unzip \ 35 vim 36 37 # Install ARM build utilities 38 apt-get install -y \ 39 binutils-aarch64-linux-gnu \ 40 binutils-arm-linux-gnueabihf \ 41 gcc-5-aarch64-linux-gnu \ 42 gcc-5-arm-linux-gnueabihf \ 43 gcc-5-multilib-arm-linux-gnueabihf 44 45 # Install Windows build utilities 46 apt-get install -y \ 47 binutils-mingw-w64 \ 48 gcc-mingw-w64 49 50 # Ensure everything is up to date 51 apt-get upgrade -y 52 53 # Set hostname -> IP to make advertisement work as expected 54 ip=$(ip route get 1 | awk '{print $NF; exit}') 55 hostname=$(hostname) 56 sed -i -e "s/.*nomad.*/${ip} ${hostname}/" /etc/hosts 57 58 # Ensure we cd into the working directory on login 59 if ! grep "cd /opt/gopath/src/github.com/hashicorp/nomad" /home/vagrant/.profile ; then 60 echo 'cd /opt/gopath/src/github.com/hashicorp/nomad' >> /home/vagrant/.profile 61 fi