Skip to content

Commit

Permalink
docs/laptop: replace workers with dispatcher
Browse files Browse the repository at this point in the history
Signed-off-by: Kyr Shatskyy <[email protected]>
  • Loading branch information
kshtsk committed Feb 25, 2025
1 parent 62c9c10 commit 984448a
Showing 1 changed file with 35 additions and 19 deletions.
54 changes: 35 additions & 19 deletions docs/laptop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 984448a

Please sign in to comment.