aboutsummaryrefslogtreecommitdiffstats
path: root/docs/part-2
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-18 17:35:38 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-10-18 17:35:44 +0200
commit32dcf3f8430a5e9bb913834d43738c495376ba8f (patch)
tree28e5602034a562336b92a660dd64ff0b3f7a28fd /docs/part-2
parent92b5cf7ed66c1dbec7a5d0c5f1ef5f0c35a0e5dc (diff)
Various updates to reflect current XDS state.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'docs/part-2')
-rw-r--r--docs/part-2/1_xds-server.md34
-rw-r--r--docs/part-2/2_xds-agent.md9
-rw-r--r--docs/part-2/3_xds-exec.md2
3 files changed, 30 insertions, 15 deletions
diff --git a/docs/part-2/1_xds-server.md b/docs/part-2/1_xds-server.md
index c4f00b3..ee5df5e 100644
--- a/docs/part-2/1_xds-server.md
+++ b/docs/part-2/1_xds-server.md
@@ -65,6 +65,14 @@ seb@laptop ~$ docker ps | grep worker-xds
b985d81af40c docker.automotivelinux.org/agl/worker-xds:3.99.1 "/usr/bin/wait_for..." 6 days ago Up 4 hours 0.0.0.0:8000->8000/tcp, 0.0.0.0:69->69/udp, 0.0.0.0:10809->10809/tcp, 0.0.0.0:2222->22/tcp agl-xds-seb@laptop-0-seb
```
+Note that you can also add a new shared directory using `--volume` option in order
+to use for example with Path-Mapping folder type.
+
+```bash
+# Create new XDS worker container and share extra '$HOME/my-workspace' directory
+seb@laptop ~$ bash ./xds-docker-create-container.sh --volume /my-workspace:$HOME/my-workspace
+```
+
This container (ID=0) exposes following ports:
- 8000 : `xds-server` to serve XDS Dashboard
@@ -73,14 +81,19 @@ This container (ID=0) exposes following ports:
#### 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.
+<!-- 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:
```bash
# Set docker container name to use (usually agl-xds-xxx where xxx is USERNAME@MACHINENAME-IDX-NAME)
seb@laptop ~$ export CONTAINER_NAME=agl-xds-seb@laptop-0-seb
-# First stop xds-server
-seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "systemctl stop xds-server"
+# First kill all processes of devel user (including running xds-server)
+seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "/bin/loginctl kill-user devel"
# Change user and group id inside docker to match your ids
seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "usermod -u $(id -u) devel"
@@ -89,8 +102,11 @@ seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "groupmod -g $(id -g) devel"
# Update some files ownership
seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "chown -R devel:devel /home/devel /tmp/xds*"
-# Restart xds-server
-seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "systemctl start xds-server"
+# Restart devel autologin service
+seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "systemctl start autologin"
+
+# Restart xds-server as a service (ssh port 2222 may depend on your container ID)
+seb@laptop ~$ ssh -p 2222 devel@localhost -- "systemctl --user start xds-server"
```
## Check if xds-server is running (open XDS Dashboard)
@@ -110,16 +126,16 @@ If needed you can status / stop / start it manually using following commands:
seb@laptop ~$ ssh -p 2222 devel@localhost
# Status XDS server:
-devel@docker ~$ sudo systemctl status xds-server.service
+devel@docker ~$ systemctl --user status xds-server.service
# Stop XDS server
-devel@docker ~$ sudo systemctl stop xds-server.service
+devel@docker ~$ systemctl --user stop xds-server.service
# Start XDS server
-devel@docker ~$ sudo systemctl start xds-server.service
+devel@docker ~$ systemctl --user start xds-server.service
# Get XDS server logs
-devel@docker ~$ sudo journalctl --unit=xds-server.service --output=cat
+devel@docker ~$ journalctl --user --unit=xds-server.service --output=cat
```
### Manually Start XDS server
@@ -140,7 +156,7 @@ supported *level* are: panic, fatal, error, warn, info, debug.
```bash
seb@laptop ~$ ssh -p 2222 devel@localhost
devel@docker ~$ echo 'LOG_LEVEL=debug' | sudo tee --append /etc/default/xds-server > /dev/null
-devel@docker ~$ sudo systemctl restart xds-server.service
+devel@docker ~$ systemctl --user restart xds-server.service
devel@docker ~$ tail -f /tmp/xds-server/logs/xds-server.log
```
diff --git a/docs/part-2/2_xds-agent.md b/docs/part-2/2_xds-agent.md
index 55943fc..0ece136 100644
--- a/docs/part-2/2_xds-agent.md
+++ b/docs/part-2/2_xds-agent.md
@@ -11,15 +11,14 @@ used to remotely cross build applications.
## Configuration
-xds-agent configuration is driven by a JSON config file (named `agent-config.json`).
+xds-agent configuration is driven by a JSON config file.
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:
+Here is the logic to determine which conf file will be used:
1. from command line option: `--config myConfig.json`
1. `$HOME/.xds/agent/agent-config.json` file
-1. `/etc/xds-agent/agent-config.json` file
-1. `<xds-agent executable dir>/agent-config.json` file
+1. `/etc/xds-agent/config.json` file
Supported fields in configuration file are (all fields are optional and example
below corresponds to the default values):
@@ -29,7 +28,7 @@ below corresponds to the default values):
- **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-address** : syncthing gui url (default <http://localhost:8386>)
- **syncthing.gui-apikey** : syncthing api-key to use (default auto-generated)
```json
diff --git a/docs/part-2/3_xds-exec.md b/docs/part-2/3_xds-exec.md
index 504cf01..0c63ff3 100644
--- a/docs/part-2/3_xds-exec.md
+++ b/docs/part-2/3_xds-exec.md
@@ -19,7 +19,7 @@ will be sourced on `xds-exec` start-up. Use `--config|-c` option or set
`XDS_CONFIG` environment variable to specify the config filename.
So configuration is driven either by environment variables or by command line
-options or using a config file knowning that the following priority order is used:
+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,