How to Build and Develop VOLTHA

Building natively on MAC OS X

For advanced developers this may provide a more comfortable developer environment (e.g. by allowing IDE-assisted debugging), but setting it up can be a bit more challenging.


  • git installed
  • Docker-for-Mac installed
  • Go 1.9
  • Python 2.7
  • virtualenv
  • brew (or macports if you prefer)
  • protoc

Get the Voltha-go repository:

git clone ssh://<your-user-ID>
cd voltha-go

Setting up the Go environment

After installing Go on the MAC, the GOPATH environment variable should be set to ~/go. Create a symbolic link in the $GOPATH/src tree to the voltha-go repository:

mkdir $GOPATH/src/
ln -s ~/repos/voltha-go $GOPATH/src/

Installing Voltha dependencies

go get -u   # gRPC
go get -u   # protoc plugin for Go
go get -u
go get -u   # Clone function
go get -u   # logger
go get -u   # kafka
go get -u
go get -u
go get -u
go get -u   # etcd client

Building the protobufs

cd voltha-go
protos/scripts/ protos

Building and running Voltha

A fatal error occurs if Voltha is built and executed at this stage:

> go run rw_core/main.go
panic: /debug/requests is already registered.
You may have two independent copies of in your binary, trying to maintain separate state.
This may involve a vendored copy of

Fix this by removing directory ~/go/src/

Voltha can now be run directly at the shell prompt:

go run rw_core/main.go

or from a docker image built via:

make rw_core