Merge "Install docker-compose from pypi"

This commit is contained in:
Zuul 2020-04-17 19:11:19 +00:00 committed by Gerrit Code Review
commit 5e4901b7c6
12 changed files with 21 additions and 45 deletions

View File

@ -90,12 +90,6 @@
src: settings.json.j2 src: settings.json.j2
dest: /etc/etherpad/settings.json dest: /etc/etherpad/settings.json
- name: Install docker-compose and npm
package:
name:
- docker-compose
state: present
- name: Clean up from old ep_headings hack - name: Clean up from old ep_headings hack
file: file:
path: /etc/etherpad/node_modules path: /etc/etherpad/node_modules

View File

@ -281,12 +281,6 @@
when: gerrit_redirect_vhost is defined when: gerrit_redirect_vhost is defined
notify: gerrit Reload apache2 notify: gerrit Reload apache2
- name: Install docker-compose
package:
name:
- docker-compose
state: present
- name: Start gerrit - name: Start gerrit
include_tasks: start.yaml include_tasks: start.yaml

View File

@ -37,7 +37,7 @@
register: docker_compose_pull register: docker_compose_pull
- name: Stop/Start gitea safely for Gerrit replication - name: Stop/Start gitea safely for Gerrit replication
when: "'Downloaded newer image' in docker_compose_pull.stdout" when: "'downloaded newer image' in docker_compose_pull.stderr"
block: block:
- name: Run docker-compose stop - name: Run docker-compose stop
shell: shell:
@ -83,7 +83,7 @@
when: root_user_check.status==404 when: root_user_check.status==404
block: block:
- name: Create root user - name: Create root user
command: "docker exec -t giteadocker_gitea-web_1 gitea admin create-user --name root --password {{ gitea_root_password }} --email {{ gitea_root_email }} --admin" command: "docker exec -t gitea-docker_gitea-web_1 gitea admin create-user --name root --password {{ gitea_root_password }} --email {{ gitea_root_email }} --admin"
no_log: "{{ gitea_no_log }}" no_log: "{{ gitea_no_log }}"
- name: Check if gerrit user exists - name: Check if gerrit user exists
uri: uri:
@ -153,7 +153,7 @@
cron: cron:
name: pack-git-refs name: pack-git-refs
state: present state: present
job: "docker exec -t giteadocker_gitea-web_1 find /data/git/repositories/ -maxdepth 2 -name *.git -type d -execdir git --git-dir={} gc --quiet \\;" job: "docker exec -t gitea-docker_gitea-web_1 find /data/git/repositories/ -maxdepth 2 -name *.git -type d -execdir git --git-dir={} gc --quiet \\;"
minute: '{{ 59 | random(seed=inventory_hostname) }}' minute: '{{ 59 | random(seed=inventory_hostname) }}'
hour: '{{ 23 | random(seed=inventory_hostname) }}' hour: '{{ 23 | random(seed=inventory_hostname) }}'
weekday: 0 weekday: 0

View File

@ -20,11 +20,6 @@
src: haproxy.cfg.j2 src: haproxy.cfg.j2
dest: /var/haproxy/etc/haproxy.cfg dest: /var/haproxy/etc/haproxy.cfg
notify: Reload haproxy notify: Reload haproxy
- name: Install docker-compose
package:
name:
- docker-compose
state: present
- name: Run docker-compose pull - name: Run docker-compose pull
shell: shell:
cmd: docker-compose pull cmd: docker-compose pull

View File

@ -14,3 +14,17 @@
- name: reset ssh connection to pick up docker group - name: reset ssh connection to pick up docker group
meta: reset_connection meta: reset_connection
# We install docker-compose from pypi to get features like
# stop_grace_period.
- name: Remove distro docker-compose
package:
name:
- docker-compose
state: absent
- name: Install docker-compose
pip:
name: docker-compose
state: present
executable: pip3

View File

@ -12,11 +12,6 @@
copy: copy:
src: config.js src: config.js
dest: /var/jitsi-meet/web/config.js dest: /var/jitsi-meet/web/config.js
- name: Install docker-compose
package:
name:
- docker-compose
state: present
- name: Run docker-compose pull - name: Run docker-compose pull
shell: shell:
cmd: docker-compose pull cmd: docker-compose pull

View File

@ -26,12 +26,6 @@
dest: /etc/nodepool-builder-compose/docker-compose.yaml dest: /etc/nodepool-builder-compose/docker-compose.yaml
mode: 0644 mode: 0644
- name: Install docker-compose
package:
name:
- docker-compose
state: present
- name: Run docker-compose pull - name: Run docker-compose pull
shell: shell:
cmd: docker-compose pull cmd: docker-compose pull

View File

@ -18,11 +18,6 @@
template: template:
src: registry.yaml.j2 src: registry.yaml.j2
dest: /var/registry/conf/registry.yaml dest: /var/registry/conf/registry.yaml
- name: Install docker-compose
package:
name:
- docker-compose
state: present
- name: Run docker-compose pull - name: Run docker-compose pull
shell: shell:
cmd: docker-compose pull cmd: docker-compose pull

View File

@ -2,11 +2,6 @@
synchronize: synchronize:
src: zuul-preview-docker/ src: zuul-preview-docker/
dest: /etc/zuul-preview-docker/ dest: /etc/zuul-preview-docker/
- name: Install docker-compose
package:
name:
- docker-compose
state: present
- name: Run docker-compose pull - name: Run docker-compose pull
shell: shell:
cmd: docker-compose pull cmd: docker-compose pull

View File

@ -25,11 +25,11 @@ def test_gitea_listening(host):
assert gitea_ssh.is_listening assert gitea_ssh.is_listening
def test_ulimit(host): def test_ulimit(host):
cmd = host.run("docker exec giteadocker_gitea-web_1 prlimit") cmd = host.run("docker exec gitea-docker_gitea-web_1 prlimit")
expected = ("STACK max stack size " expected = ("STACK max stack size "
"16777216 9223372036854775807 bytes") "16777216 9223372036854775807 bytes")
assert expected in cmd.stdout.split('\n') assert expected in cmd.stdout.split('\n')
def test_sshd_logs(host): def test_sshd_logs(host):
cmd = host.run("docker logs giteadocker_gitea-ssh_1") cmd = host.run("docker logs gitea-docker_gitea-ssh_1")
assert cmd.stdout != '' or cmd.stderr != '' assert cmd.stdout != '' or cmd.stderr != ''

View File

@ -25,7 +25,7 @@ def test_gitea_listening(host):
assert gitea_http.is_listening assert gitea_http.is_listening
def test_haproxy_statsd_running(host): def test_haproxy_statsd_running(host):
cmd = host.run("docker inspect haproxydocker_haproxy-statsd_1") cmd = host.run("docker inspect haproxy-docker_haproxy-statsd_1")
out = json.loads(cmd.stdout) out = json.loads(cmd.stdout)
assert out[0]["State"]["Status"] == "running" assert out[0]["State"]["Status"] == "running"
assert out[0]["RestartCount"] == 0 assert out[0]["RestartCount"] == 0

View File

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