1 # XDS - X(cross) Development System Agent
3 XDS-agent is an agent that should run on your local host when you use XDS.
5 This agent takes care, among others, of starting [Syncthing](https://syncthing.net/)
6 tool to synchronize your project files from your local host to XDS build server
7 machine or container (where `xds-server` is running).
9 > **SEE ALSO**: [xds-server](https://github.com/iotbzh/xds-server), a web server
10 used to remotely cross build applications.
12 ## How to install xds-agent
14 ### Install package for debian distro type
17 export DISTRO="Debian_8.0"
18 wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/Release.key | sudo apt-key add -
19 sudo bash -c "cat >/etc/apt/sources.list.d/AGL.list<<EOL
21 deb http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/ ./
25 sudo apt-get install agl-xds-agent
28 The value 'DISTRO' can be set to {Debian_8.0, Debian_9.0, xUbuntu_16.04, xUbuntu_16.10, xUbuntu_17.04}
33 sudo apt-get upgrade agl-xds-agent
36 The files are install here:
38 /opt/AGL/agl-xds-agent
41 ### Install package for rpm distro type
45 export DISTRO="openSUSE_Leap_42.2"
46 sudo zypper ar http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/isv:LinuxAutomotive:app-Development.repo
48 sudo zypper install agl-xds-agent
51 The value 'DISTRO' can be set to {openSUSE_Leap_42.2, openSUSE_Leap_42.3, openSUSE_Tumbleweed}
56 sudo zypper install --force agl-xds-agent
59 The files are install here:
61 /opt/AGL/agl-xds-agent
64 ## How to install on other platform
66 You need to download `xds-agent` tarballs from xds dashboard by clicking
67 on download icon ![download icon](./resources/images/download_icon.jpg) of
70 > **NOTE** : you can also download released tarballs from github [releases page](https://github.com/iotbzh/xds-agent/releases).
72 Then unzip this tarball any where into your local disk.
76 xds-agent configuration is driven by a JSON config file (named `agent-config.json`).
77 The tarball mentioned in previous section includes this file with default settings.
79 Here is the logic to determine which `agent-config.json` file will be used:
80 1. from command line option: `--config myConfig.json`
81 2. `$HOME/.xds/agent-config.json` file
82 3. `<current dir>/agent-config.json` file
83 4. `<xds-agent executable dir>/agent-config.json` file
85 Supported fields in configuration file are (all fields are optional and listed
86 values are the default values):
89 "httpPort": "8010", # http port of agent REST interface
90 "logsDir": "/tmp/logs", # directory to store logs (eg. syncthing output)
92 "binDir": ".", # syncthing binaries directory (default: executable directory)
93 "home": "${HOME}/.xds/syncthing-config", # syncthing home directory (usually .../syncthing-config)
94 "gui-address": "http://localhost:8384", # syncthing gui url (default http://localhost:8384)
95 "gui-apikey": "123456789", # syncthing api-key to use (default auto-generated)
100 >**NOTE:** environment variables are supported by using `${MY_VAR}` syntax.
104 Simply to start `xds-agent` executable
109 >**NOTE** if need be, you can increase log level by setting option
110 `--log <level>`, supported *level* are: panic, fatal, error, warn, info, debug.
112 You can now use XDS dashboard and check that connection with `xds-agent` is up.
113 (see also [xds-server README](https://github.com/iotbzh/xds-server/blob/master/README.md#xds-dashboard))
116 ## Build xds-agent from scratch
120 - Install and setup [Go](https://golang.org/doc/install) version 1.8 or
121 higher to compile this tool.
125 Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Makefile:
127 mkdir -p $GOPATH/src/github.com/iotbzh
128 cd $GOPATH/src/github.com/iotbzh
129 git clone https://github.com/iotbzh/xds-agent.git
134 And to install xds-agent (by default in `/usr/local/bin`):
139 >**NOTE:** Used `DESTDIR` to specify another install directory
141 >make install DESTDIR=$HOME/opt/xds-agent
145 For example on a Linux machine to cross-build for Windows, just execute: