github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/scripts/vagrant/provision/setup_unprivileged.sh (about)

     1  #!/bin/bash
     2  
     3  # Use with Ubuntu 16.x+
     4  set -xe
     5  
     6  # Install Go
     7  eval "$(${HOME}/provision/gimme.sh stable)"
     8  
     9  # Setup GOPATH and binary path
    10  echo '' >> ${HOME}/.bashrc
    11  echo '# GOPATH' >> ${HOME}/.bashrc
    12  echo 'export GOPATH=${HOME}/go' >> ${HOME}/.bashrc
    13  echo '' >> ${HOME}/.bashrc
    14  echo '# GOPATH bin' >> ${HOME}/.bashrc
    15  echo 'export PATH=$PATH:${HOME}/go/bin' >> ${HOME}/.bashrc
    16  
    17  # Install Kind
    18  GO111MODULE="on" go get sigs.k8s.io/kind@v0.7.0
    19  
    20  # Link Kind (so GOPATH does not have to be set, not guaranteed always)
    21  mkdir -p ${HOME}/bin
    22  mv ${HOME}/go/bin/kind ${HOME}/bin
    23  
    24  # Setup kubectl to use the kind config
    25  echo '' >> ${HOME}/.bashrc
    26  echo 'export KUBECONFIG=${HOME}/.kube/config' >> ${HOME}/.bashrc