Skip to content

Nexodus Development Tooling

Tools and tips that will aid you in the development and testing of Nexodus on your local machine.

Tools

Base

  • git our source control tool
  • Go v1.19 or v1.20
  • make - our main build tool
  • bash - we use a few bash scripts to set things up.
  • docker or podman/buildah - to build and run containers
  • kubectl - to interact with your kube deployments
  • jq - A lightweight and flexible command-line JSON processor

Go Based Build Tools

The following tools can be installed with by running:

./hack/install-tools.sh [--force]

Use the --force option if you want to reinstall them in case you think the versions your using are not right.

  • kind - used to spin up a small kube cluster for testing.
  • golangci-lint - go language linters
  • swag - code first openapi spec document generator.
  • mkcert - to generate and install ca certificates.

IDE Tips

VSCode

Recommended plugins:

JetBrains GoLand or IDEA

Recommended plugins:

Platform Tips

Linux

Homebrew is great for getting newer development tools. You can use it to install go, make, kubectl, etc.

OS X / Darwin

Homebrew is great for getting newer development tools. You can use it to install go, make, kubectl, etc.

Latest version of OS X and Docker may not create the /var/run/docker.sock file. If running e2e test fail due to this for you, run:

sudo ln -s ~/.docker/run/docker.sock /var/run/docker.sock

Windows

Install WSL to get a linux shell.

Inside WSL Homebrew is great for getting newer development tools. You can use it to install go, make, kubectl, etc.

Typical Development Workflow

Once you have checked out the source code with git run the service locally in kind using:

make run-on-kind

If you make any changes to the service source code, run the following to get it redeployed in kind:

make redeploy

To validate you have not caused any regressions, run the e2e tests:

make e2e

For a verbose output from e2e or build use NOISY_BUILD

 make e2e NOISY_BUILD=y

To run all the code generators, lint source code, and build the binaries for all platforms run:

make all

For more fine grained make build targets, run make without any arguments:

make