aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent/agent.cli
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-07-13 22:50:15 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-07-14 19:10:22 +0300
commitc8ace1ee0a6cab5fd4ea2f084ea436cfa513637d (patch)
treea8db884a665fbf14797393a3b2ff95438c338bb9 /bbot/agent/agent.cli
parent8e8d599b129d35f638f2c1957c869b054a38b021 (diff)
Make use of wildcards in buildfiles
Diffstat (limited to 'bbot/agent/agent.cli')
-rw-r--r--bbot/agent/agent.cli232
1 files changed, 232 insertions, 0 deletions
diff --git a/bbot/agent/agent.cli b/bbot/agent/agent.cli
new file mode 100644
index 0000000..a5dbe01
--- /dev/null
+++ b/bbot/agent/agent.cli
@@ -0,0 +1,232 @@
+// file : bbot/agent.cli
+// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+// license : TBC; see accompanying LICENSE file
+
+include <bbot/common.cli>;
+
+"\section=1"
+"\name=bbot-agent"
+"\summary=build bot agent"
+
+namespace bbot
+{
+ {
+ "<options> <url>",
+
+ "
+ \h|SYNOPSIS|
+
+ \cb{bbot-agent --help}\n
+ \cb{bbot-agent --version}\n
+ \c{\b{bbot-agent} [<options>] <url>...}
+
+ \h|DESCRIPTION|
+
+ \cb{bbot-agent} @@ TODO.
+
+ Note that on termination \cb{bbot-agent} may leave a working machine
+ snapshot behind. It is expected that the caller (normally Build OS
+ monitor) cleans them up before restarting the agent.
+ "
+ }
+
+ class agent_options
+ {
+ "\h|OPTIONS|"
+
+ bool --help {"Print usage information and exit."}
+ bool --version {"Print version and exit."}
+
+ bool --systemd-daemon
+ {
+ "Run as a simple systemd daemon."
+ }
+
+ path --auth-key
+ {
+ "<file>",
+ "Private key for the public key-based agent authentication. If not
+ specified, then the agent will not be able to request tasks from
+ controllers that require authentication.
+
+ The file is expected to contain a single PEM-encoded private key
+ without a password. A suitable key can be generated using the
+ following command:
+
+ \
+ $ openssl genrsa 4096 >key.pem
+ \
+ "
+ }
+
+ path --openssl = "openssl"
+ {
+ "<path>",
+ "The openssl program to be used for crypto operations. You can also
+ specify additional options that should be passed to the openssl program
+ with \cb{--openssl-option}. If the openssl program is not explicitly
+ specified, then \cb{bbot-agent} will use \cb{openssl} by default."
+ }
+
+ strings --openssl-option
+ {
+ "<opt>",
+ "Additional option to be passed to the openssl program (see
+ \cb{--openssl} for details). Repeat this option to specify multiple
+ openssl options."
+ }
+
+ size_t --cpu = 1
+ {
+ "<num>",
+ "Number of CPUs (threads) to use, 1 by default."
+ }
+
+ size_t --ram (1024 * 1024) // 1G
+ {
+ "<num>",
+ "Amount of RAM (in kB) to use, 1G by default."
+ }
+
+ string --toolchain-name = "default"
+ {
+ "<str>",
+ "Toolchain name, \cb{default} by default."
+ }
+
+ uint16_t --toolchain-num = 1
+ {
+ "<num>",
+ "Toolchain number, 1 by default."
+ }
+
+ standard_version --toolchain-ver
+ {
+ "<stdver>",
+ "Toolchain version. If unspecified, then the agent's version will be
+ used (which will be imprecise for snapshot versions)."
+ }
+
+ string --toolchain-id
+ {
+ "<str>",
+ "Toolchain id. If unspecified or empty, then no re-bootstrapping on
+ toolchain changes will be performed (which is primarily useful for
+ testing)."
+ }
+
+ strings --trust
+ {
+ "<fingerprint>",
+ "Trust repository certificate with a SHA256 <fingerprint>."
+ }
+
+ dir_path --machines = "/build/machines/"
+ {
+ "<dir>",
+ "The location of the build machines, \cb{/build/machines/} by default."
+ }
+
+ dir_path --tftp = "/build/tftp/"
+ {
+ "<dir>",
+ "The location of the TFTP server root, \cb{/build/tftp/} by default."
+ }
+
+ uint16_t --tftp-port = 23400
+ {
+ "<num>",
+ "TFTP server port base, 23400 by default. The actual port is calculated
+ by adding the toolchain number \c{--toolchain-num} to this value."
+ }
+
+ size_t --bootstrap-timeout = 900
+ {
+ "<sec>",
+ "Maximum number of seconds to wait for machine bootstrap completion,
+ 900 (15 minutes) by default."
+ }
+
+ size_t --bootstrap-retries = 2
+ {
+ "<num>",
+ "Number of time to retry a mis-booted bootstrap, 2 by default."
+ }
+
+ size_t --build-timeout = 1800
+ {
+ "<sec>",
+ "Maximum number of seconds to wait for build completion, 1800 (30
+ minutes) by default."
+ }
+
+ size_t --build-retries = 2
+ {
+ "<num>",
+ "Number of time to retry a mis-booted build, 2 by default."
+ }
+
+ size_t --request-timeout = 300
+ {
+ "<sec>",
+ "Maximum number of seconds to wait for controller request completion,
+ 300 (5 minutes) by default."
+ }
+
+ uint16_t --verbose = 1
+ {
+ "<level>",
+ "Set the diagnostics verbosity to <level> between 0 and 6 with level 1
+ being the default."
+ }
+
+ // Testing options.
+ //
+ bool --dump-machines
+ {
+ "Dump the available machines to \cb{stdout}, (re)-bootstrapping any if
+ necessary, and exit."
+ }
+
+ bool --dump-task
+ {
+ "Dump the received build task to \cb{stdout} and exit."
+ }
+
+ bool --dump-result
+ {
+ "Dump the obtained build result to \cb{stdout} and exit."
+ }
+
+ bool --fake-bootstrap
+ {
+ "Fake the machine bootstrap process by creating the expected bootstrapped
+ machine manifest."
+ }
+
+ bool --fake-build
+ {
+ "Fake the package building process by creating the aborted build result."
+ }
+
+ path --fake-machine
+ {
+ "<file>",
+ "Fake the machine enumeration process by reading the machine header
+ manifest from <file> (or \cb{stdin} if <file> is '\cb{-}')."
+ }
+
+ path --fake-request
+ {
+ "<file>",
+ "Fake the task request process by reading the task manifest from <file>
+ (or \cb{stdin} if <file> is '\cb{-}')."
+ }
+ };
+
+ "
+ \h|EXIT STATUS|
+
+ Non-zero exit status is returned in case of an error.
+ "
+}