Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.16 KB

dev_guide.md

File metadata and controls

41 lines (28 loc) · 1.16 KB

Setting up development environment

On your local machine

  1. Make sure you have golang 1.10 installed

  2. Make sure you have dep installed

  3. Make sure you have kubebuilder installed (currently only required to run some of the tests)

  4. Clone this repository into $GOPATH/src/github.com/DevFactory/smartnat

  5. Run dep

    dep ensure --vendor-only
  6. You should be able to run unit tests now and you're good to go

    go test ./pkg/...

In docker container

If you don't want to install all the gp dependencies on your machine, you can easily get started by setting up development environment in a docker container.

Start by building docker image:

docker build -f ./Dockerfile.devenv -t smartnat_devenv:latest .

Now, you can start a ready container that has all the dependencies, code and vim ready:

docker run -it --name smartnat-dev smartnat_devenv:latest

Everything should be in place and you should be able to run all tests:

go test ./...