From 781fce71d4b78c0edfc489e4093d082f271a234f Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Tue, 9 Oct 2018 10:45:08 +0200 Subject: Improves documentation * Describes better available source tree sharing method (between xds-agent and xds-server), and which to prefer depending on the deployment setup. * Gives indication about how to pass RSYNC_TARGET and RSYNC_PREFIX env vars to the helloworld-native-application build process. * Swap chapter order (build before config) Bug: SPEC-1993 Change-Id: Ie4c22f277a59b0405744d71b0fadff67c5d5d025 Signed-off-by: Sebastien Douheret --- docs/part-2/2_xds-agent/2_config.md | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docs/part-2/2_xds-agent/2_config.md (limited to 'docs/part-2/2_xds-agent/2_config.md') diff --git a/docs/part-2/2_xds-agent/2_config.md b/docs/part-2/2_xds-agent/2_config.md new file mode 100644 index 0000000..9e912cb --- /dev/null +++ b/docs/part-2/2_xds-agent/2_config.md @@ -0,0 +1,47 @@ +# Configuration + +xds-agent configuration is driven by a JSON config file. + +The tarball mentioned in previous section includes this file with default settings. + +Here is the logic to determine which conf file will be used: + +1. from command line option: `--config myConfig.json` +1. `$HOME/.xds/agent/agent-config.json` file +1. `/etc/xds/agent/agent-config.json` file + +Supported fields in configuration file are (all fields are optional and example +below corresponds to the default values): + +- **httpPort** : http port of agent REST interface +- **webAppDir** : location of client webapp / dashboard (default: webapp/dist) +- **logsDir** : directory to store logs (eg. syncthing output) +- **xdsServers** : an array of xds-server object + - **xdsServers.url**: url of xds-server to connect to +- **syncthing**: a object defining syncthing settings + - **syncthing.binDir** : syncthing binaries directory (default: executable directory) + - **syncthing.home"** : syncthing home directory (usually .../syncthing-config) + - **syncthing.gui-address** : syncthing gui url (default ) + - **syncthing.gui-apikey** : syncthing api-key to use (default auto-generated) + +```json +{ + "httpPort": "8800", + "webAppDir": "./www", + "logsDir": "${HOME}/.xds/agent/logs", + "xdsServers": [ + { + "url": "http://localhost:8000" + } + ], + "syncthing": { + "home": "${HOME}/.xds/agent/syncthing-config", + "gui-address": "http://localhost:8386", + "gui-apikey": "1234abcezam" + } +} +``` + +>**Note:** +> +>environment variables are supported by using `${MY_VAR}` syntax. -- cgit 1.2.3-korg