github.com/rohankumardubey/nomad@v0.11.8/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 curl \ 25 jq \ 26 tree \ 27 unzip \ 28 wget 29 30 # Install ARM build utilities 31 apt-get install -y \ 32 binutils-aarch64-linux-gnu \ 33 binutils-arm-linux-gnueabihf \ 34 gcc-5-aarch64-linux-gnu \ 35 gcc-5-arm-linux-gnueabihf \ 36 gcc-5-multilib-arm-linux-gnueabihf 37 38 # Install Windows build utilities 39 apt-get install -y \ 40 binutils-mingw-w64 \ 41 gcc-mingw-w64 42 43 # Ensure everything is up to date 44 apt-get upgrade -y 45 46 # Set hostname -> IP to make advertisement work as expected 47 ip=$(ip route get 1 | awk '{print $NF; exit}') 48 hostname=$(hostname) 49 sed -i -e "s/.*nomad.*/${ip} ${hostname}/" /etc/hosts 50 51 # Ensure we cd into the working directory on login 52 if ! grep "cd /opt/gopath/src/github.com/hashicorp/nomad" /home/vagrant/.profile ; then 53 echo 'cd /opt/gopath/src/github.com/hashicorp/nomad' >> /home/vagrant/.profile 54 fi