aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorRonan Le Martret <ronan.lemartret@iot.bzh>2018-01-04 17:49:21 +0100
committerRonan Le Martret <ronan.lemartret@iot.bzh>2018-01-04 17:49:21 +0100
commit814deb494598e26bc410e60e2a55a0b04f85c2bf (patch)
tree74e02572b31f7bdfa30e4f89c22105ac84aa7bff /docs
parent75b88569a0ff0c1bd0a62a00bf3916393296561e (diff)
Update Documentation for Virtual machine
Signed-off-by: Ronan Le Martret <ronan.lemartret@iot.bzh>
Diffstat (limited to 'docs')
-rw-r--r--docs/SUMMARY.md1
-rw-r--r--docs/part-1/1_install-client.md6
-rw-r--r--docs/part-1/2_install-xds-server.md70
-rw-r--r--docs/part-1/3_install-sdks.md2
-rw-r--r--docs/part-2/1_xds-server.md32
5 files changed, 89 insertions, 22 deletions
diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md
index cfebece..1d8e43b 100644
--- a/docs/SUMMARY.md
+++ b/docs/SUMMARY.md
@@ -15,4 +15,3 @@
* [xds-cli](part-2/3_xds-cli.md)
* [xds-gdb](part-2/4_xds-gdb.md)
* [xds-exec](part-2/5_xds-exec.md)
- \ No newline at end of file
diff --git a/docs/part-1/1_install-client.md b/docs/part-1/1_install-client.md
index a1c2a4e..7d0299f 100644
--- a/docs/part-1/1_install-client.md
+++ b/docs/part-1/1_install-client.md
@@ -4,7 +4,6 @@
on your machine (user / developer host) to be able to use XDS.
You should establish the following chain:
-
Client (eg. `xds-cli` or XDS Dashboard) and `xds-agent` is running on your machine
and `xds-server` is running on a remote server and/or in a container.
Exchanges between these 3 tools are done though HTTP and Websocket protocols
@@ -62,8 +61,9 @@ seb@laptop ~$ sudo zypper install agl-xds-gdb
1. Then unzip the tarball any where into your local disk (for example: `/opt/AGL/xds` or `C:\AGL\xds`).
1. Add binary to PATH:
- - MacOs: create the .bash_profile `nano .bash_profile` and add `export PATH="/opt/AGL/xds/xds-agent:$PATH`
- - Windows: change the system path via control panel or system settings or
+
+ - MacOs: create the .bash_profile `nano .bash_profile` and add `export PATH="/opt/AGL/xds/xds-agent:$PATH`
+ - Windows: change the system path via control panel or system settings or
`setx path "C:\AGK\xds\xds-agent;%path%"`
- repeat the previous steps to install other tools depending of your needs:
diff --git a/docs/part-1/2_install-xds-server.md b/docs/part-1/2_install-xds-server.md
index 5460da8..c992f35 100644
--- a/docs/part-1/2_install-xds-server.md
+++ b/docs/part-1/2_install-xds-server.md
@@ -103,9 +103,75 @@ Please refer to [part 2 - xds-server](../part-2/1_xds-server.md) documentation
for additional info.
<!-- endnote -->
-## Installation based on VirtualBox appliance
+## Installation based on Virtual Machine appliance
-_coming soon ..._
+### Prerequisites
+
+> VirtualBox is installed on the host machine
+
+please refer to [VirtualBox documentation](https://www.virtualbox.org/wiki/Downloads) for more details.
+
+### Get the appliance
+
+Load the pre-build AGL SDK appliance image including `xds-server`:
+
+```bash
+wget http://iot.bzh/download/public/XDS/appliance/xds-vm-debian9_latest.ova
+```
+
+### Clean old appliance
+
+You must have one and one xds appliance only.
+
+So, at first remove the oldest xds appliance.
+
+```bash
+#Get the virtual machine name
+VDS_VMNAME=$(VBoxManage list vms | grep xds-vm-debian | cut -d "\"" -f2)
+echo ${VDS_VMNAME}
+
+#Remove old XDS appliance
+[ -n ${VDS_VMNAME} ] && VBoxManage unregistervm ${VDS_VMNAME} --delete
+```
+
+### Create and start a new appliance
+
+Use provided script to create a new appliance or you can use the UI of VirtualBox:
+
+```bash
+# Import image into VirtualBox
+VBoxManage import ./xds-vm-debian9_latest.ova
+
+# Check import result
+VDS_VMNAME=$(VBoxManage list vms | grep xds-vm-debian | cut -d "\"" -f2)
+echo ${VDS_VMNAME}
+
+# Start XDS appliance
+[ -n ${VDS_VMNAME} ] && VBoxManage startvm ${VDS_VMNAME}
+```
+
+### Appliance settings
+
+This container (ID=0) exposes following ports:
+
+- 8000 : `xds-server` to serve XDS basic web page
+- 69 : TFTP
+- 2222 : ssh
+
+## Check if xds-server is running
+
+`xds-server` is automatically started as a service on container startup.
+
+To check if xds-server is correctly install and running, you can access the basic web page that gives you some instructions:
+
+```bash
+# if container/appliance is running on your local host
+# (else replace localhost by the name or the ip of the machine running the container)
+seb@laptop ~$ xdg-open http://localhost:8000
+```
+
+`xds-server` is now up and running, you can now install AGL SDKs, please refer
+to next chapter named [Installing AGL SDKs](3_install-sdks.md#installing-agl-sdks)
## Native installation
diff --git a/docs/part-1/3_install-sdks.md b/docs/part-1/3_install-sdks.md
index 3ea342e..e1cdd07 100644
--- a/docs/part-1/3_install-sdks.md
+++ b/docs/part-1/3_install-sdks.md
@@ -39,8 +39,10 @@ devel@docker ~$ sudo /opt/AGL/xds/server/xds-utils/install-agl-sdks.sh --arch co
<!-- warning -->
**Warning:** due to some limitation, you need for now to restart `xds-server` in
order to make new installed SDK visible/available.
+
```bash
seb@laptop ~$ ssh -p 2222 devel@localhost
devel@docker ~$ systemctl --user restart xds-server.service
```
+
<!-- endwarning -->
diff --git a/docs/part-2/1_xds-server.md b/docs/part-2/1_xds-server.md
index c3eb324..6ecbdc9 100644
--- a/docs/part-2/1_xds-server.md
+++ b/docs/part-2/1_xds-server.md
@@ -44,7 +44,7 @@ been integrated into AGL SDK docker container.
Load the pre-build AGL SDK docker image including `xds-server`:
```bash
-seb@laptop ~$ wget -O - 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
```
### List container
@@ -53,7 +53,7 @@ You should get `docker.automotivelinux.org/agl/worker-xds:X.Y` image
```bash
# List image that we just built
-seb@laptop ~$ docker images | grep worker-xds
+docker images | grep worker-xds
docker.automotivelinux.org/agl/worker-xds 3.99.1 786d65b2792c 6 days ago 602MB
```
@@ -64,13 +64,13 @@ Use provided script to create a new docker image and start a new container:
```bash
# Get script
-seb@laptop ~$ wget https://raw.githubusercontent.com/iotbzh/xds-server/master/scripts/xds-docker-create-container.sh
+wget https://raw.githubusercontent.com/iotbzh/xds-server/master/scripts/xds-docker-create-container.sh
# Create new XDS worker container
-seb@laptop ~$ bash ./xds-docker-create-container.sh
+bash ./xds-docker-create-container.sh
# Check that new container is running
-seb@laptop ~$ docker ps | grep worker-xds
+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
```
@@ -80,7 +80,7 @@ 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
+bash ./xds-docker-create-container.sh --volume /my-workspace:$HOME/my-workspace
```
This container (ID=0) exposes following ports:
@@ -103,23 +103,23 @@ 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
+export CONTAINER_NAME=agl-xds-seb@laptop-0-seb
# First kill all processes of devel user (including running xds-server)
-seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "/bin/loginctl kill-user devel"
+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"
-seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "groupmod -g $(id -g) devel"
+docker exec ${CONTAINER_NAME} bash -c "usermod -u $(id -u) devel"
+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*"
+docker exec ${CONTAINER_NAME} bash -c "chown -R devel:devel /home/devel /tmp/xds*"
# Restart devel autologin service
-seb@laptop ~$ docker exec ${CONTAINER_NAME} bash -c "systemctl start autologin"
+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"
+ssh -p 2222 devel@localhost -- "systemctl --user start xds-server"
```
## Check if xds-server is running (open XDS webapp)
@@ -130,14 +130,14 @@ If the container is running on your localhost, you can access to a basic web
application:
```bash
-seb@laptop ~$ xdg-open http://localhost:8000
+xdg-open http://localhost:8000
```
If needed you can status / stop / start it manually using following commands:
```bash
# Log into docker container
-seb@laptop ~$ ssh -p 2222 devel@localhost
+ssh -p 2222 devel@localhost
# Status XDS server:
devel@docker ~$ systemctl --user status xds-server.service
@@ -168,7 +168,7 @@ For example to control log level, just set LOG_LEVEL env variable knowing that
supported *level* are: panic, fatal, error, warn, info, debug.
```bash
-seb@laptop ~$ ssh -p 2222 devel@localhost
+ssh -p 2222 devel@localhost
devel@docker ~$ echo 'LOG_LEVEL=debug' | sudo tee --append /etc/default/xds-server > /dev/null
devel@docker ~$ systemctl --user restart xds-server.service
devel@docker ~$ tail -f /tmp/xds-server/logs/xds-server.log