monster:/home/dl9pf/Downloads # # Get script
monster:/home/dl9pf/Downloads # 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'--2018-12-1001:39:45-- https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-server.git;a=blob_plain;f=scripts/xds-docker-create-container.sh;hb=master
Auflösen des Hostnamens gerrit.automotivelinux.org (gerrit.automotivelinux.org)… 198.145.29.87Verbindungsaufbau zu gerrit.automotivelinux.org (gerrit.automotivelinux.org)|198.145.29.87|:443 … verbunden.HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge:7867(7,7K)[application/x-sh]Wird in »xds-docker-create-container.sh« gespeichert.xds-docker-create-container.sh 100%[======================================================================================================================>]7,68K --.-KB/s in 0s 2018-12-1001:39:46(1,55 GB/s)- »xds-docker-create-container.sh« gespeichert [7867/7867]monster:/home/dl9pf/Downloads #
monster:/home/dl9pf/Downloads # # Createnew XDS worker container (-id option value should be changed when you get port conflict error)monster:/home/dl9pf/Downloads # bash ./xds-docker-create-container.sh -id 1Using instance ID #1(user root)25db7260601652314e68c211a388d360ba826ecf4e1f7c053d1d6e3eef528b51
Copying your identity tocontainer agl-xds-monster-1-root
wait ssh service ..# Host[localhost]:2223 found: line 3/root/.ssh/known_hosts updated.Original contents retained as /root/.ssh/known_hosts.old
Warning:Permanently added '[localhost]:2223'(ECDSA)tothe list of known hosts.You can now login using: ssh -p 2223 devel@localhostSetup docker user and group id tomatch yours ..Cannot set docker devel user id toyour id: conflict id 0!Error detected, remove unusable docker image agl-xds-monster-1-root
As user:
monster:/home/dl9pf/Downloads # exit
dl9pf@monster:~/Downloads> bash ./xds-docker-create-container.sh -id 1
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.32/images/json?filters=%7B%22reference%22%3A%7B%22docker.automotivelinux.org%2Fagl%2Fworker-xds%22%3Atrue%7D%7D: dial unix /var/run/docker.sock: connect: permission denied
ERROR: cannot automatically retrieve image tag for docker.automotivelinux.org/agl/worker-xds
Usage: xds-docker-create-container.sh [-h|--help] [-fr] [-id <instance container ID>]
[-nc] [-nuu] [-v|--volume <inpath:outpath>] [image name]
Image name is optional; 'docker images' is used by default to get image
Default image:
docker.automotivelinux.org/agl/worker-xds:4.0Options:
-fr | --force-restart Force restart of xds-server service
-id Instance ID used to build container name, a positive integer (0,1,2,...)
-nuu | --no-uid-update Don't update user/group id within docker
-v | --volume Additional docker volume to bind, syntax is -v /InDockerPath:/HostPath
Environment
openSUSE 15.0
dl9pf@monster:~/Downloads> docker --version
Docker version 17.09.1-ce, build f4ffd2511ce9
Activity
Show:
Sebastien Douheret
December 18, 2018 at 5:25 PM
Thanks your analyse and comments are correct. I will integrate them in xds docs.
Jan-Simon Moeller
December 10, 2018 at 1:02 AM
We need a note that changing the ID requires changing the setup of the agent then as well.
Jan-Simon Moeller
December 10, 2018 at 1:01 AM
Now we can connect to 8001 (b/c of -id 1) . But XDS-agent link is 8800 and it expects to talk to port 8000.
Jan-Simon Moeller
December 10, 2018 at 12:50 AM
The user in question needs to be part of the docker group. We should have them call
groups | grep docker to verify.
With this adjusted - as user:
> bash scripts_xds-docker-create-container.sh -id 1
Using instance ID #1 (user dl9pf)
763f74a7dcd08657222253eaca452f83fa99ea32821c66631463bc24cc7da4a4
Copying your identity to container agl-xds-monster-1-dl9pf
wait ssh service ..
Host [localhost]:2223 not found in /home/dl9pf/.ssh/known_hosts
Warning: Permanently added '[localhost]:2223' (ECDSA) to the list of known hosts.
You can now login using:
ssh -p 2223 devel@localhost
Setup docker user and group id to match yours . .......
agl-xds-monster-1-dl9pf
Done, docker container agl-xds-monster-1-dl9pf is ready to be used.
As user 'dl9pf'
> cat docker_agl_worker-xds-latest.tar.xz | docker load Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.32/images/load?quiet=0: dial unix /var/run/docker.sock: connect: permission denied
As root:
# cat docker_agl_worker-xds-latest.tar.xz | docker load f715ed19c28b: Loading layer [==================================================>] 105.5MB/105.5MB 6a5b175b54a6: Loading layer [==================================================>] 1.551MB/1.551MB 9f296ef42589: Loading layer [==================================================>] 584.3MB/584.3MB Loaded image: docker.automotivelinux.org/agl/worker-xds:6.90.0
ok, next:
monster:/home/dl9pf/Downloads # # Get script monster:/home/dl9pf/Downloads # 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' --2018-12-10 01:39:45-- https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/xds/xds-server.git;a=blob_plain;f=scripts/xds-docker-create-container.sh;hb=master Auflösen des Hostnamens gerrit.automotivelinux.org (gerrit.automotivelinux.org)… 198.145.29.87 Verbindungsaufbau zu gerrit.automotivelinux.org (gerrit.automotivelinux.org)|198.145.29.87|:443 … verbunden. HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK Länge: 7867 (7,7K) [application/x-sh] Wird in »xds-docker-create-container.sh« gespeichert.xds-docker-create-container.sh 100%[======================================================================================================================>] 7,68K --.-KB/s in 0s 2018-12-10 01:39:46 (1,55 GB/s) - »xds-docker-create-container.sh« gespeichert [7867/7867]monster:/home/dl9pf/Downloads # monster:/home/dl9pf/Downloads # # Create new XDS worker container (-id option value should be changed when you get port conflict error) monster:/home/dl9pf/Downloads # bash ./xds-docker-create-container.sh -id 1 Using instance ID #1 (user root) 25db7260601652314e68c211a388d360ba826ecf4e1f7c053d1d6e3eef528b51 Copying your identity to container agl-xds-monster-1-root wait ssh service .. # Host [localhost]:2223 found: line 3 /root/.ssh/known_hosts updated. Original contents retained as /root/.ssh/known_hosts.old Warning: Permanently added '[localhost]:2223' (ECDSA) to the list of known hosts. You can now login using: ssh -p 2223 devel@localhost Setup docker user and group id to match yours . .Cannot set docker devel user id to your id: conflict id 0 ! Error detected, remove unusable docker image agl-xds-monster-1-root
As user:
monster:/home/dl9pf/Downloads # exit dl9pf@monster:~/Downloads> bash ./xds-docker-create-container.sh -id 1 Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.32/images/json?filters=%7B%22reference%22%3A%7B%22docker.automotivelinux.org%2Fagl%2Fworker-xds%22%3Atrue%7D%7D: dial unix /var/run/docker.sock: connect: permission denied ERROR: cannot automatically retrieve image tag for docker.automotivelinux.org/agl/worker-xds Usage: xds-docker-create-container.sh [-h|--help] [-fr] [-id <instance container ID>] [-nc] [-nuu] [-v|--volume <inpath:outpath>] [image name] Image name is optional; 'docker images' is used by default to get image Default image: docker.automotivelinux.org/agl/worker-xds:4.0Options: -fr | --force-restart Force restart of xds-server service -id Instance ID used to build container name, a positive integer (0,1,2,...) -nuu | --no-uid-update Don't update user/group id within docker -v | --volume Additional docker volume to bind, syntax is -v /InDockerPath:/HostPath