From f260390246214949fbedde723c4349283189823d Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Thu, 4 Oct 2018 11:57:13 +0200 Subject: Invert order of installation chapters To make install process more understandable, document first installation of xds-server part and then installation of xds tools. Change-Id: I5733c5d6885f45ff98cc9fee0d04362f76a86a4c Signed-off-by: Sebastien Douheret --- docs/SUMMARY.md | 10 +- docs/part-1/1-1_install-xds-server-docker.md | 152 +++++++++++++++++++++++++++ docs/part-1/1-2_install-xds-server-vm.md | 84 +++++++++++++++ docs/part-1/1-3_install-xds-server-native.md | 86 +++++++++++++++ docs/part-1/1_install-client.md | 113 -------------------- docs/part-1/1_install-xds-server.md | 18 ++++ docs/part-1/2-1_install-xds-server-docker.md | 152 --------------------------- docs/part-1/2-2_install-xds-server-vm.md | 84 --------------- docs/part-1/2-3_install-xds-server-native.md | 86 --------------- docs/part-1/2_install-client.md | 113 ++++++++++++++++++++ docs/part-1/2_install-xds-server.md | 18 ---- docs/part-1/4-3_build-first-app-dashboard.md | 2 +- docs/part-2/1_xds-server/2_how-to-run.md | 8 +- 13 files changed, 463 insertions(+), 463 deletions(-) create mode 100644 docs/part-1/1-1_install-xds-server-docker.md create mode 100644 docs/part-1/1-2_install-xds-server-vm.md create mode 100644 docs/part-1/1-3_install-xds-server-native.md delete mode 100644 docs/part-1/1_install-client.md create mode 100644 docs/part-1/1_install-xds-server.md delete mode 100644 docs/part-1/2-1_install-xds-server-docker.md delete mode 100644 docs/part-1/2-2_install-xds-server-vm.md delete mode 100644 docs/part-1/2-3_install-xds-server-native.md create mode 100644 docs/part-1/2_install-client.md delete mode 100644 docs/part-1/2_install-xds-server.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index ffa286f..670e293 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -3,11 +3,11 @@ * [Document revisions](0-Doc-Revisions.md) * [Part 1 - Getting Started for Users](part-1/0_Abstract.md) - * [Installing xds client tools](part-1/1_install-client.md) - * [Installing xds-server](part-1/2_install-xds-server.md) - * [Based on Docker container](part-1/2-1_install-xds-server-docker.md) - * [Based on Virtual Machine appliance](part-1/2-2_install-xds-server-vm.md) - * [Native installation](part-1/2-3_install-xds-server-native.md) + * [Installing xds-server](part-1/1_install-xds-server.md) + * [Based on Docker container](part-1/1-1_install-xds-server-docker.md) + * [Based on Virtual Machine appliance](part-1/1-2_install-xds-server-vm.md) + * [Native installation](part-1/1-3_install-xds-server-native.md) + * [Installing xds client tools](part-1/2_install-client.md) * [Installing AGL SDKs](part-1/3_install-sdks.md) * [Create your first AGL application](part-1/4_build-first-app.md) * [Setup](part-1/4-1_build-first-app-setup.md) diff --git a/docs/part-1/1-1_install-xds-server-docker.md b/docs/part-1/1-1_install-xds-server-docker.md new file mode 100644 index 0000000..37e1fba --- /dev/null +++ b/docs/part-1/1-1_install-xds-server-docker.md @@ -0,0 +1,152 @@ +# Installation based on Docker container + +## Docker container prerequisites + +Docker is installed on the host machine, please refer to [Docker documentation](https://docs.docker.com/engine/installation/) for more details. + +## Get the container + +Load the pre-build AGL SDK docker image including `xds-server`: + +```bash +wget -O - http://iot.bzh/download/public/XDS/docker/docker_agl_worker-xds-latest.tar.xz | docker load +``` + +You should get `docker.automotivelinux.org/agl/worker-xds:X.Y` image + +```bash +# List image that we just load +docker images "docker.automotivelinux.org/agl/worker-xds*" + +REPOSITORY TAG IMAGE ID CREATED SIZE +docker.automotivelinux.org/agl/worker-xds 5.0 877979e534ff 3 hours ago 106MB +``` + +## Create and start a new container + +Use provided script to create a new docker image and start a new container: + +```bash +# Get script +wget -O xds-docker-create-container.sh 'https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-server.git;a=blob_plain;f=scripts/xds-docker-create-container.sh;hb=master' + +# Create new XDS worker container +bash ./xds-docker-create-container.sh + +# Check that new container is running +docker ps | grep worker-xds +f67079db4339 docker.automotivelinux.org/agl/worker-xds:5.0 "/usr/bin/wait_for..." About a minute ago Up 34 seconds 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-HOSTNAME-0-USERNAME +``` + +This container exposes following ports: + +| Port number | Description | +|-------------|---------------------------------------------| +| 8000 | `xds-server`: serve XDS webapp and REST API | +| 69 | TFTP | +| 2222 | ssh | + +This container also creates the following volumes (shared folders between +inside and outside docker): + +| Directory on host | Directory inside docker | Comment | +|-------------------|-------------------------|---------| +| $HOME/xds-workspace | /home/devel/xds-workspace | XDS projects workspace location| +| $HOME/xds-workspace/.xdt_0 | /xdt | location to store SDKs | +| $USER_VOLUME | $USER_VOLUME | user path, see `--volume` option of `xds-docker-create-container.sh` script | + + +**Note:** + +You can 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 +bash ./xds-docker-create-container.sh --volume /my-workspace:$HOME/my-workspace +``` + +You can change docker used port with `-id` option + +```bash +# Create new XDS worker container with a different port number +bash ./xds-docker-create-container.sh -id ${ID} + +# Check that new container is running +docker ps | grep worker-xds +f67079db4339 docker.automotivelinux.org/agl/worker-xds:5.0 "/usr/bin/wait_for..." About a minute ago Up 34 seconds 0.0.0.0:(2222+ID)->22/tcp, 0.0.0.0:(69+ID)->69/udp, 0.0.0.0:(8000+ID)->8000/tcp, 0.0.0.0:(10809+ID)->10809/tcp agl-xds-HOSTNAME-ID-USERNAME +``` + + + +### Manually setup docker user id + + +**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. + + +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) +export CONTAINER_NAME=agl-xds-seb@laptop-0-seb +docker ps | grep -q ${CONTAINER_NAME} || echo "ERROR: No container name \"${CONTAINER_NAME}\" please set a valid CONTAINER_NAME before you continue" + +# First kill all processes of devel user (including running xds-server) +docker exec ${CONTAINER_NAME} bash -c "/bin/loginctl kill-user devel" + +# Change user and group id inside docker to match your ids +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 +docker exec ${CONTAINER_NAME} bash -c "chown -R devel:devel /home/devel /tmp/xds*" + +# Restart devel autologin service +docker exec ${CONTAINER_NAME} bash -c "systemctl restart autologin" + +# Restart xds-server as a service (ssh port 2222 may depend on your container ID) +ssh -p 2222 devel@localhost -- "systemctl --user restart xds-server" +``` + +## Check if xds-server is running (open XDS webapp) + +**`xds-server` is automatically started** as a user service on container startup. + +If the container is running on your localhost, you can access to a basic web +application: + +```bash +xdg-open http://localhost:8000 +``` + +If needed you can status / stop / start it manually using following commands: + +```bash +# Status XDS server: +ssh -p 2222 devel@localhost systemctl --user status xds-server.service + +# Stop XDS server +ssh -p 2222 devel@localhost systemctl --user stop xds-server.service + +# Start XDS server +ssh -p 2222 devel@localhost systemctl --user start xds-server.service + +# Get XDS server logs +ssh -p 2222 devel@localhost journalctl --user --unit=xds-server.service --output=cat +``` + +`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.html) + + +Please refer to [xds-server configuration](../part-2/1_xds-server/1_config.html) chapter for additional info about xds-server settings. + diff --git a/docs/part-1/1-2_install-xds-server-vm.md b/docs/part-1/1-2_install-xds-server-vm.md new file mode 100644 index 0000000..32a8c20 --- /dev/null +++ b/docs/part-1/1-2_install-xds-server-vm.md @@ -0,0 +1,84 @@ +# Installation based on Virtual Machine appliance + +## Virtual Machine appliance 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, first remove the oldest xds appliance if needed. + +```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 controlvm ${VDS_VMNAME} poweroff +[ -n ${VDS_VMNAME} ] && VBoxManage unregistervm ${VDS_VMNAME} --delete +``` + +## Create and start a new appliance + +Used provided script to create a new appliance or you can use VirtualBox GUI: + +```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} +``` + +Add share folder to appliance, **mandatory** to use **path-mapping sharing type for projects**: + +```bash +# Create local share folder +mkdir -p $HOME/xds-workspace + +#Add share folder to appliance +vboxmanage sharedfolder add ${VDS_VMNAME} --name XDS-workspace --hostpath $HOME/xds-workspace +``` + +Start appliance + +```bash +# Start XDS appliance +[ -n ${VDS_VMNAME} ] && VBoxManage startvm ${VDS_VMNAME} +``` + +## Appliance settings + +This image exposes following network ports (NAT mode): + +- 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) +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.html) diff --git a/docs/part-1/1-3_install-xds-server-native.md b/docs/part-1/1-3_install-xds-server-native.md new file mode 100644 index 0000000..77ef9f8 --- /dev/null +++ b/docs/part-1/1-3_install-xds-server-native.md @@ -0,0 +1,86 @@ +# Native installation + +You can chose to install xds-server 'natively' instead of within a docker +container but note that only Linux host OSes are supported and tested for native +installation ! + +You also need to install `python3` to allow `xds-server` to manage AGL sdks. + +## Install packages for debian distro type + +```bash +# 'DISTRO' can be set to { xUbuntu_16.04, xUbuntu_16.10, xUbuntu_17.04, Debian_8.0, Debian_9.0} +export DISTRO="xUbuntu_16.04" + +# AGL_RELEASE can be set to {AGL_ElectricEel, AGL_FunkyFlounder, AGL_Master} +export AGL_RELEASE="AGL_Master" + +wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${AGL_RELEASE}/${DISTRO}/Release.key | sudo apt-key add - +sudo bash -c "cat >> /etc/apt/sources.list.d/AGL.list < +**Optional step**: skip this chapter if you plan to use default settings + + +Please refer to [Configuration chapter of xds-server](../part-2/1_xds-server/1_config.html) +documentation for more details about JSON configuration file. + +## Start/Stop xds-server + +`xds-server` can be managed as a systemd service with the following commands: + +```bash +# Status XDS server: +systemctl --user status xds-server.service + +# Stop XDS server +systemctl --user stop xds-server.service + +# Start XDS server +systemctl --user start xds-server.service + +# Get XDS server logs +systemctl --user --unit=xds-server.service --output=cat +``` + +To check if xds-server is correctly install and running, you can access the web +interface, using a web browser : + +```bash +xdg-open http://localhost:8000 +``` + +or get the current version using the following curl command: + +```bash +curl http://localhost:8000/api/v1/version +``` diff --git a/docs/part-1/1_install-client.md b/docs/part-1/1_install-client.md deleted file mode 100644 index 44906c0..0000000 --- a/docs/part-1/1_install-client.md +++ /dev/null @@ -1,113 +0,0 @@ -# Installing XDS client tools - -[xds-agent](https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-agent.git) is a client tool that must run -on your machine (user / developer host) to be able to use XDS. - -You should establish the following chain: - -- XDS Client: (`xds-cli` or XDS Dashboard). -- XDS Agent: (`xds-agent`) running on your machine. -- XDS Server (`xds-server`) running on a remote server and/or in a container. - -Exchanges between these 3 tools are done though HTTP and Websocket protocols. - -Default url/port mentioned in schema below can be change using config files. - -![XDS blocks chain](./pictures/xds-block-chain.png) - -Installation of other XDS client tools, such as `xds-cli` or `xds-gdb` is -optional and depends of what you want to do: - -- [xds-cli](https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-cli.git) : command line tool to used to interact with XDS (also used by IDE integration). -- [xds-gdb](https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-gdb.git) : requested for debugging application. - -## Install packages for debian distro type - -```bash -# 'DISTRO' can be set to { xUbuntu_16.04, xUbuntu_16.10, xUbuntu_17.04, Debian_8.0, Debian_9.0 } -export DISTRO="xUbuntu_16.04" - -# AGL_RELEASE can be set to {AGL_ElectricEel, AGL_FunkyFlounder, AGL_Master} -export AGL_RELEASE="AGL_Master" - -wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${AGL_RELEASE}/${DISTRO}/Release.key | sudo apt-key add - -sudo bash -c "cat >> /etc/apt/sources.list.d/AGL.list <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-HOSTNAME-0-USERNAME -``` - -This container exposes following ports: - -| Port number | Description | -|-------------|---------------------------------------------| -| 8000 | `xds-server`: serve XDS webapp and REST API | -| 69 | TFTP | -| 2222 | ssh | - -This container also creates the following volumes (shared folders between -inside and outside docker): - -| Directory on host | Directory inside docker | Comment | -|-------------------|-------------------------|---------| -| $HOME/xds-workspace | /home/devel/xds-workspace | XDS projects workspace location| -| $HOME/xds-workspace/.xdt_0 | /xdt | location to store SDKs | -| $USER_VOLUME | $USER_VOLUME | user path, see `--volume` option of `xds-docker-create-container.sh` script | - - -**Note:** - -You can 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 -bash ./xds-docker-create-container.sh --volume /my-workspace:$HOME/my-workspace -``` - -You can change docker used port with `-id` option - -```bash -# Create new XDS worker container with a different port number -bash ./xds-docker-create-container.sh -id ${ID} - -# Check that new container is running -docker ps | grep worker-xds -f67079db4339 docker.automotivelinux.org/agl/worker-xds:5.0 "/usr/bin/wait_for..." About a minute ago Up 34 seconds 0.0.0.0:(2222+ID)->22/tcp, 0.0.0.0:(69+ID)->69/udp, 0.0.0.0:(8000+ID)->8000/tcp, 0.0.0.0:(10809+ID)->10809/tcp agl-xds-HOSTNAME-ID-USERNAME -``` - - - -### Manually setup docker user id - - -**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. - - -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) -export CONTAINER_NAME=agl-xds-seb@laptop-0-seb -docker ps | grep -q ${CONTAINER_NAME} || echo "ERROR: No container name \"${CONTAINER_NAME}\" please set a valid CONTAINER_NAME before you continue" - -# First kill all processes of devel user (including running xds-server) -docker exec ${CONTAINER_NAME} bash -c "/bin/loginctl kill-user devel" - -# Change user and group id inside docker to match your ids -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 -docker exec ${CONTAINER_NAME} bash -c "chown -R devel:devel /home/devel /tmp/xds*" - -# Restart devel autologin service -docker exec ${CONTAINER_NAME} bash -c "systemctl restart autologin" - -# Restart xds-server as a service (ssh port 2222 may depend on your container ID) -ssh -p 2222 devel@localhost -- "systemctl --user restart xds-server" -``` - -## Check if xds-server is running (open XDS webapp) - -**`xds-server` is automatically started** as a user service on container startup. - -If the container is running on your localhost, you can access to a basic web -application: - -```bash -xdg-open http://localhost:8000 -``` - -If needed you can status / stop / start it manually using following commands: - -```bash -# Status XDS server: -ssh -p 2222 devel@localhost systemctl --user status xds-server.service - -# Stop XDS server -ssh -p 2222 devel@localhost systemctl --user stop xds-server.service - -# Start XDS server -ssh -p 2222 devel@localhost systemctl --user start xds-server.service - -# Get XDS server logs -ssh -p 2222 devel@localhost journalctl --user --unit=xds-server.service --output=cat -``` - -`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.html) - - -Please refer to [xds-server configuration](../part-2/1_xds-server/1_config.html) chapter for additional info about xds-server settings. - diff --git a/docs/part-1/2-2_install-xds-server-vm.md b/docs/part-1/2-2_install-xds-server-vm.md deleted file mode 100644 index 32a8c20..0000000 --- a/docs/part-1/2-2_install-xds-server-vm.md +++ /dev/null @@ -1,84 +0,0 @@ -# Installation based on Virtual Machine appliance - -## Virtual Machine appliance 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, first remove the oldest xds appliance if needed. - -```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 controlvm ${VDS_VMNAME} poweroff -[ -n ${VDS_VMNAME} ] && VBoxManage unregistervm ${VDS_VMNAME} --delete -``` - -## Create and start a new appliance - -Used provided script to create a new appliance or you can use VirtualBox GUI: - -```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} -``` - -Add share folder to appliance, **mandatory** to use **path-mapping sharing type for projects**: - -```bash -# Create local share folder -mkdir -p $HOME/xds-workspace - -#Add share folder to appliance -vboxmanage sharedfolder add ${VDS_VMNAME} --name XDS-workspace --hostpath $HOME/xds-workspace -``` - -Start appliance - -```bash -# Start XDS appliance -[ -n ${VDS_VMNAME} ] && VBoxManage startvm ${VDS_VMNAME} -``` - -## Appliance settings - -This image exposes following network ports (NAT mode): - -- 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) -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.html) diff --git a/docs/part-1/2-3_install-xds-server-native.md b/docs/part-1/2-3_install-xds-server-native.md deleted file mode 100644 index 77ef9f8..0000000 --- a/docs/part-1/2-3_install-xds-server-native.md +++ /dev/null @@ -1,86 +0,0 @@ -# Native installation - -You can chose to install xds-server 'natively' instead of within a docker -container but note that only Linux host OSes are supported and tested for native -installation ! - -You also need to install `python3` to allow `xds-server` to manage AGL sdks. - -## Install packages for debian distro type - -```bash -# 'DISTRO' can be set to { xUbuntu_16.04, xUbuntu_16.10, xUbuntu_17.04, Debian_8.0, Debian_9.0} -export DISTRO="xUbuntu_16.04" - -# AGL_RELEASE can be set to {AGL_ElectricEel, AGL_FunkyFlounder, AGL_Master} -export AGL_RELEASE="AGL_Master" - -wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${AGL_RELEASE}/${DISTRO}/Release.key | sudo apt-key add - -sudo bash -c "cat >> /etc/apt/sources.list.d/AGL.list < -**Optional step**: skip this chapter if you plan to use default settings - - -Please refer to [Configuration chapter of xds-server](../part-2/1_xds-server/1_config.html) -documentation for more details about JSON configuration file. - -## Start/Stop xds-server - -`xds-server` can be managed as a systemd service with the following commands: - -```bash -# Status XDS server: -systemctl --user status xds-server.service - -# Stop XDS server -systemctl --user stop xds-server.service - -# Start XDS server -systemctl --user start xds-server.service - -# Get XDS server logs -systemctl --user --unit=xds-server.service --output=cat -``` - -To check if xds-server is correctly install and running, you can access the web -interface, using a web browser : - -```bash -xdg-open http://localhost:8000 -``` - -or get the current version using the following curl command: - -```bash -curl http://localhost:8000/api/v1/version -``` diff --git a/docs/part-1/2_install-client.md b/docs/part-1/2_install-client.md new file mode 100644 index 0000000..44906c0 --- /dev/null +++ b/docs/part-1/2_install-client.md @@ -0,0 +1,113 @@ +# Installing XDS client tools + +[xds-agent](https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-agent.git) is a client tool that must run +on your machine (user / developer host) to be able to use XDS. + +You should establish the following chain: + +- XDS Client: (`xds-cli` or XDS Dashboard). +- XDS Agent: (`xds-agent`) running on your machine. +- XDS Server (`xds-server`) running on a remote server and/or in a container. + +Exchanges between these 3 tools are done though HTTP and Websocket protocols. + +Default url/port mentioned in schema below can be change using config files. + +![XDS blocks chain](./pictures/xds-block-chain.png) + +Installation of other XDS client tools, such as `xds-cli` or `xds-gdb` is +optional and depends of what you want to do: + +- [xds-cli](https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-cli.git) : command line tool to used to interact with XDS (also used by IDE integration). +- [xds-gdb](https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-gdb.git) : requested for debugging application. + +## Install packages for debian distro type + +```bash +# 'DISTRO' can be set to { xUbuntu_16.04, xUbuntu_16.10, xUbuntu_17.04, Debian_8.0, Debian_9.0 } +export DISTRO="xUbuntu_16.04" + +# AGL_RELEASE can be set to {AGL_ElectricEel, AGL_FunkyFlounder, AGL_Master} +export AGL_RELEASE="AGL_Master" + +wget -O - http://download.opensuse.org/repositories/isv:/LinuxAutomotive:/${AGL_RELEASE}/${DISTRO}/Release.key | sudo apt-key add - +sudo bash -c "cat >> /etc/apt/sources.list.d/AGL.list < host OS | Start-up | Install instructions | |-------------------|-------------------------|---------------------------------------------------|----------------------| -| Docker container | Linux or MacOS | Automatic based on systemd user service | [see Installation based on Docker container](../../part-1/2-1_install-xds-server-docker.html) | -| Virtual Machine | Linux, MacOS or Windows | Automatic based on systemd user service | [see Installation based on VirtualBox appliance](../../part-1/2-2_install-xds-server-vm.html) | -| Native | Linux | Automatic based on systemd user service or manual | [see Native installation](../../part-1/2-3_install-xds-server-native.html) | -| Native | MacOS or Windows | Manually | [see Native installation](../../part-1/2-3_install-xds-server-native.html) | +| Docker container | Linux or MacOS | Automatic based on systemd user service | [see Installation based on Docker container](../../part-1/1-1_install-xds-server-docker.html) | +| Virtual Machine | Linux, MacOS or Windows | Automatic based on systemd user service | [see Installation based on VirtualBox appliance](../../part-1/1-2_install-xds-server-vm.html) | +| Native | Linux | Automatic based on systemd user service or manual | [see Native installation](../../part-1/1-3_install-xds-server-native.html) | +| Native | MacOS or Windows | Manually | [see Native installation](../../part-1/1-3_install-xds-server-native.html) | ### Automatic start-up based on systemd user service -- cgit 1.2.3-korg