X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fxds%2Fxds-agent.git;a=blobdiff_plain;f=README.md;h=caf7d20bfc92bb89bdcc2d21f30aaed27ba1c6ac;hp=4cdf5ae6e19fd8296cb12a15fbeb89eebcfdbe7d;hb=2d3f1be6a495143d7e82f6396a49dfff6cabc3e4;hpb=df4f4484cf2523c86ac895a524a6ffbeca45e74e diff --git a/README.md b/README.md index 4cdf5ae..caf7d20 100644 --- a/README.md +++ b/README.md @@ -1,170 +1,14 @@ # XDS - X(cross) Development System Agent -XDS-agent is a client that should run on your local / user development machine when you use XDS. +XDS-agent is a client that should run on your local / user development machine +when you use XDS. -This agent takes care, among others, of starting [Syncthing](https://syncthing.net/) -tool to synchronize your project files from your local host to XDS build server -machine or container (where `xds-server` is running). +## Documentation -> **SEE ALSO**: [xds-server](https://github.com/iotbzh/xds-server), a web server -used to remotely cross build applications. +Please find XDS User's Guide online at : -## How to install xds-agent +[http://docs.automotivelinux.org/docs/devguides/en/dev/#xcross-development-system-user's-guide](http://docs.automotivelinux.org/docs/devguides/en/dev/#xcross-development-system-user's-guide) -### Install package for debian distro type +and `xds-agent` advanced documentation at : -```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< **NOTE** : you can also download released tarballs from github [releases page](https://github.com/iotbzh/xds-agent/releases). - -Then unzip this tarball any where into your local disk. - -## Configuration - -xds-agent configuration is driven by a JSON config file (named `agent-config.json`). -The tarball mentioned in previous section includes this file with default settings. - -Here is the logic to determine which `agent-config.json` file will be used: - -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", - "logsDir": "/tmp/logs", - "xds-apikey": "1234abcezam", - "syncthing": { - "binDir": ".", - "home": "${HOME}/.xds/syncthing-config", - "gui-address": "http://localhost:8384", - "gui-apikey": "1234abcezam", - } -} -``` - ->**NOTE:** environment variables are supported by using `${MY_VAR}` syntax. - -## Start-up - -Simply to start `xds-agent` executable - -```bash -./xds-agent & -``` - ->**NOTE** if need be, you can increase log level by setting option -`--log `, supported *level* are: panic, fatal, error, warn, info, debug. - -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 -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 - git clone https://github.com/iotbzh/xds-agent.git - cd xds-agent - make all -``` - -And to install xds-agent (by default in `/usr/local/bin`): - -```bash -make install -``` - ->**NOTE:** Used `DESTDIR` to specify another install directory ->```bash ->make install DESTDIR=$HOME/opt/xds-agent ->``` - -#### Cross build - -For example on a Linux machine to cross-build for Windows, just execute: - -```bash -export GOOS=windows -export GOARCH=amd64 -make all -make package -``` +[http://docs.automotivelinux.org/docs/devguides/en/dev/reference/xds/part-2/2_xds-agent.html](http://docs.automotivelinux.org/docs/devguides/en/dev/reference/xds/part-2/2_xds-agent.html)