Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Garden development workstation setup

Marc Schunk edited this page Jul 10, 2015 · 10 revisions

Machine setup

  1. New machine with Pivotal Dev Image
  2. Upgrade MacOS
  3. Upgrade brew packages
    1. Run brew doctor and fix any problems that might occur
    2. brew update
    3. brew install caskroom/cask/brew-cask

Software

  1. Slack from AppStore (preferences -> open at login)
  2. FlyCut from AppStore (preferences -> open at login)
  3. ShiftIt (preferences -> open at login)
  4. Divvy (preferences -> open at login)
  5. tmate
  6. boot2docker
  7. Source tree
  8. sublime
    1. brew cask install sublime-text
    2. Add package manager
    3. Install gosublime package see install section
  9. luan-vim
    1. git clone http://github.com/luan/vimfiles.git ~/.vim
    2. ~/.vim/install
  10. IntelliJ
    1. Download IntelliJ
    2. Follow instructions to setup an IntelliJ project

Setting up git

  1. gem install git-duet

  2. Add ~/.git-authors

     authors:
       aa: Alex Alpha; alpha
       bb: Barbara Beta; babete
     email:
       domain: pivotal.io
     email_addresses:
       bb: beta@otheremail.com
    
  3. Add git aliases in ~/.bash_it/lib/custom.bash:

     alias duet='git duet --global'
     solo='git solo --global'
    
  4. Replace the git ci alias in ~/.gitconfig file for ci = duet-commit

Setting up golang

  1. brew install go

  2. mkdir $HOME/go

  3. Update ~/.bash_it/lib/custom.bash with the following:

     export GOPATH=$HOME/go
     export GOROOT=/usr/local/opt/go/libexec
     export PATH=$PATH:$GOPATH/bin
     export PATH=$PATH:$GOROOT/bin
    

workto/goto tools

Add goto and workto by placing following into ~/.bash_it/lib/custom.bash:

function goto {
  local p
  local f

  for p in `echo $GOPATH | tr ':' '\n'`; do
    f=`find ${p}/src -type d -not -path '*/.*' | grep "${1}" | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1`
    if [ -n "$f" ]; then
      cd $f
      return
    fi
  done

  workto "$@"
}

function workto {
  local p
  local f

  f=`find ~/workspace -type d -not -path '*/.*' | grep "${1}" | awk '{ print length, $0 }' | sort -n | cut -d" " -f2- | head -n 1`
  if [ -n "$f" ]; then
    cd $f
    return
  fi
}

direnv

  1. Install direnv:

     git clone https://github.com/zimbatm/direnv
     cd direnv
     make install
    
  2. Add eval "$(direnv hook bash)" to ~/.bash_it/lib/custom.bash

Concourse setup

  1. cd ~/workspace
  2. git clone https://github.com/concourse/concourse
  3. Go to garden concourse & click on the concourse tab and select the latest build. Find the version of concourse that has been deployed e.g.: concourse-0.34.0.tgz.
  4. cd concourse && git co v0.34.0
  5. git submodule update --init --recursive
  6. direnv allow
  7. cd src/github.com/concourse/fly
  8. go build
  9. cp fly ~/go/bin

Repositories

Garden Linux Setup

  1. git clone https://github.com/cloudfoundry-incubator/garden-linux $GOPATH/src/github.com/cloudfoundry-incubator/garden-linux
  2. go get github.com/tools/godep
  3. cd $GOPATH/src/github.com/cloudfoundry-incubator/garden-linux
  4. godep restore
  5. go install github.com/onsi/ginkgo/ginkgo
  6. Run the unit tests by goto garden-linux && ginkgo -r
  7. Run the set the ATC env var as described in the scripts/remote-fly

Garden Linux Release

  1. cd ~/workspace && git clone https://github.com/cloudfoundry-incubator/garden-linux-release
  2. cd garden-linux-release && git submodule update --init --recursive
  3. sudo chown -R pivotal:staff /usr/local/Library/Taps
  4. brew cask uninstall vagrant
  5. brew uninstall phinze/cask/brew-cask
  6. brew install caskroom/cask/brew-cask
  7. brew cask install vagrant
  8. gem install bosh_cli --no-ri --no-rdoc -v 1.2652.0
  9. vagrant plugin install vagrant-bosh
  10. vagrant up
  11. brew cask install vagrant-manager
  12. Follow API exercise to show garden is running.

Clone this wiki locally