Docs on how to build a debug rancher / rancher agent?

I am interested in building a custom rancher server or rancher agent image, with a lot more logging than is currently present in the existing code.

Can anyone point me to any docs which may help me get started with the build process?

The aim is to get a better understanding of the Rancher code, by adding a lot of printf / System.out calls, so that I can better understand the code.


This is the code for the agent:

You can build it with make package (or make ci if you want to also run all the tests, Really, its make any-script-in-the-script-directory).

That’ll produce a dist folder in which there will be a go-agent.tar.gz. Publish that somewhere on the web (we put ours in github releases).

Finally, you can just update the setting for where rancher should look for that binary by going to http://:8080/v2-beta/settings/agent.package.python.agent.url and editing the value to point at your custom binary. (don’t ask why the property has the word python in it…legacy).