+++ /dev/null
-#
-# How to use this file
-# ====================
-#
-# Before moving forward the docker must be installed and your user
-# must be in docker group, for example for openSUSE do the following:
-#
-# sudo zypper in docker
-# sudo usermod -a -G docker $USER
-#
-# Note: to activate user group relogin might be required.
-#
-# Create a directory where the development setup be located.
-# Go to the directory and checkout pulpito, paddles, and teuthology.
-#
-# git clone https://github.com/ceph/paddles
-# git clone https://github.com/ceph/pulpito
-# git clone https://github.com/ceph/teuthology
-#
-# Note: use your own repos or branches.
-#
-# Go to teuthology, bootstrap virtual environment and install docker-composer.
-#
-# cd teuthology
-# ./bootstrap
-# . virtualenv/bin/activate
-# pip install docker-compose
-#
-# Make sure docker is running, build images for postgres, paddles, pulpito and beanstalk.
-#
-# sudo systemctl start docker
-# docker-compose build
-#
-# Run the services:
-#
-# docker-compose up
-#
-# Todo: add worker or/and dispatcher service
-
-version: "3.7"
-
-services:
- postgres:
- image: postgres
- ports:
- - "5432:5432"
- environment:
- POSTGRES_PASSWORD: secret
- POSTGRES_USER: paddles
- POSTGRES_DB: paddles
- PGDATA: /var/lib/postgresql/data/pgdata
- volumes:
- - $HOME/.teuthology/postgres:/var/lib/postgresql/data
- healthcheck:
- test: |
- psql -h localhost -U paddles -c 'SELECT 1=1' paddles
- timeout: 60s
- interval: 5s
- start_period: 10s
- paddles:
- build: ../paddles
- environment:
- PADDLES_SERVER_HOST: 0.0.0.0
- PADDLES_SQLALCHEMY_URL: postgresql+psycopg2://paddles:secret@postgres/paddles
- ports:
- - "8180:8080"
- depends_on:
- postgres:
- condition: service_healthy
- pulpito:
- build: ../pulpito
- environment:
- PULPITO_PADDLES_ADDRESS: http://paddles:8080
- ports:
- - "8081:8081"
- depends_on:
- - paddles
- beanstalk:
- build: beanstalk/alpine
- ports:
- - "11300:11300"
Additionally, there are two modes of execution:
* One-shot (the default): Containers start up, schedule and run the `teuthology:no-ceph` suite, and shut down. Success or failure is indicated by the `start.sh` exit code.
-* Wait: Containers start up, and `teuthology-dispatcher` is started, but no jobs are scheduled. Runs until the user presses Ctrl-C or `docker-compose down` is run.
+* Wait: Containers start up, and `teuthology-dispatcher` is started, but no jobs are scheduled. Runs until the user presses Ctrl-C or `docker compose down` is run.
The teuthology container will be built with code from the repository clone that's currently in use.
To schedule tests in wait mode:
```bash
docker exec docker-compose_teuthology_1 /venv/bin/teuthology-suite ...
-```
\ No newline at end of file
+```
if [ -z "$TEUTHOLOGY_WAIT" ]; then
DC_EXIT_FLAG='--abort-on-container-exit --exit-code-from teuthology'
- DC_AUTO_DOWN_CMD='docker-compose down'
+ DC_AUTO_DOWN_CMD='docker compose down'
fi
export TEUTHOLOGY_WAIT
-trap "docker-compose down" SIGINT
-docker-compose up \
+trap "docker compose down" SIGINT
+docker compose up \
--build \
$DC_EXIT_FLAG
$DC_AUTO_DOWN_CMD