Project

General

Profile

Hacking Keep » History » Revision 5

Revision 4 (Tom Clegg, 07/16/2014 09:24 AM) → Revision 5/9 (Tom Clegg, 08/18/2014 03:57 PM)

h1. Hacking Keep 

 {{toc}} 

 

 h2. Source tree layout 

 The Keep storage server source code is in @/services/keepstore@. Proxy server is in @/services/keepproxy@. @/services/keep/src/keep@. 

 <pre> 
 cd 
 git clone git://git.curoverse.com/arvados.git https://github.com/curoverse/arvados.git 
 ls arvados/services/keep* arvados/services/keep/src/keep 
 </pre> 

 *Note:* Clone @git@git.curoverse.com:arvados.git@ instead if you plan to push directly to git.curoverse.com. 

 

 h2. Install build-prerequisites 

 Install Go. See http://golang.org/doc/install or try this short cut: 

 <pre> 
 wget https://storage.googleapis.com/golang/go1.3.1.linux-amd64.tar.gz https://go.googlecode.com/files/go1.2.1.linux-amd64.tar.gz 
 sudo tar -C /usr/local -xzf go1.3.1.linux-amd64.tar.gz go1.2.1.linux-amd64.tar.gz 
 cd /usr/local/bin 
 sudo ln -s ../go/bin/* . 
 </pre> 

 (Check https://code.google.com/p/go/downloads/list for other platforms and newer versions.) 

 h2. Set up GOPATH Install mux. 

 <pre> 
 export GOPATH=~/gocode GOPATH=~/go go get github.com/gorilla/mux 
 mkdir -p $GOPATH 
 </pre> 

 

 h2. Tell Go to use your local copy 

 (Instead of automatically fetching master from the git repository) 

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

 h2. Run test suite 

 <pre> 
 cd ~/arvados/services/keep/src/keep 
 GOPATH=~/go go test git.curoverse.com/arvados.git/services/keepstore 
 </pre> 

 You should see something like this: 

 <pre> 
 2014/07/16 09:24:01 GET e4d909c290d0fb1ca068ffaddf22cbd0 
 2014/07/16 09:24:01 GET e4d909c290d0fb1ca068ffaddf22cbd0 
 2014/07/16 09:24:01 GET e4d909c290d0fb1ca068ffaddf22cbd0 
 2014/07/16 09:24:01 GET e4d909c290d0fb1ca068ffaddf22cbd0 
 2014/07/16 09:24:01 GET e4d909c290d0fb1ca068ffaddf22cbd0 
 2014/07/16 09:24:01 PUT e4d909c290d0fb1ca068ffaddf22cbd0 
 2014/07/16 09:24:01 PUT e4d909c290d0fb1ca068ffaddf22cbd0 
 2014/07/16 09:24:01 PUT e4d909c290d0fb1ca068ffaddf22cbd0 
 2014/07/16 09:24:01 [MockVolume]: checksum mismatch for request e4d909c290d0fb1ca068ffaddf22cbd0 (actual 55ae4d45d2db0793d53f03e805f656e5) 
 2014/07/16 09:24:01 e4d909c290d0fb1ca068ffaddf22cbd0: checksum mismatch, no good copy found 
 2014/07/16 09:24:01 GetBlock: reading e4d909c290d0fb1ca068ffaddf22cbd0: Bad volume 
 2014/07/16 09:24:01 [MockVolume]: Write(e4d909c290d0fb1ca068ffaddf22cbd0): Bad volume 
 2014/07/16 09:24:01 GetBlock: reading e4d909c290d0fb1ca068ffaddf22cbd0: Bad volume 
 2014/07/16 09:24:01 e4d909c290d0fb1ca068ffaddf22cbd0: MD5 checksum 55ae4d45d2db0793d53f03e805f656e5 did not match request 
 2014/07/16 09:24:01 [MockVolume]: checksum mismatch for request e4d909c290d0fb1ca068ffaddf22cbd0 (actual 55ae4d45d2db0793d53f03e805f656e5) 
 2014/07/16 09:24:01 e4d909c290d0fb1ca068ffaddf22cbd0: checksum mismatch, no good copy found 
 2014/07/16 09:24:01 e4d909c290d0fb1ca068ffaddf22cbd0: could not create directory /tmp/volume_test436651248/e4d: mkdir /tmp/volume_test436651248/e4d: permission denied 
 PASS 
 ok        git.curoverse.com/arvados.git/services/keepstore          0.015s _/home/you/src/arvados/services/keep/src/keep     0.030s 
 </pre>