Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 2.02 KB

HACKING.md

File metadata and controls

49 lines (34 loc) · 2.02 KB

Hacking

Requirements

Quick Start

git clone git@github.com:vmware/octant.git
cd octant
make go-install  # install Go dependencies.
make ci-quick    # build UI, generate UI files, and create octant binary.
./build/octant   # run the Octant binary you just built

Testing

We generally require tests be added for all but the most trivial of changes. You can run govet and the tests using the commands below:

make vet
make test

Frontend

When making changes to the frontend it can be helpful to have those changes trigger rebuilding the UI. The Octant makefile provides make ui-client which is an alias for npm run start and will listen for changes and rebuild the UI. By default this will launch on http://localhost:4200.

Backend

When you are making changes to the backend you can take advantage of Go's fast compile time to build and run Octant in a single step. The Octant makefile provides make ui-server which is an alias for go run. Unlike the alias for the frontend, this does not listen for changes and does require you to stop the command and re-run it after saving your changes.

If working on the frontend, you may want to set up a reverse proxy to the Angular services running on http://localhost:4200. To set this up, set OCTANT_PROXY_FRONTEND environment variable with the location of the frontend. (e.g. http://localhost:4200).

Before Your Pull Request

When you are ready to create your pull request, we recommend running make ci.

This command will run our linting tools and test suite as well as produce a release binary that you can use to do a final manual test of your changes.