2019-03-14 11:45:49 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Install Development utilities
|
|
|
|
apt-get install -y \
|
|
|
|
default-jre \
|
|
|
|
htop \
|
|
|
|
qemu \
|
|
|
|
silversearcher-ag \
|
|
|
|
vim
|
|
|
|
|
2019-09-06 20:11:16 +00:00
|
|
|
# Install Chrome for running tests (in headless mode)
|
2020-03-23 15:47:26 +00:00
|
|
|
curl -sSL -o- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
2019-09-06 20:11:16 +00:00
|
|
|
echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
|
|
|
|
apt-get update
|
|
|
|
apt-get install -y google-chrome-stable
|
2019-03-14 11:45:49 +00:00
|
|
|
|
|
|
|
# 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
|
2023-03-28 15:21:14 +00:00
|
|
|
if [ -d /home/vagrant/ ] ; then
|
|
|
|
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
|
2019-03-14 11:45:49 +00:00
|
|
|
fi
|