Merge "Switch back to docker for gerrit and nodepool-builder"

This commit is contained in:
Zuul 2020-03-17 00:02:22 +00:00 committed by Gerrit Code Review
commit 11f7e874c1
6 changed files with 26 additions and 30 deletions

View File

@ -266,28 +266,25 @@
when: gerrit_redirect_vhost is defined
notify: gerrit Reload apache2
- name: Install podman-compose
pip:
name: podman-compose
state: latest
# NOTE(mordred) Cannot use full path to pip3 here because it is
# different on zuul test nodes and in production. This is, of
# course, not stellar.
executable: pip3
- name: Install docker-compose
package:
name:
- docker-compose
state: present
# TODO(mordred) Make this suck less, like if we could do an init container
# or something just generally less gross.
- name: Run gerrit init
when: gerrit_run_init | bool
command: >
podman run -it --rm --net=host -u gerrit
docker run --rm --net=host -u gerrit
{% for volume in gerrit_container_volumes %}
-v {{ volume }}
{% endfor %}
{{ gerrit_container_image }}
/usr/local/openjdk-8/bin/java -jar /var/gerrit/bin/gerrit.war init -d /var/gerrit -b --no-auto-start --install-all-plugins
- name: Run podman-compose up
- name: Run docker-compose up
shell:
cmd: podman-compose up -d
cmd: docker-compose up -d
chdir: /etc/gerrit-compose/

View File

@ -26,16 +26,18 @@
dest: /etc/nodepool-builder-compose/docker-compose.yaml
mode: 0644
- name: Install podman-compose
pip:
name: podman-compose
state: latest
# NOTE(mordred) Cannot use full path to pip3 here because it is
# different on zuul test nodes and in production. This is, of
# course, not stellar.
executable: pip3
- name: Install docker-compose
package:
name:
- docker-compose
state: present
- name: Run podman-compose up
- name: Run docker-compose pull
shell:
cmd: podman-compose up -d
cmd: docker-compose pull
chdir: /etc/nodepool-builder-compose/
- name: Run docker-compose up
shell:
cmd: docker-compose up -d
chdir: /etc/nodepool-builder-compose/

View File

@ -10,8 +10,7 @@
name: "Configure nodepool builders"
strategy: free
roles:
- pip3
- install-podman
- install-docker
- nodepool-base
- configure-openstacksdk
- nodepool-builder
@ -19,4 +18,4 @@
# TODO(ianw) 2020-03-03 : watch this space...
#- hosts: nodepool-launcher_opendev:!disabled
# name: "Configure nodepool launchers"
# name: "Configure nodepool launchers"

View File

@ -1,8 +1,7 @@
- hosts: "review-dev:!disabled"
name: "Configure gerrit on review-dev"
roles:
- pip3
- install-podman
- install-docker
- role: gerrit
gerrit_ssh_rsa_key_contents: "{{ gerrit_dev_ssh_rsa_key_contents }}"
gerrit_ssh_rsa_pubkey_contents: "{{ gerrit_dev_ssh_rsa_pubkey_contents }}"

View File

@ -1,6 +1,5 @@
- hosts: "review:!disabled"
name: "Configure gerrit"
roles:
- pip3
- install-podman
- install-docker
- gerrit

View File

@ -36,8 +36,8 @@ def test_builder_container_running(host):
if host.backend.get_hostname() != 'nb01-test.opendev.org':
pytest.skip()
cmd = host.run("podman ps -a --format '{{ .Names }}'")
assert 'nodepool-builder-compose_nodepool-builder_1' in cmd.stdout
cmd = host.run("docker ps -a --format '{{ .Names }}'")
assert 'nodepoolbuildercompose_nodepool-builder_1' in cmd.stdout
def test_builder_webserver_running(host):
if host.backend.get_hostname() != 'nb01-test.opendev.org':