From 6359d8079dbc7d8092ebdd47fa64818ac94ea8cb Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Thu, 22 Jun 2017 22:49:16 +0200 Subject: [PATCH] Rework README --- Makefile | 3 +- README.md | 105 ++++++++++++++++++++----------------- resources/images/download_icon.jpg | Bin 0 -> 1235 bytes 3 files changed, 58 insertions(+), 50 deletions(-) create mode 100644 resources/images/download_icon.jpg diff --git a/Makefile b/Makefile index 64064fe..f2f8dd1 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,8 @@ tools/syncthing/copytobin: .PHONY: help help: @echo "Main supported rules:" - @echo " build (default)" + @echo " all (default)" + @echo " build @echo " package" @echo " install" @echo " clean" diff --git a/README.md b/README.md index 06d0725..190a5e0 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,73 @@ # XDS - X(cross) Development System Agent -XDS-agent is an agent that should run on your local machine when you use XDS. - -This agent takes care of starting [Syncthing](https://syncthing.net/) tool to -synchronize your projects files from your local machine to build server machine -or container. +XDS-agent is an agent that should run on your local host 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). > **SEE ALSO**: [xds-server](https://github.com/iotbzh/xds-server), a web server used to remotely cross build applications. +## How to run + +First you need to download `xds-agent` tarballs from xds dashboard by clicking +on download icon ![download icon](./resources/images/download_icon.jpg) of +configuration page. + +> **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` +2. `$HOME/.xds/agent-config.json` file +3. `/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): +``` +{ + "httpPort": "8010", # http port of agent REST interface + "logsDir": "/tmp/logs", # directory to store logs (eg. syncthing output) + "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) + } +} +``` + +>**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)) -## How to build + +## 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: @@ -40,7 +89,6 @@ make install >make install DESTDIR=$HOME/opt/xds-agent >``` - #### Cross build For example on a Linux machine to cross-build for Windows, just execute: ```bash @@ -49,44 +97,3 @@ export GOARCH=amd64 make all make package ``` - -## How to run - -## Configuration - -xds-agent configuration is driven by a JSON config file (`agent-config.json`). - -Here is the logic to determine which `agent-config.json` file will be used: -1. from command line option: `--config myConfig.json` -2. `$HOME/.xds/agent-config.json` file -3. `/agent-config.json` file -4. `/agent-config.json` file - -Supported fields in configuration file are: -```json -{ - "httpPort": "http port of agent REST interface", - "logsDir": "directory to store logs (eg. syncthing output)", - "syncthing": { - "binDir": "syncthing binaries directory (use xds-agent executable dir when not set)", - "home": "syncthing home directory (usually .../syncthing-config)", - "gui-address": "syncthing gui url (default http://localhost:8384)", - "gui-apikey": "syncthing api-key to use (default auto-generated)" - } -} -``` - ->**NOTE:** environment variables are supported by using `${MY_VAR}` syntax. - -## Start-up - -```bash -./bin/xds-agent.sh - -# OR if you have install agent - -/usr/local/bin/xds-agent.sh -``` - ->**NOTE** you can define some environment variables to setup for example -config file `XDS_CONFIGFILE` or change logs level `LOG_LEVEL`. diff --git a/resources/images/download_icon.jpg b/resources/images/download_icon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f31ab76c515ea5b13a8d959a36c4a9cda965b115 GIT binary patch literal 1235 zcmb7@drVVT9LLW&_ujV90{8YMugSf8z4>(@{Sxj-Zwj?`?E!CCevT+H?`<*rr0|XUM zQm#UwKqPUMNW`vUv75V;c5`Rk#bR1XGcvhCp^$j2^Hj<`rE-Ow7l8ymLsBjjsa6|5J&s`(h*_2df*r0!Q>43lTsLAD%0)yFKS$;x)Xb!)=#wqp2^Vw zA&7*lvIGe!yeVL$GKG@G@*+%y6dF#|-xZ#yP#*tli?^ry=E&23R#`q;(7k*A*mqt* z)(5lWqbY}u{roo8491=yA}MM`6e0qUG^0{WWh_@C*QD4TOTySuG_jHD4gjE6G6;mq-t6wXE{wu%}XTWk>f`6dZ@>R1pVxhN54rFU7Ga#jlnWl z^y=Y)Uke`CMs$m+ts%DLpTyU0&Acy7t%{j`{0I5?WUc>~yuT0{K!QMo%L)toV}Mjc zbC~5H_}aFZ1KM-;m#q^-qwx(NmV{5D6yx`o^NmjmbA0~JJUg2ew0rMh#Ei+7r>qEV z&r(glQJtuNw)fME1^(meIP<+nX}ZbmTtQEhUs_w8)^xs>b??XU0GthkqBUcJM~I_Y zl}1}s?oih>nwKMs=B``5YAcjqk(5=Ww(juqF+co#i>bpN<{O`|sW;O<{|M6G7%Lav ziO3MkjNLvimboW}v)|rixPWp47FilAz&DiczIbRps^F5XfWHB5HIA1e*2K$jKt;1^ z{tD*KF}vgGO1kvG@lIoxZ+*i|RI=-i!=vGo6J0lb{rXLoD;~dZ8kwt>$6xM3M=Ni% z?Ah0lGAU9QreBEb`()@B_8~D_ZRu^9@C93!66Sa;4tVtmKt=^PEzN2g)kTi6B_y9N zJ$5?dp!Q?}d#9P~tNiDieO_Vdxxv+mRMXt3)LN!-ar_{c=(c|*?h!9sBP*qmBVlIi z^Q)C!n+@3Ae-DDh1G`+1;Z%TDYl_&K#?IwbF=o`~XvnU0RejyEDtlV3SbZYH8W{Dp zr=rL+BB^b@cw6WAAfr1Y8en$|l+!?xQ~Hi*J=FS@NX_9bNyPPuTLWg%9+kR0w7B*8 TE1Bs`hj&IOnX2DqaNhqHKO%IU literal 0 HcmV?d00001 -- 2.16.6