Categorygithub.com/gocd-contrib/gocd-golang-bootstrapper
modulepackage
0.0.0-20241008062135-f860df3e0a38
Repository: https://github.com/gocd-contrib/gocd-golang-bootstrapper.git
Documentation: pkg.go.dev

# README

Native Binary GoCD agent bootstrapper

This is primarily intended to be used by elastic agents to reduce startup time of agents and reduce the memory footprint on the agent machine, since this runs as a native executable.

Usage

Download

Get your OS/Architecture specific binary from https://github.com/gocd-contrib/gocd-golang-bootstrapper/releases/latest

Run

./go-bootstrapper

Supported environment variables

The program uses environment variables to configure the agent to make it easy to embed with docker.

General options:

EnvironmentRequiredDescription
GO_EA_GUIDNoThe contents of config/guid.txt file that contains the agent identifier.
GO_EA_SERVER_URLYesThe base url to the GoCD server.
GO_EA_DUMP_ENVIRONMENTNoWhether environment variables should be dumped to the log. Turned off by default for security.
GO_EA_JVM_ARGSNoJSON formatted list of args that should be passed as JVM args to the agent process. Example: ["-Dfoo=bar", "-Xmx256m"]
GO_EA_ROOT_DIRNoThe directory where the gocd agent should execute. Defaults to /go.

Autoregistration options:

EnvironmentRequiredDescription
GO_EA_AUTO_REGISTER_KEYYesThe GoCD agent auto register key.
GO_EA_AUTO_REGISTER_ENVIRONMENTNoThe name of the environment that the agent should autoregister with.
GO_EA_AUTO_REGISTER_ELASTIC_AGENT_IDYesThe elastic agent identifier that the agent should autoregister with.
GO_EA_AUTO_REGISTER_ELASTIC_PLUGIN_IDYesThe elastic agent plugin identifier that the agent should autoregister with.

SSL options:

EnvironmentRequiredDescription
GO_EA_SSL_NO_VERIFYNoWhether ssl verification should be turned off. Defaults to false.
GO_EA_SSL_ROOT_CERT_FILENoThe path to the file containing root CA certificates. Defaults to the file provided by the operating system.

Building instructions

Using go get

go install github.com/gocd-contrib/gocd-golang-bootstrapper@latest

Using make

make all

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author