open-nomad/scripts/vagrant-linux-priv-dev.sh
Mahmood Ali 17059d0a1e ci: use curl
It's installed by default in macOS unlike wget
2020-03-23 13:27:58 -04:00

26 lines
865 B
Bash
Executable file

#!/usr/bin/env bash
# Install Development utilities
apt-get install -y \
default-jre \
htop \
qemu \
silversearcher-ag \
vim
# Install Chrome for running tests (in headless mode)
curl -sSL -o- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
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
# 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