github.com/rohankumardubey/nomad@v0.11.8/scripts/vagrant-linux-priv-dev.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  # Install Development utilities
     4  apt-get install -y \
     5  	      default-jre \
     6  	      htop \
     7  	      qemu \
     8  	      silversearcher-ag \
     9  	      vim
    10  
    11  # Install Chrome for running tests (in headless mode)
    12  curl -sSL -o- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
    13  echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
    14  apt-get update
    15  apt-get install -y google-chrome-stable
    16  
    17  # Set hostname -> IP to make advertisement work as expected
    18  ip=$(ip route get 1 | awk '{print $NF; exit}')
    19  hostname=$(hostname)
    20  sed -i -e "s/.*nomad.*/${ip} ${hostname}/" /etc/hosts
    21  
    22  # Ensure we cd into the working directory on login
    23  if ! grep "cd /opt/gopath/src/github.com/hashicorp/nomad" /home/vagrant/.profile ; then
    24  	  echo 'cd /opt/gopath/src/github.com/hashicorp/nomad' >> /home/vagrant/.profile
    25  fi