1 # XDS - X(cross) Development System Agent
3 XDS-agent is a client that should run on your local / user development machine 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}
34 sudo apt-get upgrade agl-xds-agent
37 The files are install here:
40 /opt/AGL/agl-xds-agent
43 ### Install package for rpm distro type
48 export DISTRO="openSUSE_Leap_42.2"
49 sudo zypper ar http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/isv:LinuxAutomotive:app-Development.repo
51 sudo zypper install agl-xds-agent
54 The value 'DISTRO' can be set to {openSUSE_Leap_42.2, openSUSE_Leap_42.3, openSUSE_Tumbleweed}
60 sudo zypper install --force agl-xds-agent
63 The files are install here:
66 /opt/AGL/agl-xds-agent
69 ## How to install on other platform
71 You need to download `xds-agent` tarballs from xds dashboard by clicking
72 on download icon ![download icon](./resources/images/download_icon.jpg) of
75 > **NOTE** : you can also download released tarballs from github [releases page](https://github.com/iotbzh/xds-agent/releases).
77 Then unzip this tarball any where into your local disk.
81 xds-agent configuration is driven by a JSON config file (named `agent-config.json`).
82 The tarball mentioned in previous section includes this file with default settings.
84 Here is the logic to determine which `agent-config.json` file will be used:
86 1. from command line option: `--config myConfig.json`
87 1. `$HOME/.xds/agent-config.json` file
88 1. `<current dir>/agent-config.json` file
89 1. `<xds-agent executable dir>/agent-config.json` file
91 Supported fields in configuration file are (all fields are optional and example
92 below corresponds to the default values):
94 - **httpPort** : http port of agent REST interface
95 - **logsDir** : directory to store logs (eg. syncthing output)
96 - **xds-apikey** : xds-agent api-key to use (always set value to "1234abcezam")
97 - **syncthing.binDir** : syncthing binaries directory (default: executable directory)
98 - **syncthing.home"** : syncthing home directory (usually .../syncthing-config)
99 - **syncthing.gui-address** : syncthing gui url (default http://localhost:8384)
100 - **syncthing.gui-apikey** : syncthing api-key to use (default auto-generated)
105 "logsDir": "/tmp/logs",
106 "xds-apikey": "1234abcezam",
109 "home": "${HOME}/.xds/syncthing-config",
110 "gui-address": "http://localhost:8384",
111 "gui-apikey": "1234abcezam",
116 >**NOTE:** environment variables are supported by using `${MY_VAR}` syntax.
120 Simply to start `xds-agent` executable
126 >**NOTE** if need be, you can increase log level by setting option
127 `--log <level>`, supported *level* are: panic, fatal, error, warn, info, debug.
129 You can now use XDS dashboard and check that connection with `xds-agent` is up.
130 (see also [xds-server README](https://github.com/iotbzh/xds-server/blob/master/README.md#xds-dashboard))
132 ## Build xds-agent from scratch
136 Install and setup [Go](https://golang.org/doc/install) version 1.8 or
137 higher to compile this tool.
141 Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Makefile:
144 mkdir -p $GOPATH/src/github.com/iotbzh
145 cd $GOPATH/src/github.com/iotbzh
146 git clone https://github.com/iotbzh/xds-agent.git
151 And to install xds-agent (by default in `/usr/local/bin`):
157 >**NOTE:** Used `DESTDIR` to specify another install directory
159 >make install DESTDIR=$HOME/opt/xds-agent
164 For example on a Linux machine to cross-build for Windows, just execute: