open-nomad/scripts/vagrant-linux-priv-dev.sh
Mahmood Ali 67b6758bed Add a Docker release scripts
Also tease out some dev and docker bits from Vagrant scripts to ease
sharing with Docker script
2019-03-17 10:37:36 -04:00

25 lines
625 B
Bash
Executable file

#!/usr/bin/env bash
# Install Development utilities
apt-get install -y \
curl \
default-jre \
htop \
jq \
qemu \
silversearcher-ag \
tree \
unzip \
vim
# Set hostname -> IP to make advertisement work as expected
ip=$(ip route get 1 | awk '{print $NF; exit}')
hostname=$(hostname)
sed -i -e "s/.*nomad.*/${ip} ${hostname}/" /etc/hosts
# Ensure we cd into the working directory on login
if ! grep "cd /opt/gopath/src/github.com/hashicorp/nomad" /home/vagrant/.profile ; then
echo 'cd /opt/gopath/src/github.com/hashicorp/nomad' >> /home/vagrant/.profile
fi