OpenShift upgrade with openshift-ansible and external_upgrade_tasks

This implements upgrade for OpenShift. At commit time it was tested on
a no-op upgrade from 3.9 to 3.9, which could suffice as starting point
to start tweaking and tuning from.

Change-Id: I6e2d20e69f821e1900730ec30545af1530a7fba0
This commit is contained in:
Jiri Stransky 2018-08-08 14:26:23 +02:00
parent 5789a9694a
commit fc17e15bcf
1 changed files with 14 additions and 0 deletions

View File

@ -51,6 +51,10 @@ parameters:
default: '/usr/share/ansible/openshift-ansible/playbooks/openshift-master/scaleup.yml'
description: Path to OpenShift-Ansible playbook.
type: string
OpenShiftUpgradePlaybook:
default: '/usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_9/upgrade.yml'
description: Path to OpenShift-Ansible Upgrade playbook.
type: string
OpenShiftMasterNodeVars:
default: {}
description: OpenShift node vars specific for the master nodes
@ -223,6 +227,7 @@ outputs:
set_fact:
openshift_ansible_playbook_path: {get_param: OpenShiftAnsiblePlaybook}
openshift_master_scaleup_playbook_path: {get_param: OpenShiftMasterScaleupPlaybook}
openshift_upgrade_playbook_path: {get_param: OpenShiftUpgradePlaybook}
# NOTE(flaper87): We'll use openshift_ansible_scaleup_playbook_path
# if there are new master or new worker nodes and we are doing an
@ -277,6 +282,10 @@ outputs:
- include: "{{openshift_worker_scaleup_playbook_path}}"
{% endif %}
{% if tripleo_stack_action == 'UPDATE' and openshift_upgrade %}
- include: "{{openshift_upgrade_playbook_path}}"
{% endif %}
{% if tripleo_stack_action == 'CREATE' or (tripleo_stack_action == 'UPDATE' and (new_masters + new_nodes) | count == 0) %}
- include: "{{openshift_ansible_playbook_path}}"
{% endif %}
@ -300,3 +309,8 @@ outputs:
shell: |
{{openshift_command}} 2>&1 | tee {{playbook_dir}}/openshift/playbook.log
exit ${PIPESTATUS[0]}
external_upgrade_tasks:
- name: set OpenShift upgrade facts
set_fact:
openshift_upgrade: true