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
20 deb http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/ ./
24 sudo apt-get install agl-xds-agent
27 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:
39 /opt/AGL/agl-xds-agent
42 ### Install package for rpm distro type
47 export DISTRO="openSUSE_Leap_42.2"
48 sudo zypper ar http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/app-Development/${DISTRO}/isv:LinuxAutomotive:app-Development.repo
50 sudo zypper install agl-xds-agent
53 The value 'DISTRO' can be set to {openSUSE_Leap_42.2, openSUSE_Leap_42.3, openSUSE_Tumbleweed}
59 sudo zypper install --force agl-xds-agent
62 The files are install here:
65 /opt/AGL/agl-xds-agent
68 ## How to install on other platform
70 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 (for example: /opt/AGL/xds or C:\AGL\xds).
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:
81 1. from command line option: `--config myConfig.json`
82 1. `$HOME/.xds/agent/agent-config.json` file
83 1. `<current dir>/agent-config.json` file
84 1. `<xds-agent executable dir>/agent-config.json` file
86 Supported fields in configuration file are (all fields are optional and example
87 below corresponds to the default values):
89 - **httpPort** : http port of agent REST interface
90 - **logsDir** : directory to store logs (eg. syncthing output)
91 - **xds-apikey** : xds-agent api-key to use (always set value to "1234abcezam")
92 - **syncthing.binDir** : syncthing binaries directory (default: executable directory)
93 - **syncthing.home"** : syncthing home directory (usually .../syncthing-config)
94 - **syncthing.gui-address** : syncthing gui url (default http://localhost:8384)
95 - **syncthing.gui-apikey** : syncthing api-key to use (default auto-generated)
100 "logsDir": "/tmp/logs",
101 "xds-apikey": "1234abcezam",
104 "home": "${HOME}/.xds/agent/syncthing-config",
105 "gui-address": "http://localhost:8384",
106 "gui-apikey": "1234abcezam",
111 >**NOTE:** environment variables are supported by using `${MY_VAR}` syntax.
115 Simply to start `xds-agent` executable
121 >**NOTE** if need be, you can increase log level by setting option
122 `--log <level>`, supported *level* are: panic, fatal, error, warn, info, debug.
124 You can now use XDS dashboard and check that connection with `xds-agent` is up.
125 (see also [xds-server README](https://github.com/iotbzh/xds-server/blob/master/README.md#xds-dashboard))
127 ## Build xds-agent from scratch
131 Install and setup [Go](https://golang.org/doc/install) version 1.8 or
132 higher to compile this tool.
136 Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Makefile:
139 mkdir -p $GOPATH/src/github.com/iotbzh
140 cd $GOPATH/src/github.com/iotbzh
141 git clone https://github.com/iotbzh/xds-agent.git
146 And to install xds-agent (by default in `/usr/local/bin`):
152 >**NOTE:** Used `DESTDIR` to specify another install directory
154 >make install DESTDIR=$HOME/opt/xds-agent
159 For example on a Linux machine to cross-build for Windows, just execute: