Merge "Add playbooks to start/stop/restart zuul"

This commit is contained in:
Zuul 2018-07-29 22:44:02 +00:00 committed by Gerrit Code Review
commit 079c5d16ed
5 changed files with 211 additions and 48 deletions

105
playbooks/zuul_restart.yaml Normal file
View File

@ -0,0 +1,105 @@
# Run this with "-f 20"
- hosts: 'zuul01.openstack.org'
any_errors_fatal: true
tasks:
- name: Stop Zuul Scheduler
service:
name: zuul-scheduler
state: stopped
become: true
become_user: root
- name: Stop Zuul Web
service:
name: zuul-web
state: stopped
become: true
become_user: root
- name: Stop Zuul Finger Gateway
service:
name: zuul-fingergw
state: stopped
become: true
become_user: root
- name: Wait for (3h10m) to stop Zuul Scheduler
wait_for:
path: /var/run/zuul/scheduler.pid
state: absent
timeout: 11400
- name: Wait for (3h10m) to stop Zuul Web
wait_for:
path: /var/run/zuul/web.pid
state: absent
timeout: 11400
- name: Wait for (3h10m) to stop Zuul Finger Gateway
wait_for:
path: /var/run/zuul/fingergw.pid
state: absent
timeout: 11400
- hosts: 'zm*.openstack.org'
tasks:
- name: Stop Zuul Mergers
service:
name: zuul-merger
state: stopped
become: true
become_user: root
- hosts: 'ze*.openstack.org'
tasks:
- name: Stop Zuul Executors
service:
name: zuul-executor
state: stopped
become: true
become_user: root
- hosts: 'zuul01.openstack.org'
tasks:
- name: Start Zuul Scheduler
service:
name: zuul-scheduler
state: started
become: true
become_user: root
- name: Stop Zuul Web
service:
name: zuul-web
state: started
become: true
become_user: root
- name: Stop Zuul Finger Gateway
service:
name: zuul-fingergw
state: started
become: true
become_user: root
- hosts: 'zm*.openstack.org'
tasks:
- name: Wait for (3h10m) to stop Zuul Mergers
wait_for:
path: /var/run/zuul/merger.pid
state: absent
timeout: 11400
- name: Start Zuul Mergers
service:
name: zuul-merger
state: started
become: true
become_user: root
- hosts: 'ze*.openstack.org'
tasks:
- name: Wait for (3h10m) to stop Zuul Executors
wait_for:
path: /var/run/zuul/executor.pid
state: absent
timeout: 11400
- name: Start Zuul Executors
service:
name: zuul-executor
state: started
become: true
become_user: root

40
playbooks/zuul_start.yaml Normal file
View File

@ -0,0 +1,40 @@
# Run this with "-f 20"
- hosts: 'zuul01.openstack.org'
tasks:
- name: Start Zuul Scheduler
service:
name: zuul-scheduler
state: started
become: true
become_user: root
- name: Stop Zuul Web
service:
name: zuul-web
state: started
become: true
become_user: root
- name: Stop Zuul Finger Gateway
service:
name: zuul-fingergw
state: started
become: true
become_user: root
- hosts: 'zm*.openstack.org'
tasks:
- name: Start Zuul Mergers
service:
name: zuul-merger
state: started
become: true
become_user: root
- hosts: 'ze*.openstack.org'
tasks:
- name: Start Zuul Executors
service:
name: zuul-executor
state: started
become: true
become_user: root

66
playbooks/zuul_stop.yaml Normal file
View File

@ -0,0 +1,66 @@
# Run this with "-f 20"
- hosts: 'zuul01.openstack.org'
any_errors_fatal: true
tasks:
- name: Stop Zuul Scheduler
service:
name: zuul-scheduler
state: stopped
become: true
become_user: root
- name: Stop Zuul Web
service:
name: zuul-web
state: stopped
become: true
become_user: root
- name: Stop Zuul Finger Gateway
service:
name: zuul-fingergw
state: stopped
become: true
become_user: root
- name: Wait for (3h10m) to stop Zuul Scheduler
wait_for:
path: /var/run/zuul/scheduler.pid
state: absent
timeout: 11400
- name: Wait for (3h10m) to stop Zuul Web
wait_for:
path: /var/run/zuul/web.pid
state: absent
timeout: 11400
- name: Wait for (3h10m) to stop Zuul Finger Gateway
wait_for:
path: /var/run/zuul/fingergw.pid
state: absent
timeout: 11400
- hosts: 'zm*.openstack.org'
tasks:
- name: Stop Zuul Merger
service:
name: zuul-merger
state: stopped
become: true
become_user: root
- name: Wait for (3h10m) to stop Zuul Merger
wait_for:
path: /var/run/zuul/merger.pid
state: absent
timeout: 11400
- hosts: 'ze*.openstack.org'
tasks:
- name: Stop Zuul Executor
service:
name: zuul-executor
state: stopped
become: true
become_user: root
- name: Wait for (3h10m) to stop Zuul Executor
wait_for:
path: /var/run/zuul/executor.pid
state: absent
timeout: 11400

View File

@ -1,19 +0,0 @@
---
- hosts: 'zuul.openstack.org'
any_errors_fatal: true
tasks:
- name: Start Zuul
service:
name: zuul
state: started
become: true
become_user: root
- hosts: 'zm0*.openstack.org'
tasks:
- name: Start zuul-merger
service:
name: zuul-merger
state: started
become: true
become_user: root

View File

@ -1,29 +0,0 @@
---
- hosts: 'zuul.openstack.org'
any_errors_fatal: true
tasks:
- name: Stop Zuul
service:
name: zuul
state: stopped
become: true
become_user: root
- name: Wait for (3h10m) to stop zuul
wait_for:
path: /var/run/zuul/zuul.pid
state: absent
timeout: 11400
- hosts: 'zm0*.openstack.org'
tasks:
- name: Hard stop zuul-merger
service:
name: zuul-merger
state: stopped
become: true
become_user: root
- name: Wait for (3h10m) to stop zuul-merger
wait_for:
path: /var/run/zuul-merger/zuul-merger.pid
state: absent
timeout: 11400