Fix format for json file.
[src/xds/xds-server.git] / README.md
index a5d4440..05ede13 100644 (file)
--- a/README.md
+++ b/README.md
@@ -27,26 +27,26 @@ your favorite IDE (eg. Netbeans or Visual Studio Code) through `xds-server`.
 
 ## How to run
 
-`xds-server` has been designed to easily cross compile
+`xds-server` has been designed to easily compile and debug
 [AGL](https://www.automotivelinux.org/) applications. That's why `xds-server` has
-been integrated in AGL SDK docker container.
+been integrated into AGL SDK docker container.
 
 >**NOTE** For more info about AGL SDK docker container, please refer to
 [AGL SDK Quick Setup](http://docs.automotivelinux.org/docs/getting_started/en/dev/reference/setup-sdk-environment.html)
 
-### Get container
+### Get the container
 
 Load the pre-build AGL SDK docker image including `xds-server`:
 ```bash
-wget http://iot.bzh/download/public/2017/XDS/docker/docker_agl_worker-xds-latest.tar.xz | docker load
+wget -O - http://iot.bzh/download/public/2017/XDS/docker/docker_agl_worker-xds-latest.tar.xz | docker load
 ```
 
 ### Start xds-server within the container
 
 Use provided script to create a new docker image and start a new container:
 ```bash
-> wget https://github.com/iotbzh/xds-server/blob/master/scripts/xds-docker-create-container.sh
-bash ./xds-docker-create-container.sh 0 docker.automotivelinux.org/agl/worker-xds:3.99.1
+> wget https://raw.githubusercontent.com/iotbzh/xds-server/master/scripts/xds-docker-create-container.sh
+bash ./xds-docker-create-container.sh 0 docker.automotivelinux.org/agl/worker-xds:3.99.1
 
 > docker ps
 CONTAINER ID        IMAGE                                               COMMAND                  CREATED              STATUS              PORTS                                                                                         NAMES
@@ -58,12 +58,17 @@ This container exposes following ports:
   - 69   : TFTP
   - 2222 : ssh
 
-Now you need to start manually `xds-server` inside this container:
+`xds-server` is automatically started as a service on container startup.
+If needed you can stop / start it manually using following commands:
 ```bash
 > ssh -p 2222 devel@localhost
+
+[15:59:58] devel@agl-worker-seb-laptop-0-seb:~$ /usr/local/bin/xds-server-stop.sh
+
 [15:59:58] devel@agl-worker-seb-laptop-0-seb:~$ /usr/local/bin/xds-server-start.sh
 ```
-You should get the following output:
+
+On `xds-server` startup, you should get the following output:
 ```
 ### Configuration in config.json:
 {
@@ -87,12 +92,25 @@ pid=22379
 >**NOTE:** You can set LOGLEVEL env variable to increase log level if you need it.
 > For example, to set log level to "debug" mode : ` LOGLEVEL=debug /usr/local/bin/xds-server-start.sh`
 
-You can now connect your browser to `xds-server` (running by default on port 8000):
-[http://localhost:8000](http://localhost:8000)
+### Install SDK cross-toolchain
+
+`xds-server` uses cross-toolchain install into directory pointed by `sdkRootDir` setting (see configuration section below for more details).
+For now, you need to install manually SDK cross toolchain. There are not embedded into docker image by default because the size of these tarballs is too big.
 
-Then follow instructions provided by dashboard, knowing that the first time you
-must to download and start `xds-agent` on your local machine using download icon
-in dashboard configuration page or download one of `xds-agent` [released tarball](https://github.com/iotbzh/xds-agent/releases).
+Use provided `install-agl-sdks` script, for example to install SDK for ARM64:
+
+```bash
+/usr/local/bin/xds-utils/install-agl-sdks.sh --aarch aarch64
+```
+
+### XDS Dashboard
+
+`xds-server` serves a web-application (default port 8000:
+[http://localhost:8000](http://localhost:8000) ). So you can now connect your browser to this url and use what we call the **XDS dashboard**.
+
+Then follow instructions provided by this dashboard, knowing that the first time
+you need to download and start `xds-agent` on your local 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.
@@ -107,7 +125,6 @@ higher to compile this tool.
 - Install [npm](https://www.npmjs.com/) : `sudo apt install npm`
 - Install [gulp](http://gulpjs.com/) : `sudo npm install -g gulp-cli`
 
-
 ### Building
 
 Clone this repo into your `$GOPATH/src/github.com/iotbzh` and use delivered Makefile:
@@ -140,7 +157,7 @@ Here is the logic to determine which `config.json` file will be used:
 4. `<xds-server executable dir>/config.json` file
 
 Supported fields in configuration file are (all fields are optional and listed values are the default values):
-```json
+```
 {
     "webAppDir": "webapp/dist",                     # location of client dashboard (default: webapp/dist)
     "shareRootDir": "${HOME}/.xds/projects",        # root directory where projects will be copied
@@ -157,7 +174,6 @@ Supported fields in configuration file are (all fields are optional and listed v
 
 >**NOTE:** environment variables are supported by using `${MY_VAR}` syntax.
 
-
 ## Start-up
 
 Use `xds-server-start.sh` script to start all requested tools