From 0289499f73515c6e4d0d817b17459d81f6ba3b24 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 2 Aug 2024 11:00:42 -0600 Subject: [PATCH] Migrate to docker compose v2 https://github.com/actions/runner-images/issues/9692 https://docs.docker.com/compose/migrate/ Signed-off-by: Zack Cerza --- .github/workflows/integration.yml | 2 +- docker-compose.yml | 81 ------------------------------- docs/docker-compose/README.md | 4 +- docs/docker-compose/start.sh | 6 +-- 4 files changed, 6 insertions(+), 87 deletions(-) delete mode 100644 docker-compose.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 69a55b8773..2261d62c9d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v2 - name: Test using docker-compose diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index ca57986cb2..0000000000 --- a/docker-compose.yml +++ /dev/null @@ -1,81 +0,0 @@ -# -# 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" diff --git a/docs/docker-compose/README.md b/docs/docker-compose/README.md index e69d1bf7f1..af346f9db7 100644 --- a/docs/docker-compose/README.md +++ b/docs/docker-compose/README.md @@ -17,7 +17,7 @@ Currently, it's possible to execute against two classes of test nodes: 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. @@ -90,4 +90,4 @@ TEUTHOLOGY_WAIT=1 ./start.sh To schedule tests in wait mode: ```bash docker exec docker-compose_teuthology_1 /venv/bin/teuthology-suite ... -``` \ No newline at end of file +``` diff --git a/docs/docker-compose/start.sh b/docs/docker-compose/start.sh index 871258c5be..b4132ecb8f 100755 --- a/docs/docker-compose/start.sh +++ b/docs/docker-compose/start.sh @@ -37,12 +37,12 @@ fi 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 -- 2.39.5