aboutsummaryrefslogtreecommitdiffstats
path: root/docs/part-2
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-05 17:31:43 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-12-05 17:31:43 +0100
commitebfbae9e24f62a919530b0c7434858ed4042bce1 (patch)
tree3be8e3f1713059422f2513230ed5695cfa55add0 /docs/part-2
parente84622832258152b94e49ffdf388a4cc13e5493e (diff)
Update docs regarding v1.0.0-rc1 release.
Diffstat (limited to 'docs/part-2')
-rw-r--r--docs/part-2/1_xds-server.md98
-rw-r--r--docs/part-2/2_xds-agent.md112
-rw-r--r--docs/part-2/3_xds-cli.md212
-rw-r--r--docs/part-2/4_xds-gdb.md34
-rw-r--r--docs/part-2/5_xds-exec.md (renamed from docs/part-2/3_xds-exec.md)34
5 files changed, 406 insertions, 84 deletions
diff --git a/docs/part-2/1_xds-server.md b/docs/part-2/1_xds-server.md
index ee5df5e..e07d9d3 100644
--- a/docs/part-2/1_xds-server.md
+++ b/docs/part-2/1_xds-server.md
@@ -10,15 +10,25 @@ and let user to continue to work as usual (use his favorite editor,
keep performance while editing/browsing sources).
This powerful and portable webserver (written in [Go](https://golang.org))
-exposes a REST interface over HTTP and also provides a Web dashboard to configure projects and execute _(for now)_ only basics commands.
+exposes a REST interface over HTTP.
`xds-server` uses [Syncthing](https://syncthing.net/) tool to synchronize
projects files from user machine to build server machine or container.
-> **SEE ALSO**: [xds-exec](https://github.com/iotbzh/xds-exec),
-wrappers on `exec` commands that allows you to send commands to `xds-server`
+`xds-server` is commonly running on a build server (within a container or not)
+and [xds-agent](2_xds-agent.md) must run on the developer/user machine in order
+to setup the following connection chain:
+
+```schema
+ developer/user machine | build server or container
+ ---------------------------|-----------------------------
+ xds-cli <---> xds-agent <-|-> xds-server
+```
+
+**SEE ALSO**: [xds-cli](https://github.com/iotbzh/xds-cli),
+a command-line tool that allows you to send commands to `xds-agent / xds-server`
and for example build your application from command-line or from your favorite
-IDE (such as Netbeans or Visual Studio Code) through `xds-server`.
+IDE (such as Netbeans or Visual Studio Code) through `xds-agent <=> xds-server`.
## How to run
@@ -75,18 +85,21 @@ seb@laptop ~$ bash ./xds-docker-create-container.sh --volume /my-workspace:$HOME
This container (ID=0) exposes following ports:
-- 8000 : `xds-server` to serve XDS Dashboard
+- 8000 : `xds-server` to serve XDS webapp
- 69 : TFTP
- 2222 : ssh
#### Manually setup docker user id
<!-- note -->
->**Note:** if you used `xds-docker-create-container.sh` script to create XDS
-> docker container, user uid/gid inside docker has already been changed by this script.
+**Note:** if you used `xds-docker-create-container.sh` script to create XDS
+docker container, user uid/gid inside docker has already been changed by this script.
<!-- endnote -->
-If you plan to **use path-mapping sharing type for your projects**, you need to have the same user id and group id inside and outside docker. By default user and group name inside docker is set `devel` (id `1664`), use following commands to replace id `1664` with your user/group id:
+If you plan to **use path-mapping sharing type for your projects**, you need to
+have the same user id and group id inside and outside docker. By default user
+and group name inside docker is set `devel` (id `1664`), use following commands
+to replace id `1664` with your user/group id:
```bash
# Set docker container name to use (usually agl-xds-xxx where xxx is USERNAME@MACHINENAME-IDX-NAME)
@@ -109,11 +122,12 @@ seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "systemctl start autologin"
seb@laptop ~$ ssh -p 2222 devel@localhost -- "systemctl --user start xds-server"
```
-## Check if xds-server is running (open XDS Dashboard)
+## Check if xds-server is running (open XDS webapp)
**`xds-server` is automatically started** as a service on container startup.
-If the container is running on your localhost, you can access the web interface (what we call the "Dashboard"):
+If the container is running on your localhost, you can access to a basic web
+application:
```bash
seb@laptop ~$ xdg-open http://localhost:8000
@@ -182,39 +196,43 @@ devel@docker ~$ sudo /opt/AGL/xds/server/xds-utils/install-agl-sdks.sh --arch co
```
-### XDS Dashboard
+### XDS server REST API and Web application
-`xds-server` serves a web-application at [http://localhost:8000](http://localhost:8000)
-when XDS server is running on your host. Just replace `localhost` by the host
-name or ip when XDS server is running on another host. So you can now connect
-your browser to this url and use what we call the **XDS dashboard**.
+`xds-server` exposes a REST API and serves a basic web-application.
+
+REST API based url is `http://localhost:8000/api/v1/` when XDS server is
+running on your host (localhost) and basic web-application is available at
+[http://localhost:8000](http://localhost:8000).
+
+Just replace `localhost` by the host name or ip when `xds-server` is running
+on another host.
```bash
+# Get version using REST API
+curl http://localhost:8000/api/v1/version
+
+# Open browser and local xds-server web-application
xdg-open http://localhost:8000
```
-Then follow instructions provided by this dashboard, knowing that the first time
-you need to download and start `xds-agent` on your local machine.
+Then follow instructions provided on this page to install and start `xds-agent`
+that must run locally on your machine.
-To download this tool, just click on download icon in dashboard configuration
-page or download one of `xds-agent` released tarball: [https://github.com/iotbzh/xds-agent/releases](https://github.com/iotbzh/xds-agent/releases).
-
-See also `xds-agent` [README file](https://github.com/iotbzh/xds-agent) for more details.
+See also [xds-agent documentation](2_xds-agent.md) for more details.
## Build xds-server from scratch
### Dependencies
-- Install and setup [Go](https://golang.org/doc/install) version 1.7 or higher to compile this tool.
+- Install and setup [Go](https://golang.org/doc/install) version 1.8.1 or higher to compile this tool.
- Install [npm](https://www.npmjs.com/)
-- Install [gulp](http://gulpjs.com/)
- Install [nodejs](https://nodejs.org/en/)
Ubuntu:
```bash
sudo apt-get install golang npm curl git zip unzip
- sudo npm install -g gulp-cli n
+ sudo npm install --global @angular/cli # Angular Command Line Interface
# Install LTS version of nodejs
sudo n lts
```
@@ -223,7 +241,7 @@ openSUSE:
```bash
sudo zypper install go npm git curl zip unzip
- sudo npm install -g gulp-cli n
+ sudo npm install --global @angular/cli # Angular Command Line Interface
# Install LTS version of nodejs
sudo n lts
```
@@ -257,17 +275,18 @@ And to install `xds-server` (by default in `/opt/AGL/xds/server`):
```
<!-- warning -->
->**Warning:** makefile install rule and default values in configuration file are set
-> to fit the docker setup, so you may need to adapt some settings when you want to install
-> xds-server natively.
+**Warning:** makefile install rule and default values in configuration file are set
+to fit the docker setup, so you may need to adapt some settings when you want to install
+xds-server natively.
<!-- endwarning -->
<!-- note -->
->**Note:** Used `DESTDIR` to specify another install directory
->
->```bash
->make install DESTDIR=$HOME/opt/xds-server
->```
+**Note:** Used `DESTDIR` to specify another install directory
+
+```bash
+make install DESTDIR=$HOME/opt/xds-server
+```
+
<!-- endnote -->
#### XDS docker image
@@ -298,8 +317,8 @@ Here is the logic to determine which `config.json` file will be used:
Supported fields in configuration file are (all fields are optional and example
below corresponds to the default values):
-- **httpPort** : HTTP port of client webapp / dashboard
-- **webAppDir** : location of client dashboard (default: webapp/dist)
+- **httpPort** : HTTP port of client webapp/REST API
+- **webAppDir** : location of client web application (default: webapp/dist)
- **shareRootDir** : root directory where projects will be copied
- **logsDir** : directory to store logs (eg. syncthing output)
- **sdkRootDir** : root directory where cross SDKs are installed
@@ -330,14 +349,15 @@ below corresponds to the default values):
### XDS server architecture
-The server part is written in *Go* and web app / dashboard (client part) in
-*Angular2*.
+The server part is written in *Go* and web app (basic HTML) in *Angular4*.
```bash
|
+-- bin/ where xds-server binary file will be built
|
-+-- agent-config.json.in example of config.json file
++-- conf.d Linux configuration and startup files (systemd user service)
+|
++-- config.json.in example of config.json file
|
+-- glide.yaml Go package dependency file
|
@@ -355,7 +375,7 @@ The server part is written in *Go* and web app / dashboard (client part) in
|
+-- vendor/ temporary directory to hold Go dependencies packages
|
-+-- webapp/ source client dashboard (Angular2 app)
++-- webapp/ source client basic web application
```
Visual Studio Code launcher settings can be found into `.vscode/launch.json`.
diff --git a/docs/part-2/2_xds-agent.md b/docs/part-2/2_xds-agent.md
index 0ece136..7ff271d 100644
--- a/docs/part-2/2_xds-agent.md
+++ b/docs/part-2/2_xds-agent.md
@@ -24,23 +24,30 @@ 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
+- **webAppDir** : location of client webapp / dashboard (default: webapp/dist)
- **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:8386>)
-- **syncthing.gui-apikey** : syncthing api-key to use (default auto-generated)
+- **xdsServers** : an array of xds-server object
+ - **xdsServers.url**: url of xds-server to connect to
+- **syncthing**: a object defining syncthing settings
+ - **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:8386>)
+ - **syncthing.gui-apikey** : syncthing api-key to use (default auto-generated)
```json
{
- "httpPort": "8010",
- "logsDir": "/tmp/logs",
- "xds-apikey": "1234abcezam",
+ "httpPort": "8800",
+ "webAppDir": "./www",
+ "logsDir": "${HOME}/.xds/agent/logs",
+ "xdsServers": [
+ {
+ "url": "http://localhost:8000"
+ }
+ ],
"syncthing": {
- "binDir": ".",
"home": "${HOME}/.xds/agent/syncthing-config",
"gui-address": "http://localhost:8386",
- "gui-apikey": "1234abcezam",
+ "gui-apikey": "1234abcezam"
}
}
```
@@ -65,11 +72,33 @@ You can now use XDS dashboard and check that connection with `xds-agent` is up.
### Dependencies
-Install and setup [Go](https://golang.org/doc/install) version 1.8 or
-higher to compile this tool.
+Install and setup [Go](https://golang.org/doc/install) version 1.8.1 or higher to compile this tool.
>**Note:** for Ubuntu, you can use a PPA, see [https://github.com/golang/go/wiki/Ubuntu](https://github.com/golang/go/wiki/Ubuntu)
+Install [npm](https://www.npmjs.com/), [nodejs](https://nodejs.org/en/) and
+some other tools
+
+Ubuntu:
+
+```bash
+ sudo apt-get install golang npm curl git zip unzip
+ sudo npm install --global @angular/cli # Angular Command Line Interface
+ # Install LTS version of nodejs
+ sudo n lts
+```
+
+openSUSE:
+
+```bash
+ sudo zypper install go npm git curl zip unzip
+ sudo npm install --global @angular/cli # Angular Command Line Interface
+ # Install LTS version of nodejs
+ sudo n lts
+```
+
+Don't forget to open new user session after installing the packages.
+
### Building
Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Makefile:
@@ -116,3 +145,62 @@ export GOARCH=amd64
make all
make package
```
+
+## Debugging
+
+### XDS agent architecture
+
+The agent part is written in *Go* and the webapp / dashboard is in *typescript + Angular4*.
+
+```bash
+|
++-- bin/ where xds-server binary file will be built
+|
++-- conf.d Linux configuration and startup files (systemd user service)
+|
++-- glide.yaml Go package dependency file
+|
++-- lib/ sources of server part (Go)
+|
++-- main.go main entry point of of Web server (Go)
+|
++-- Makefile makefile including
+|
++-- README.md this readme
+|
++-- scripts/ hold various scripts used for installation or startup
+|
++-- tools/ temporary directory to hold development tools (like glide)
+|
++-- vendor/ temporary directory to hold Go dependencies packages
+|
++-- webapp/ source client basic webapp / dashboard
+```
+
+### Debug
+
+Visual Studio Code launcher settings can be found into `.vscode/launch.json`.
+
+>**Tricks:** To debug both `xds-agent` and `xds-server` or common code
+`xds-common`, it may be useful use the same local sources.
+So you should replace `xds-server` + `xds-common` in `vendor` directory by a symlink.
+So clone first `xds-server` + `xds-common` sources next to `xds-agent` directory.
+You should have the following tree:
+
+```bash
+> tree -L 3 src
+src
+|-- github.com
+ |-- iotbzh
+ |-- xds-agent
+ |-- xds-common
+ |-- xds-server
+```
+
+Then invoke `vendor/debug` Makefile rule to create a symlink inside vendor
+directory :
+
+```bash
+cd src/github.com/iotbzh/xds-agent
+make vendor/debug
+```
diff --git a/docs/part-2/3_xds-cli.md b/docs/part-2/3_xds-cli.md
new file mode 100644
index 0000000..a5610c1
--- /dev/null
+++ b/docs/part-2/3_xds-cli.md
@@ -0,0 +1,212 @@
+# xds-cli: command-line tool for XDS
+
+`xds-cli` is a command-line tool for X(cross) Development System.
+
+## Configuration
+
+`xds-cli` configuration is defined either by environment variables or by
+setting command line options.
+Configuration through environment variables may also be defined in a file that
+will be sourced by `xds-cli` on start-up. Use `--config|-c` option or set
+`XDS_CONFIG` environment variable to specify the config file to use.
+
+So configuration is driven either by environment variables or by command line
+options or using a config file knowing that the following priority order is used:
+
+1. use option value (for example use project ID set by `--id` option),
+1. else use variable `XDS_xxx` (for example `XDS_PROJECT_ID` variable) when a
+ config file is specified with `--config|-c` option,
+1. else use `XDS_xxx` (for example `XDS_PROJECT_ID`) environment variable
+
+<!-- note -->
+**Note:** all parameters after a double dash (--) are considered as the command
+to execute on xds-server.
+<!-- endnote -->
+
+### Global Options / Configuration variables
+
+Following is the list of global options across all sub-commands.
+
+__`--config|-c` option or `XDS_CONFIG` env variable__
+
+Env config file to source on startup
+
+__`--log|-l` option or `XDS_LOGLEVEL` env variable__
+
+Logging level, supported levels are:
+
+- panic,
+- fatal,
+- error,
+- warn,
+- info,
+- debug
+
+Default level is "error".
+
+__`--rpath` option or `XDS_PATH` env variable__
+
+Relative path into project
+
+__`timestamp|-ts` option or `XDS_TIMESTAMP` env variable__
+
+Prefix output with timestamp
+
+__`url` option or `XDS_AGENT_URL` env variable__
+
+Local XDS agent url (default: "localhost:8800")
+
+## Commands
+
+### projects
+
+`projects` (short `prj`) command should be used to managed XDS projects.
+This command supports following sub-commands:
+
+```bash
+add, a Add a new project
+get Get a property of a project
+list, ls List existing projects
+remove, rm Remove an existing project
+sync Force synchronization of project sources
+```
+
+Here are some usage examples:
+
+```bash
+# Create/declare a new project
+xds-cli prj add --label "ABeautifulName" --type pm -p /home/seb/xds-workspace/myProject -sp /home/devel/xds-workspace/myProject
+
+# List projects
+xds-cli prj ls
+
+# Delete an existing project
+xds-cli prj rm 8e49
+```
+
+### sdks
+
+`sdks` (alias `sdk`) command should be used to managed cross SDKs.
+This command supports following sub-commands:
+
+```bash
+add, a Add a new SDK
+get Get a property of a SDK
+list, ls List installed SDKs
+remove, rm Remove an existing SDK
+```
+
+Here are some usage examples:
+
+```bash
+# List existing SDKs
+xds-cli sdks ls
+
+# Get SDK info
+xds-cli sdks get c64d
+```
+
+### exec
+
+`exec` command should be used to exec command through XDS system. For example
+you can use this command to build your project in XDS system.
+This command supports following sub-commands:
+
+`exec` command options are:
+
+__`--id` option or `XDS_PROJECT_ID` env variable (**mandatory option**)__
+
+project ID you want to build
+
+__`--rpath` (short `-p`) or `XDS_RPATH` env variable__
+
+relative path into project
+
+__`--sdkid` (alias `--sdk`) or `XDS_SDK_ID` env variable (**mandatory option**)__
+
+Cross Sdk ID to use to build project
+
+Here are some usage examples:
+
+```bash
+cd $MY_PROJECT_DIR
+mkdir build
+
+# Generate build system using cmake
+xds-cli exec --id=4021 --sdkid=c226 -- "cd build && cmake .."
+
+# Build the project
+xds-cli exec --id=4021 --sdkid=c226 -- "cd build && make all"
+```
+
+In case of `xds-agent` is not running on default url:port (that is `localhost:8800`)
+you can specify the url using `--url` option :
+
+```bash
+xds-cli --url=http://localhost:8800 exec --id=4021 --sdkid=c226 -- "cd build && make all"
+```
+
+### misc
+
+`misc` command allows to execute miscellaneous sub-commands such as:
+
+```bash
+version, v Get version of XDS agent and XDS server
+status, sts Get XDS configuration status (including XDS server connection)
+```
+
+Here are some usage examples:
+
+```bash
+xds-cli misc version --verbose
+
+xds-cli misc sts
+```
+
+## How to build
+
+### Prerequisites
+
+ You must install and setup [Go](https://golang.org/doc/install) version 1.8.1 or
+ higher to compile this tool.
+
+### Building
+
+Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Makefile:
+
+```bash
+ export GOPATH=$(realpath ~/workspace_go)
+ mkdir -p $GOPATH/src/github.com/iotbzh
+ cd $GOPATH/src/github.com/iotbzh
+ git clone https://github.com/iotbzh/xds-cli.git
+ cd xds-cli
+ make
+```
+
+## Debug
+
+Visual Studio Code launcher settings can be found into `.vscode/launch.json`.
+
+>**Tricks:** To debug both `xds-cli` and `xds-agent` (REST API part) or common
+code `xds-common`, it may be useful use the same local sources.
+So you should replace `xds-agent` + `xds-common` in `vendor` directory by a symlink.
+So clone first `xds-agent` + `xds-common` sources next to `xds-cli` directory.
+You should have the following tree:
+
+```bash
+> tree -L 3 src
+src
+|-- github.com
+ |-- iotbzh
+ |-- xds-agent
+ |-- xds-cli
+ |-- xds-common
+```
+
+Then invoke `vendor/debug` Makefile rule to create a symlink inside vendor
+directory :
+
+```bash
+cd src/github.com/iotbzh/xds-cli
+make vendor/debug
+```
diff --git a/docs/part-2/4_xds-gdb.md b/docs/part-2/4_xds-gdb.md
index 529dc51..6e5b57d 100644
--- a/docs/part-2/4_xds-gdb.md
+++ b/docs/part-2/4_xds-gdb.md
@@ -9,16 +9,16 @@ Two debugging models are supported:
1. native debugging
-1. XDS remote debugging requiring an XDS server and allowing cross debug your
- application.
+1. XDS remote debugging requiring an XDS agent/server setup. That allows you to easily cross debug your application.
- By default XDS remote debug is used and you need to define `XDS_NATIVE_GDB`
+ By default XDS debug model is used and you need to define `XDS_NATIVE_GDB`
variable to use native gdb debug mode instead.
-> **SEE ALSO**: [xds-server](https://github.com/iotbzh/xds-server), a web server
+> **SEE ALSO**: [xds-agent](https://github.com/iotbzh/xds-agent), a local agent
+used to interface xds-server.
+> **SEE ALSO**: [xds-server](https://github.com/iotbzh/xds-server), a REST API server
used to remotely cross build applications.
-> **SEE ALSO**: [xds-exec](https://github.com/iotbzh/xds-exec),
-wrappers on `exec` command that allows to cross build your application through `xds-server`.
+> **SEE ALSO**: [xds-cli](https://github.com/iotbzh/xds-cli), XDS command line tool.
## Configuration
@@ -46,9 +46,9 @@ wrappers on `exec` command that allows to cross build your application through `
```bash
cat $HOME/myProject/xds-gdb.env
-export XDS_SERVER_URL=http://xds-docker:8000
-export XDS_PROJECT_ID=IW7B4EE-DBY4Z74_myProject
-export XDS_SDK_ID=poky-agl_aarch64_4.0.1
+export XDS_AGENT_URL=http://localhost:8800
+export XDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b
+export XDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03
```
`XDS_LOGLEVEL`
@@ -61,9 +61,9 @@ Set logging file, default `/tmp/xds-gdb.log`.
`XDS_NATIVE_GDB`
-Use native gdb mode instead of remote XDS server mode.
+Use native gdb mode instead of XDS mode.
-`XDS_PROJECT_ID` *(mandatory with XDS server mode)*
+`XDS_PROJECT_ID` *(mandatory in XDS mode)*
Project ID you want to build
@@ -71,13 +71,13 @@ Project ID you want to build
Relative path into project
-`XDS_SDK_ID` *(mandatory with XDS server mode)*
+`XDS_SDK_ID` *(mandatory in XDS mode)*
Cross Sdk ID to use to build project
-`XDS_SERVER_URL` *(mandatory with XDS server mode)*
+`XDS_AGENT_URL`
-Remote XDS server url
+Local XDS agent url (default `http://localhost:8800`)
### Configuration variables set within gdb init command file
@@ -88,15 +88,15 @@ You must respect the following syntax: commented line including `:XDS-ENV:` tag
Example of gdb init file where we define project and sdk ID:
```bash
- # :XDS-ENV: XDS_PROJECT_ID=IW7B4EE-DBY4Z74_myProject
- # :XDS-ENV: XDS_SDK_ID=poky-agl_aarch64_4.0.1
+ # :XDS-ENV: XDS_PROJECT_ID=4021617e-ced0-11e7-acd2-3c970e49ad9b
+ # :XDS-ENV: XDS_SDK_ID=c226821b-b5c0-386d-94fe-19f807946d03
```
## How to build xds-gdb from scratch
### Prerequisites
- You must install and setup [Go](https://golang.org/doc/install) version 1.7 or
+ You must install and setup [Go](https://golang.org/doc/install) version 1.8.1 or
higher to compile this tool.
### Building
diff --git a/docs/part-2/3_xds-exec.md b/docs/part-2/5_xds-exec.md
index 0c63ff3..cc31a40 100644
--- a/docs/part-2/3_xds-exec.md
+++ b/docs/part-2/5_xds-exec.md
@@ -22,25 +22,26 @@ So configuration is driven either by environment variables or by command line
options or using a config file knowing that the following priority order is used:
1. use option value (for example use project ID set by `--id` option),
-1. else use variable `XDS_xxx` (for example `XDS_PROJECT_ID` variable) when a config file is specified with `--config|-c` option,
+1. else use variable `XDS_xxx` (for example `XDS_PROJECT_ID` variable) when a
+ config file is specified with `--config|-c` option,
1. else use `XDS_xxx` (for example `XDS_PROJECT_ID`) environment variable
<!-- note -->
->**Note:** all parameters after a double dash (--) are considered as the command
+**Note:** all parameters after a double dash (--) are considered as the command
to execute on xds-server.
<!-- endnote -->
### Configuration Options/Variables
-`--id` option or `XDS_PROJECT_ID` env variable **(mandatory)**
+__`--id` option or `XDS_PROJECT_ID` env variable **(mandatory)**__
Project ID you want to build
-`--config|-c` option or `XDS_CONFIG` env variable
+__`--config|-c` option or `XDS_CONFIG` env variable__
Env config file to source on startup
-`--log|-l` option or `XDS_LOGLEVEL` env variable
+__`--log|-l` option or `XDS_LOGLEVEL` env variable__
Logging level, supported levels are:
@@ -53,27 +54,27 @@ Logging level, supported levels are:
Default level is "error".
-`--rpath` option or `XDS_PATH` env variable
+__`--rpath` option or `XDS_PATH` env variable__
Relative path into project
-`sdkid` option or `XDS_SDK_ID` env variable **(mandatory)**
+__`sdkid` option or `XDS_SDK_ID` env variable **(mandatory)**__
Cross Sdk ID to use to build project
-`timestamp|-ts` option or `XDS_TIMESTAMP` env variable
+__`timestamp|-ts` option or `XDS_TIMESTAMP` env variable__
Prefix output with timestamp
-`url` option or `XDS_SERVER_URL` env variable
+__`url` option or `XDS_AGENT_URL` env variable__
-Remote XDS server url (default: "localhost:8000")
+Local XDS agent url (default: "localhost:8800")
## How to build
### Prerequisites
- You must install and setup [Go](https://golang.org/doc/install) version 1.7 or
+ You must install and setup [Go](https://golang.org/doc/install) version 1.8.1 or
higher to compile this tool.
### Building
@@ -93,10 +94,10 @@ Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Make
Visual Studio Code launcher settings can be found into `.vscode/launch.json`.
->**Tricks:** To debug both `xds-exec` (client part) and `xds-server` (server part),
-it may be useful use the same local sources.
-So you should replace `xds-server` in `vendor` directory by a symlink.
-So clone first `xds-server` sources next to `xds-exec` directory.
+>**Tricks:** To debug both `xds-exec` and `xds-agent` (REST API part) or common
+code `xds-common`, it may be useful use the same local sources.
+So you should replace `xds-agent` + `xds-common` in `vendor` directory by a symlink.
+So clone first `xds-agent` + `xds-common` sources next to `xds-exec` directory.
You should have the following tree:
```bash
@@ -104,8 +105,9 @@ You should have the following tree:
src
|-- github.com
|-- iotbzh
+ |-- xds-agent
+ |-- xds-common
|-- xds-exec
- |-- xds-server
```
Then invoke `vendor/debug` Makefile rule to create a symlink inside vendor