<commit_before># Development Setup

## Environment

### OSX

Install Go

```
brew update && brew upgrade
brew install go
```

Enable cross-compiling with linux/amd64

```
cd /usr/local/Cellar/go/1.4.2/libexec/src && \
    GOOS=linux GOARCH=amd64 ./make.bash --no-clean
```

Create a Go WORKSPACE

```
export GOPATH=~/go/riak-mesos
mkdir -p $GOPATH
export PATH=$PATH:$GOPATH/bin
cd $GOPATH
```

Optionally setup `.bashrc` or `.profile` or `.zprofile` by adding the following

```
export GOPATH=~/go/riak-mesos
export PATH=$PATH:$GOPATH/bin
```

Install Go CLI tools

```
go get github.com/mitchellh/gox
go get github.com/tools/godep
go get -u github.com/jteeuwen/go-bindata/...
go get github.com/campoy/jsonenums
go get golang.org/x/tools/cmd/stringer
go get -u github.com/golang/lint/golint
go get golang.org/x/tools/cmd/goimports
```

Setup riak-mesos and mesos-go

```
### Create src directories
cd $GOPATH
mkdir -p src/github.com/mesos
mkdir -p src/github.com/basho-labs
### Download
cd $GOPATH/src/github.com/
git clone git@github.com:basho-labs/riak-mesos.git basho-labs/riak-mesos
git clone https://github.com/mesos/mesos-go.git mesos/mesos-go
### Build Mesos Go
cd $GOPATH/src/github.com/mesos/mesos-go
godep restore
go build ./...
### Build Riak Mesos Framework
cd $GOPATH/src/github.com/basho-labs/riak-mesos
godep restore
cd bin
go generate ../... && gox -osarch="linux/amd64" -osarch=darwin/amd64 ../...
```

## Vagrant Setup

On Mac OS X, configure a static IP for riak-mesos to bind to:

Add the following to your `/etc/hosts` file:

```
127.0.0.1	33.33.33.1
33.33.33.2  ubuntu.local
```

Start and connect to the Vagrant VM

```<commit_msg>Added path to Vagrantfile in dev docs<commit_after># Development Setup

## Environment

### OSX

Install Go

```
brew update && brew upgrade
brew install go
```

Enable cross-compiling with linux/amd64

```
cd /usr/local/Cellar/go/1.4.2/libexec/src && \
    GOOS=linux GOARCH=amd64 ./make.bash --no-clean
```

Create a Go WORKSPACE

```
export GOPATH=~/go/riak-mesos
mkdir -p $GOPATH
export PATH=$PATH:$GOPATH/bin
cd $GOPATH
```

Optionally setup `.bashrc` or `.profile` or `.zprofile` by adding the following

```
export GOPATH=~/go/riak-mesos
export PATH=$PATH:$GOPATH/bin
```

Install Go CLI tools

```
go get github.com/mitchellh/gox
go get github.com/tools/godep
go get -u github.com/jteeuwen/go-bindata/...
go get github.com/campoy/jsonenums
go get golang.org/x/tools/cmd/stringer
go get -u github.com/golang/lint/golint
go get golang.org/x/tools/cmd/goimports
```

Setup riak-mesos and mesos-go

```
### Create src directories
cd $GOPATH
mkdir -p src/github.com/mesos
mkdir -p src/github.com/basho-labs
### Download
cd $GOPATH/src/github.com/
git clone <EMAIL>:basho-labs/riak-mesos.git basho-labs/riak-mesos
git clone https://github.com/mesos/mesos-go.git mesos/mesos-go
### Build Mesos Go
cd $GOPATH/src/github.com/mesos/mesos-go
godep restore
go build ./...
### Build Riak Mesos Framework
cd $GOPATH/src/github.com/basho-labs/riak-mesos
godep restore
cd bin
go generate ../... && gox -osarch="linux/amd64" -osarch=darwin/amd64 ../...
```

## Vagrant Setup

On Mac OS X, configure a static IP for riak-mesos to bind to:

Add the following to your `/etc/hosts` file:

```
127.0.0.1	192.168.127.12
172.16.58.3  ubuntu.local
```

Start and connect to the Vagrant VM

```
cd build/ubuntu/
{'fraction_non_alphanumeric': 0.15237526142814461, 'fraction_numerical': 0.02001792650134449, 'mean_word_length': 3.6243093922651934, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 7, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2727486', 'n_tokens_mistral': 1436, 'n_tokens_neox': 1297, 'n_words': 332}