Files
James E. Blair 76f7d210de Switch quickstart to docker compose v2
We want to use podman to run our containers, but the podman-compose
tool has been problematic to use in OpenDev and has also caused
some confusion for users.  It also seems the podman project is
favoring declaring systems using k8s syntax rather than compose,
which is putting the podman-compose tool future in question.

This change updates the quickstart to use "docker compose" (ie,
docker-compose v2) instead of podman-compose.

Because we want to continue using speculative container testing
which does not work for quay.io images when using docker, we will
use the podman backend with docker compose.  This is what we
are moving toward in OpenDev.  We hope that it is the best of both
worlds.

Users likely don't need such a complex setup, so we will adjust
the documentation to use "docker compose" but not mention anything
about podman.  That will remain a test implementation detail,
at least as long as we think they are sufficiently compatible that
we can get away with testing something slightly different than
our instructions.

This switches to packaged git-review for simplicity because
pip install does not work in noble.

Fedora and OpenSuse installation instructions are similarly updated.

Red Hat / CentOS instructions are removed because this author does
not have a way to verify package names.  Their return by someone
knowledgable with that is welcome.

Change-Id: I238f6db178af86fa7203203993c90bd8d1371712
Depends-On: https://review.opendev.org/923083
Depends-On: https://review.opendev.org/925916
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
2025-10-31 07:43:57 -07:00

117 lines
3.0 KiB
YAML

# Stop the basic tutorial
- name: Run docker compose down
when: not local
shell:
cmd: docker compose -p zuul-tutorial stop
chdir: src/opendev.org/zuul/zuul/doc/source/examples
environment:
DOCKER_HOST: unix:///run/podman/podman.sock
- name: Run docker compose down
when: local
shell:
cmd: docker compose -p zuul-tutorial stop
chdir: ../../doc/source/examples
environment:
DOCKER_HOST: unix:///run/podman/podman.sock
# Restart with the new config
- name: Run docker compose up
when: not local
shell:
cmd: docker compose -p zuul-tutorial up -d
chdir: src/opendev.org/zuul/zuul/doc/source/examples
environment:
DOCKER_HOST: unix:///run/podman/podman.sock
ZUUL_TUTORIAL_CONFIG: "./tracing/etc_zuul/"
- name: Run docker compose up
when: local
shell:
cmd: docker compose -p zuul-tutorial up -d
chdir: ../../doc/source/examples
environment:
DOCKER_HOST: unix:///run/podman/podman.sock
ZUUL_TUTORIAL_CONFIG: "./tracing/etc_zuul/"
# Start Jaeger
- name: Run docker compose up
when: not local
shell:
cmd: docker compose -p zuul-tutorial-tracing up -d
chdir: src/opendev.org/zuul/zuul/doc/source/examples/tracing
environment:
DOCKER_HOST: unix:///run/podman/podman.sock
- name: Run docker compose up
when: local
shell:
cmd: docker compose -p zuul-tutorial-tracing up -d
chdir: ../../doc/source/examples/tracing
environment:
DOCKER_HOST: unix:///run/podman/podman.sock
# In case ZK is shutdown first, allow the locks to expire.
- name: Delay for ZK lock expiration
wait_for:
timeout: 30
delegate_to: localhost
# Verify that Zuul runs with the new config
- name: Wait for Zuul
uri:
url: http://localhost:9000/api/components
method: GET
return_content: true
status_code: 200
body_format: json
register: result
retries: 30
delay: 10
until: result.status == 200 and (result.json["scheduler"]|length == 1) and result.json["scheduler"][0]['state'] == 'running'
changed_when: false
- name: Verify that old builds are available
uri:
url: "http://localhost:9000/api/tenant/example-tenant/builds"
method: GET
return_content: true
status_code: 200
body_format: json
register: result
failed_when: "result.json | length < 4"
changed_when: false
# Remove the label so Zuul will post again Verified+1 which is what
# check-pipeline is looking for
- include_role:
name: remove-verified
vars:
change_id: "{{ changetest1.id }}"
# Recheck the change to issue a trace
- include_role:
name: recheck-change
vars:
change_id: "{{ changetest1.id }}"
- include_role:
name: check-pipeline
vars:
title: "test job test1"
projectname: test1
check_number: 3
- name: Verify tracing information is available
uri:
url: http://localhost:16686/api/traces?lookback=1h&service=zuul
method: GET
return_content: true
status_code: 200
body_format: json
register: result
retries: 30
delay: 10
until: result.status == 200 and result.json["data"] | length > 0
changed_when: false