github.com/smithx10/nomad@v0.9.1-rc1/scripts/vagrant-linux-priv-dev.sh (about)

     1  #!/usr/bin/env bash
     2  
     3  # Install Development utilities
     4  apt-get install -y \
     5  	      curl \
     6  	      default-jre \
     7  	      htop \
     8  	      jq \
     9  	      qemu \
    10  	      silversearcher-ag \
    11  	      tree \
    12  	      unzip \
    13  	      vim
    14  
    15  
    16  # Set hostname -> IP to make advertisement work as expected
    17  ip=$(ip route get 1 | awk '{print $NF; exit}')
    18  hostname=$(hostname)
    19  sed -i -e "s/.*nomad.*/${ip} ${hostname}/" /etc/hosts
    20  
    21  # Ensure we cd into the working directory on login
    22  if ! grep "cd /opt/gopath/src/github.com/hashicorp/nomad" /home/vagrant/.profile ; then
    23  	  echo 'cd /opt/gopath/src/github.com/hashicorp/nomad' >> /home/vagrant/.profile
    24  fi