- We include examples using Homebrew here. Replace with your package manager of choice.
- You have cloned the project to $HOME/workspace/bosh
-
Bring homebrew index up-to-date
brew update
-
Install mysql (needed by the mysql2 gem)
brew install mysql
-
Setup & Start mysql (required for running integration tests with mysql)
- start mysql as root
- create mysql user: root/password
-
Install postgresql (needed by the pg gem)
brew install postgresql
-
Setup and Start postgresql (required for running integration tests with postgresql (default))
-
start postgres
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
-
create postgres user: $USER/<no-password>
createuser -U $USER --superuser postgres
-
create postgres database
createdb -U $USER
-
-
Get Golang 1.3.3: As homebrew has a golang version >1.3.3 as current version, we need to install the
homebrew versions
command to check the correct git revision of golang 1.3.3brew tap homebrew/boneyard
brew versions go
and get the revision for version 1.3.3cd /usr/local/Library/Formula/
git checkout <revision> go.rb
brew install go
Install vet and golint
go get code.google.com/p/go.tools/cmd/vet
go get -u github.com/golang/lint/golint
Optional: Install direnv to keep your GOPATH correct when working with the bosh-agent submodule
brew install direnv
cd <<bosh base dir>>
- direnv allow
-
Install Bundler gem
gem install bundler
-
Bundle BOSH
cd ~/workspace/bosh bundle install
If you have trouble bundling, you may have to install pg gem manually by specifying your architecture:
(sudo) env ARCHFLAGS="-arch x86_64" gem install pg -v '0.15.1'