From 984448af6ad345a52dec9ad1155c5b328ba4c9a7 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Tue, 25 Feb 2025 16:59:16 +0100 Subject: [PATCH] docs/laptop: replace workers with dispatcher Signed-off-by: Kyr Shatskyy --- docs/laptop/README.md | 54 ++++++++++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 19 deletions(-) diff --git a/docs/laptop/README.md b/docs/laptop/README.md index 1c0c3e335..c44a62b7b 100644 --- a/docs/laptop/README.md +++ b/docs/laptop/README.md @@ -58,7 +58,6 @@ docker run -d -p 5432:5432 --network paddles --name paddles-postgres \ -e POSTGRES_USER=paddles \ -e POSTGRES_DB=paddles \ -e PGDATA=/var/lib/postgresql/data/pgdata \ - -e PADDLES_JOB_LOG_HREF_TEMPL='http://localhost:8888/{run_name}/{job_id}/teuthology.log' \ -v $HOME/.teuthology/postgres:/var/lib/postgresql/data postgres ``` @@ -78,11 +77,15 @@ Run the container with previously created network: ```bash docker run -d --network paddles --name api -p 8080:8080 \ - -e PADDLES_SERVER_HOST=0.0.0.0 \ - -e PADDLES_SQLALCHEMY_URL=postgresql+psycopg2://paddles:secret@paddles-postgres/paddles \ - paddles + -e PADDLES_SERVER_HOST=0.0.0.0 \ + -e PADDLES_SQLALCHEMY_URL=postgresql+psycopg2://paddles:secret@paddles-postgres/paddles \ + -e PADDLES_JOB_LOG_HREF_TEMPL='http://localhost:8888/{run_name}/{job_id}/teuthology.log' \ + paddles ``` +Note: we provide job log href template here, so the logs can be referenced logs in archive share +correctly, for details see below in `Run dispatcher` section. + ### Run pulpito Checkout pulpito and build the image: @@ -337,7 +340,21 @@ For further usage nodes should be unlocked with `--unlock` option. ### Run beanstalkd -For openSUSE there is no beanstalkd package as for Ubuntu, so it is needed to add corresponding repo: +Build and run beanstalkd container. +```bash +cd teuthology/beanstalk/alpine && + podman build . --file Dockerfile --tag beanstalkd + +podman run -d --network paddles --name queue -p 11300:11300 beanstalkd +``` + + + +Alternatively, beanstalkd can be installed as a service. + +Note: +For openSUSE there is no beanstalkd package as for Ubuntu, so it is needed +to add corresponding repo: ```bash zypper addrepo https://download.opensuse.org/repositories/filesystems:/ceph:/teuthology/openSUSE_Leap_15.2/x86_64/ teuthology && zypper ref @@ -350,21 +367,26 @@ sudo zypper in beanstalkd sudo service beanstalkd start ``` -### Run worker +### Run dispatcher -Create archive and worker log directories and run the worker polling required tube. +Create and share archive directory. ```bash -TEUTH_HOME=$HOME/.teuthology -mkdir -p $TEUTH_HOME/www/logs/jobs -mkdir -p $TEUTH_HOME/www/logs/workers +mkdir -p ~/.teuthology/archive + +podman run --name archive -v $HOME/.teuthology/archive:/usr/local/apache2/htdocs/ -d -p 8888:80 httpd:2.4 +``` -teuthology-worker -v --tube vps --archive-dir $TEUTH_HOME/www/logs/jobs --log-dir $TEUTH_HOME/www/logs/workers +Run teuthology dispatcher against 'vps' machine type. + +```bash +mkdir -p ~/.teuthology/dispatcher +teuthology-dispatcher -v -a ~/.teuthology/archive -t vps -l ~/.teuthology/dispatcher ``` Schedule a dummy job: ```bash -teuthology-suite -v --ceph-repo https://github.com/ceph/ceph --suite-repo https://github.com/ceph/ceph --ceph octopus --suite dummy -d centos -D 8.2 --sha1 35adebe94e8b0a17e7b56379a8bf24e5f7b8ced4 --limit 1 -m vps -t refs/pull/1548/merge +teuthology-suite -v --ceph-repo https://github.com/ceph/ceph --suite-repo https://github.com/ceph/ceph --ceph main --suite dummy -d ubuntu --sha1 35adebe94e8b0a17e7b56379a8bf24e5f7b8ced4 --limit 1 -m vps -t refs/pull/2023/merge ``` ## Downburst @@ -401,13 +423,7 @@ sha512sum opensuse-tumbleweed-20200810-cloudimg-amd64.img | cut -d' ' -f1 > open run webserver localy: ```bash -(cd $TEUTH_HOME/www && python -m SimpleHTTPServer 8181) -``` - -or - -```bash -(cd $TEUTH_HOME/www && python3 -m http.server 8181) +podman run --name downburst-discovery -v $HOME/.teuthology/www:/usr/local/apache2/htdocs/ -d -p 8181:80 httpd:2.4 ``` ```bash -- 2.47.3