Add container image prepare script to upgrade workflow.
During Q->R upgrade container images have to be prepared after 'overcloud upgrade prepare' command finished. Same command is used during minor update of Q. Change-Id: Ibcdcf0e5e2cb0528f142e2d9c8188eda000b20f3
This commit is contained in:
parent
060528f252
commit
147ae801cb
@ -38,6 +38,13 @@
|
||||
mode: 0775
|
||||
force: true
|
||||
|
||||
- name: create overcloud_prepare_containers.sh script
|
||||
template:
|
||||
src: overcloud_prepare_containers.sh.j2
|
||||
dest: "{{ working_dir }}/overcloud_prepare_containers.sh"
|
||||
mode: 0755
|
||||
force: true
|
||||
|
||||
- name: create overcloud update script
|
||||
template:
|
||||
src: "{{ overcloud_update_run_template }}"
|
||||
|
@ -61,6 +61,14 @@
|
||||
{{ working_dir }}/post_overcloud_update_prepare_workarounds.log
|
||||
when: updates_workarounds|bool
|
||||
|
||||
- name: prepare containers for overcloud update
|
||||
args:
|
||||
chdir: "{{working_dir}}"
|
||||
shell: |
|
||||
set -o pipefail
|
||||
bash {{ working_dir }}/overcloud_prepare_containers.sh {{ timestamper_cmd }} > overcloud_update_prepare_containers.log
|
||||
tags: overcloud_update_prepare_containers
|
||||
|
||||
- name: Ensure ansible-pacemaker module is present in CI.
|
||||
yum: name=ansible-pacemaker state=latest
|
||||
when: tripleo_ci|default(false)|bool
|
||||
|
@ -52,6 +52,12 @@
|
||||
mode: 0775
|
||||
when: upgrade_init_command is string
|
||||
|
||||
- name: create overcloud_prepare_containers.sh script
|
||||
template:
|
||||
src: overcloud_prepare_containers.sh.j2
|
||||
dest: "{{ working_dir }}/overcloud_prepare_containers.sh"
|
||||
mode: 0755
|
||||
force: true
|
||||
|
||||
- name: create overcloud upgrade script
|
||||
template:
|
||||
|
@ -64,6 +64,14 @@
|
||||
when: upgrade_workarounds
|
||||
tags: overcloud_upgrade_prepare
|
||||
|
||||
- name: prepare containers for overcloud upgrade
|
||||
args:
|
||||
chdir: "{{working_dir}}"
|
||||
shell: |
|
||||
set -o pipefail
|
||||
bash {{ working_dir }}/overcloud_prepare_containers.sh {{ timestamper_cmd }} > overcloud_upgrade_prepare_containers.log
|
||||
tags: overcloud_upgrade_prepare_containers
|
||||
|
||||
- name: Ensure ansible-pacemaker module is present in CI.
|
||||
yum: name=ansible-pacemaker state=latest
|
||||
when: tripleo_ci|default(false)|bool
|
||||
|
18
templates/overcloud_prepare_containers.sh.j2
Normal file
18
templates/overcloud_prepare_containers.sh.j2
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/env bash
|
||||
#
|
||||
# Prepare conatainer images for overcloud update/upgrade
|
||||
#
|
||||
{% if overcloud_update|bool -%}
|
||||
{% set operation_type = 'update' -%}
|
||||
{% elif overcloud_upgrade|bool -%}
|
||||
{% set operation_type = 'upgrade' -%}
|
||||
{% endif -%}
|
||||
set -euo pipefail
|
||||
|
||||
source {{undercloud_rc }}
|
||||
|
||||
echo "[$(date)] Start preparing container images for overcloud {{ operation_type }}"
|
||||
|
||||
openstack overcloud external-{{ operation_type }} run \
|
||||
--stack {{ overcloud_stack_name }} \
|
||||
--tags container_image_prepare 2>&1
|
Loading…
Reference in New Issue
Block a user