-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Getting Started for new CockroachDB developers
This guide is for users intending to develop CockroachDB. To USE CockroachDB consult these docs instead: https://www.cockroachlabs.com/docs/install-cockroachdb.html and https://www.cockroachlabs.com/docs/start-a-local-cluster.html
This is a guide for getting productive to code on CockroachDB on OS X. This assumes a blank machine/nothing is installed.
-
install homebrew
-
install XCODE Command Line Tools, using
xcode-select --install
-
Install the following brew packages:
brew install brew-cask git brew cask install docker brew cask install virtualbox
OS X ships with a git, but it's old. Once you install git via brew, relaunch your terminal to make sure your git version is up to date. You can confirm this by comparing the output of
which git
to the output of
echo $(brew --prefix)/bin/git
If they match, you're using brew's git!
-
Install Go. Options include:
- Official installer via clicking (don't do this)
- Official installer via
brew cask install go
(it's ok) - homebrew via
brew install go
(it's ok) - from source (you already know what you're doing, right?)
-
Do not clone the cockroach db repository using git, let
go get
do that for you, at least for the first time, so that all the dependencies are properly downloaded.go get -d github.com/cockroachdb/cockroach
Once you have cloned the repository, you can navigate to the source directory (
$GOPATH/src/github.com/cockroachdb/cockroach
) and then add your fork as a remote (assuming you forked cockroach on GitHub)git remote add yourgithubusername [email protected]:yourgithubusername/cockroach.git
-
Start the docker app in the usual fashion.
-
You should be good to run
make
! This should take a long time, as it pulls various go dependencies. -
Run
make acceptance
, which pulls various docker images and runs docker-based tests. Note that this takes a very long time.