From bdc999f4a9961232b32134a96c76185bf7260f42 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Wed, 28 Jun 2023 14:23:51 +0200 Subject: [PATCH] Koschei: Add rolling update playbook --- playbooks/manual/upgrade/koschei-rolling.yml | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 playbooks/manual/upgrade/koschei-rolling.yml diff --git a/playbooks/manual/upgrade/koschei-rolling.yml b/playbooks/manual/upgrade/koschei-rolling.yml new file mode 100644 index 0000000000..fdc4f1f8dc --- /dev/null +++ b/playbooks/manual/upgrade/koschei-rolling.yml @@ -0,0 +1,23 @@ +# This playbook can be used to update running Koschei instance to +# latest upstream version without causing user-visible outage, as long +# as updated version has identical database schema. + +- name: Perform Koschei rolling update + hosts: os_control[0]:os_control_stg[0] + user: root + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - /srv/private/ansible/vars.yml + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + - /srv/web/infra/ansible/roles/openshift-apps/koschei/vars/main.yml + - /srv/web/infra/ansible/roles/openshift-apps/koschei/vars/{{ env }}.yml + handlers: + - import_tasks: "{{ handlers_path }}/restart_services.yml" + + # Simply import latest upstream Koschei image from Quay.io, which + # should automatically trigger new OpenShift deployments as needed. + tasks: + - name: Import upstream image into OpenShift + include_role: name=openshift/import-image + vars: + imagestreamname: koschei