Add support for upgrading HCI environments

In case of HCI deployments the upgrade workflow slightly differs
and we need to keep using puppet ceph during the major upgrade
composable step. This change adds the required changes to accomodate
this. For reference:
https://bugzilla.redhat.com/show_bug.cgi?id=1511494#c3

Change-Id: I5f398e114cd929621b4e24742c4f1d2376a2ac8e
This commit is contained in:
Marius Cornea 2017-11-30 17:11:22 +01:00 committed by Jose Luis Franco Arza
parent 6a1831dc8a
commit 270e429816
5 changed files with 30 additions and 0 deletions

View File

@ -118,3 +118,6 @@ need_ssh_config: true
# Remove packages which get migrated to containers during upgrade
upgrade_remove_rpm: false
# Enable HCI upgrade
upgrade_hci: false

View File

@ -108,5 +108,10 @@
upgrade_remove_rpm: true
when: install.upgrade.remove.rpm
- name: Set upgrade HCI
set_fact:
upgrade_hci: true
when: install.upgrade.hci
roles:
- tripleo-upgrade

View File

@ -87,6 +87,12 @@ subparsers:
type: Bool
help: Remove packages which get migrated to containers during upgrade
default: false
upgrade-hci:
type: Bool
help: |
The upgrade workflow for HCI deployments is slightly different.
This option accomdates HCI upgrade.
default: false
- title: TripleO Update
options:
overcloud-update:

View File

@ -146,6 +146,12 @@
dest: "{{ working_dir }}/remove-packages.yaml"
when: upgrade_remove_rpm|bool
- name: create environment file for hci upgrade
template:
src: "upgrade_hci.yaml.j2"
dest: "{{ working_dir }}/upgrade_hci.yaml"
when: upgrade_hci|bool
- name: create composable upgrade scripts
include: step_upgrade.yml
loop_control:
@ -170,6 +176,14 @@
- "{% if ceph_env is defined %}{{ working_dir }}/ceph-ansible-env.yaml{% endif %}"
- "{% if not upstream_container_images or (upstream_container_images and use_local_docker_registry) %}{{ containers_default_parameters }}{% endif %}"
- "{% if dpdk_env|succeeded %}{{working_dir}}/dpdk-upgrade-env.yaml{% endif %}"
- "{% if upgrade_hci|bool %}{{ working_dir }}/upgrade_hci.yaml{% endif %}"
- name: replace storage-environment with puppet-ceph for hci use case
replace:
dest: "{{ overcloud_composable_upgrade_script }}"
regexp: environments/storage-environment.yaml
replace: environments/puppet-ceph.yaml
when: upgrade_hci|bool
- name: adjust ssh config to skip host key check
copy:

View File

@ -0,0 +1,2 @@
parameter_defaults:
CephAnsiblePlaybook: /usr/share/ceph-ansible/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml