X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=README.md;h=4cdf5ae6e19fd8296cb12a15fbeb89eebcfdbe7d;hb=df4f4484cf2523c86ac895a524a6ffbeca45e74e;hp=634dfc0d848f8fa3e52d2b991eb5309b7fb03b49;hpb=74e99eaf4f0ad28dfd42f242bf947a7ec11fa352;p=src%2Fxds%2Fxds-agent.git diff --git a/README.md b/README.md index 634dfc0..4cdf5ae 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,7 @@ used to remotely cross build applications. ```bash export DISTRO="Debian_8.0" wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/Release.key | sudo apt-key add - -sudo bash -c "cat >/etc/apt/sources.list.d/AGL.list<> /etc/apt/sources.list.d/AGL.list</agent-config.json` file -4. `/agent-config.json` file -Supported fields in configuration file are (all fields are optional and listed -values are the default values): -``` +1. from command line option: `--config myConfig.json` +1. `$HOME/.xds/agent-config.json` file +1. `/agent-config.json` file +1. `/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 +- **logsDir** : directory to store logs (eg. syncthing output) +- **xds-apikey** : xds-agent api-key to use (always set value to "1234abcezam") +- **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:8384) +- **syncthing.gui-apikey** : syncthing api-key to use (default auto-generated) + +```json { - "httpPort": "8010", # http port of agent REST interface - "logsDir": "/tmp/logs", # directory to store logs (eg. syncthing output) + "httpPort": "8010", + "logsDir": "/tmp/logs", + "xds-apikey": "1234abcezam", "syncthing": { - "binDir": ".", # syncthing binaries directory (default: executable directory) - "home": "${HOME}/.xds/syncthing-config", # syncthing home directory (usually .../syncthing-config) - "gui-address": "http://localhost:8384", # syncthing gui url (default http://localhost:8384) - "gui-apikey": "123456789", # syncthing api-key to use (default auto-generated) + "binDir": ".", + "home": "${HOME}/.xds/syncthing-config", + "gui-address": "http://localhost:8384", + "gui-apikey": "1234abcezam", } } ``` @@ -102,6 +117,7 @@ values are the default values): ## Start-up Simply to start `xds-agent` executable + ```bash ./xds-agent & ``` @@ -112,17 +128,17 @@ Simply to start `xds-agent` executable You can now use XDS dashboard and check that connection with `xds-agent` is up. (see also [xds-server README](https://github.com/iotbzh/xds-server/blob/master/README.md#xds-dashboard)) - ## Build xds-agent from scratch ### Dependencies -- Install and setup [Go](https://golang.org/doc/install) version 1.8 or +Install and setup [Go](https://golang.org/doc/install) version 1.8 or higher to compile this tool. ### Building Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Makefile: + ```bash mkdir -p $GOPATH/src/github.com/iotbzh cd $GOPATH/src/github.com/iotbzh @@ -132,6 +148,7 @@ Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Make ``` And to install xds-agent (by default in `/usr/local/bin`): + ```bash make install ``` @@ -142,7 +159,9 @@ make install >``` #### Cross build + For example on a Linux machine to cross-build for Windows, just execute: + ```bash export GOOS=windows export GOARCH=amd64