Project

General

Profile

Actions

Hacking Keep » History » Revision 6

« Previous | Revision 6/9 (diff) | Next »
Tim Pierce, 08/28/2014 02:08 PM


Hacking Keep

These instructions describe how to build the Arvados Keep storage server and/or proxy on your local machine.

Install Go

The Arvados Keep server and proxy are written in Go. In order to build it locally, you must have the Go toolchain installed. Follow the instructions at http://golang.org/doc/install to install Go.

The rest of these instructions assume that you have a working Go installation on your system, and that your GOPATH environment variable is set appropriately.

If you have just installed Go for the first time, you may set GOPATH to any empty directory. The Go toolchain will install Go packages and dependencies here.

export GOPATH=~/gocode
mkdir -p $GOPATH

Get source code

Clone the Arvados git repository, if you have not already:

cd
git clone git://git.curoverse.com/arvados.git

Note: If you are an authorized committer, clone git@git.curoverse.com:arvados.git instead so you may push directly to git.curoverse.com.

Tell Go to use your local copy

This step ensures that your development environment uses your locally-modified code, instead of fetching the master branch from git.curoverse.com:

mkdir -p $GOPATH/src/git.curoverse.com
ln -s ~/arvados $GOPATH/src/git.curoverse.com/arvados.git

Reason: The Keepstore and Keepproxy packages import other Go packages from the Arvados source tree. These packages have names like:

git.curoverse.com/arvados.git/sdk/go/keepclient
git.curoverse.com/arvados.git/sdk/go/arvadosclient

When the Go compiler needs to import one of these packages, it will look in $GOPATH/src for the package source code. If it does not find the code locally, it will fetch the code from git.curoverse.com automatically. This symlink ensures that Go will find your local source code under $GOPATH/src/git.curoverse.com/arvados.git/...

Run test suite

cd ~/arvados/services/keepstore
go test

The go test command will print a few dozen lines of logging output. If the tests succeeded, it will print PASS followed by a summary of the packages which passed testing, e.g.:

PASS
ok      _/home/you/arvados/services/keepstore    1.023s

Updated by Tim Pierce over 10 years ago · 9 revisions