aboutsummaryrefslogtreecommitdiffstats
path: root/docs/part-2/2_xds-agent/1_config.md
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-01-18 09:44:34 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-01-18 09:44:34 +0100
commitbd814eafac20a5264782bad69ce2df1599921c68 (patch)
tree7b2f14fec5457d1fdc1ed4a0d7236d6f09525dca /docs/part-2/2_xds-agent/1_config.md
parent2a297d08d6b686abe9ab8404a15aa892f4832e25 (diff)
Split markdown files to have a detailed TOC/summary.
Change-Id: I7d578335ba0d1719030bc2efc6518da17a6150dc Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'docs/part-2/2_xds-agent/1_config.md')
-rw-r--r--docs/part-2/2_xds-agent/1_config.md47
1 files changed, 47 insertions, 0 deletions
diff --git a/docs/part-2/2_xds-agent/1_config.md b/docs/part-2/2_xds-agent/1_config.md
new file mode 100644
index 0000000..9e912cb
--- /dev/null
+++ b/docs/part-2/2_xds-agent/1_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 <http://localhost:8386>)
+ - **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.