Skip to content

Setting up Dev Environment

This page is intended for people who are building Digital Rebar Provision from sources or contributing to the code base. We maintain inline documentation and test environment and contributors are expected to participate in maintenance of those efforts.


Prerequisites: go version 1.16 or better. These documents expect ability to both install and update Golang.

Developer Quick Start

You will need to get the provision source tree.

go get -u
go get -u
go get -u

If more details on how to run the result are needed, consult the rs_install section. The script can be used to install from the source directory after a build.

Building The API

After the code and assets have been obtained once, the process can be repeated from the project root with the following command:


Another reason to use the tools/ script is that it will inject version information into the built binaries to make it easier to track what version is deployed. Developer builds and production builds will be identifiable through the version command on both the server and the cli.


If you have performed a previous build and generated assets are updated, you may need to delete [embedded]{.title-ref} directory and checkout [git checkout --embedded]{.title-ref} then rebuild to ensure that the server can start. This problem manifests with the error: [No such embedded asset chain.c32: Asset chain.c32 not found]{.title-ref}

Running the Tests

Digital Rebar Provision uses the Golang test libraries and the development team works hard to maintain test coverage.

The tools/ in the provision root directory is the main way to test the entire code base.

To test individual modules from their subdirectories run: go test

How to get Swagger-Ui

DigitalRebar Provision uses Swagger to generate interactive help for the API. This is in the tree by default. If an update is needed, do the following:

-   git clone <>
-   cp -r swagger-ui/dist/\* embedded/assets/swagger-ui
-   change in embedded/assets/swagger-ui/index.html:

        @@ -38,7 +38,7 @@
               if (url && url.length > 1) {
                 url = decodeURIComponent(url[1]);
               } else {
        -        url = "";
        +        url = "";


-   Rebuild the world (**tools/**)

Packaging the Code

Once the code is built, the code can be package for storage in GitLab or for use by the script.

Running the tools/ script will generate a and dr-provision.sha256 file. These files can be used with the rs_install process.