Add pull tasks for nodepool/zuul

So we can stop/pull/start, move the pull tasks to their own files
and add a playbook that invokes them.

Change-Id: I4f351c1d28e5e4606e0a778e545a3a805525ac71
This commit is contained in:
James E. Blair 2021-02-19 15:42:40 -08:00
parent 8fd2857a8e
commit b6cbb52447
14 changed files with 75 additions and 24 deletions

View File

@ -0,0 +1,16 @@
# Run this with "-f 20"
- hosts: 'nodepool-builder:!disabled'
any_errors_fatal: true
tasks:
- include_role:
name: nodepool-builder
tasks_from: pull
- hosts: 'nodepool-launcher:!disabled'
any_errors_fatal: true
tasks:
- include_role:
name: nodepool-launcher
tasks_from: pull

View File

@ -31,10 +31,8 @@
dest: /etc/nodepool-builder-compose/docker-compose.yaml
mode: 0644
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/nodepool-builder-compose/
- name: Update container images
include_tasks: pull.yaml
- name: Start nodepool builder
include_tasks: start.yaml

View File

@ -0,0 +1,4 @@
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/nodepool-builder-compose/

View File

@ -45,10 +45,8 @@
src: docker-compose.yaml.j2
dest: /etc/nodepool-docker/docker-compose.yaml
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/nodepool-docker/
- name: Update container images
include_tasks: pull.yaml
- name: Start nodepool launcher
include_tasks: start.yaml

View File

@ -0,0 +1,4 @@
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/nodepool-docker/

View File

@ -78,10 +78,8 @@
src: docker-compose.yaml
dest: /etc/zuul-executor/docker-compose.yaml
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/zuul-executor
- name: Update container images
include_tasks: pull.yaml
- name: Start containers
include_tasks: start.yaml

View File

@ -0,0 +1,4 @@
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/zuul-executor

View File

@ -42,10 +42,8 @@
src: docker-compose.yaml
dest: /etc/zuul-merger/docker-compose.yaml
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/zuul-merger
- name: Update container images
include_tasks: pull.yaml
- name: Start containers
include_tasks: start.yaml

View File

@ -0,0 +1,4 @@
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/zuul-merger

View File

@ -63,10 +63,8 @@
src: docker-compose.yaml
dest: /etc/zuul-scheduler/docker-compose.yaml
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/zuul-scheduler
- name: Update container images
include_tasks: pull.yaml
- name: Start containers
include_tasks: start.yaml

View File

@ -0,0 +1,4 @@
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/zuul-scheduler

View File

@ -100,10 +100,8 @@
src: docker-compose.yaml
dest: /etc/zuul-web/docker-compose.yaml
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/zuul-web
- name: Update container images
include_tasks: pull.yaml
- name: Start containers
include_tasks: start.yaml

View File

@ -0,0 +1,4 @@
- name: Run docker-compose pull
shell:
cmd: docker-compose pull
chdir: /etc/zuul-web

23
playbooks/zuul_pull.yaml Normal file
View File

@ -0,0 +1,23 @@
# Run this with "-f 20"
- hosts: 'zuul-scheduler:!disabled'
any_errors_fatal: true
tasks:
- include_role:
name: zuul-scheduler
tasks_from: pull
- include_role:
name: zuul-web
tasks_from: pull
- hosts: 'zuul-merger:!disabled'
tasks:
- include_role:
name: zuul-merger
tasks_from: pull
- hosts: 'zuul-executor:!disabled'
tasks:
- include_role:
name: zuul-executor
tasks_from: pull