summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster/upgrades
diff options
context:
space:
mode:
authorRussell Teague <rteague@redhat.com>2017-12-07 12:06:32 -0500
committerGitHub <noreply@github.com>2017-12-07 12:06:32 -0500
commit54175f4b668cc1e6108b7d0af13275fcda9f586f (patch)
tree0dfe223febcbf59d1f9ee50b7fed0032e7ace42f /playbooks/common/openshift-cluster/upgrades
parent9ee49e03676be3bc51c0f3ec341b1c4f6c1b0008 (diff)
parent112e1696cc7d2c8c5b11682b584b45a37e947099 (diff)
downloadopenshift-54175f4b668cc1e6108b7d0af13275fcda9f586f.tar.gz
openshift-54175f4b668cc1e6108b7d0af13275fcda9f586f.tar.bz2
openshift-54175f4b668cc1e6108b7d0af13275fcda9f586f.tar.xz
openshift-54175f4b668cc1e6108b7d0af13275fcda9f586f.zip
Merge pull request #6365 from mtnbikenc/consolidate-etcd-upgrade
Playbook Consolidation - etcd Upgrade
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/backup.yml28
l---------playbooks/common/openshift-cluster/upgrades/etcd/filter_plugins1
l---------playbooks/common/openshift-cluster/upgrades/etcd/lookup_plugins1
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/main.yml29
l---------playbooks/common/openshift-cluster/upgrades/etcd/roles1
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml64
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/upgrade_image_members.yml17
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/upgrade_rpm_members.yml18
-rw-r--r--playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml4
9 files changed, 2 insertions, 161 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
deleted file mode 100644
index 531175c85..000000000
--- a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-- name: Backup etcd
- hosts: oo_etcd_hosts_to_backup
- roles:
- - role: openshift_etcd_facts
- post_tasks:
- - include_role:
- name: etcd
- tasks_from: backup
- vars:
- r_etcd_common_backup_tag: "{{ etcd_backup_tag }}"
- r_etcd_common_embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
- r_etcd_common_backup_sufix_name: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}"
-
-- name: Gate on etcd backup
- hosts: localhost
- connection: local
- become: no
- tasks:
- - set_fact:
- etcd_backup_completed: "{{ hostvars
- | oo_select_keys(groups.oo_etcd_hosts_to_backup)
- | oo_collect('inventory_hostname', {'r_etcd_common_backup_complete': true}) }}"
- - set_fact:
- etcd_backup_failed: "{{ groups.oo_etcd_hosts_to_backup | difference(etcd_backup_completed) | list }}"
- - fail:
- msg: "Upgrade cannot continue. The following hosts did not complete etcd backup: {{ etcd_backup_failed | join(',') }}"
- when: etcd_backup_failed | length > 0
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/filter_plugins b/playbooks/common/openshift-cluster/upgrades/etcd/filter_plugins
deleted file mode 120000
index 27ddaa18b..000000000
--- a/playbooks/common/openshift-cluster/upgrades/etcd/filter_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../filter_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/lookup_plugins b/playbooks/common/openshift-cluster/upgrades/etcd/lookup_plugins
deleted file mode 120000
index cf407f69b..000000000
--- a/playbooks/common/openshift-cluster/upgrades/etcd/lookup_plugins
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../lookup_plugins \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/main.yml b/playbooks/common/openshift-cluster/upgrades/etcd/main.yml
deleted file mode 100644
index 5b8ba3bb2..000000000
--- a/playbooks/common/openshift-cluster/upgrades/etcd/main.yml
+++ /dev/null
@@ -1,29 +0,0 @@
----
-# For 1.4/3.4 we want to upgrade everyone to etcd-3.0. etcd docs say to
-# upgrade from 2.0.x to 2.1.x to 2.2.x to 2.3.x to 3.0.x. While this is a tedius
-# task for RHEL and CENTOS it's simply not possible in Fedora unless you've
-# mirrored packages on your own because only the GA and latest versions are
-# available in the repos. So for Fedora we'll simply skip this, sorry.
-
-- name: Backup etcd before upgrading anything
- include: backup.yml
- vars:
- etcd_backup_tag: "pre-upgrade-"
- when: openshift_etcd_backup | default(true) | bool
-
-- name: Drop etcdctl profiles
- hosts: oo_etcd_hosts_to_upgrade
- tasks:
- - include_role:
- name: etcd
- tasks_from: drop_etcdctl
-
-- name: Perform etcd upgrade
- include: ./upgrade.yml
- when: openshift_etcd_upgrade | default(true) | bool
-
-- name: Backup etcd
- include: backup.yml
- vars:
- etcd_backup_tag: "post-3.0-"
- when: openshift_etcd_backup | default(true) | bool
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/roles b/playbooks/common/openshift-cluster/upgrades/etcd/roles
deleted file mode 120000
index 6bc1a7aef..000000000
--- a/playbooks/common/openshift-cluster/upgrades/etcd/roles
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../roles \ No newline at end of file
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml
deleted file mode 100644
index c5ff4133c..000000000
--- a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml
+++ /dev/null
@@ -1,64 +0,0 @@
----
-- name: Determine etcd version
- hosts: oo_etcd_hosts_to_upgrade
- tasks:
- - include_role:
- name: etcd
- tasks_from: version_detect.yml
-
-- include: upgrade_rpm_members.yml
- vars:
- etcd_upgrade_version: '2.1'
-
-- include: upgrade_rpm_members.yml
- vars:
- etcd_upgrade_version: '2.2'
-
-- include: upgrade_image_members.yml
- vars:
- etcd_upgrade_version: '2.2.5'
-
-- include: upgrade_rpm_members.yml
- vars:
- etcd_upgrade_version: '2.3'
-
-- include: upgrade_image_members.yml
- vars:
- etcd_upgrade_version: '2.3.7'
-
-- include: upgrade_rpm_members.yml
- vars:
- etcd_upgrade_version: '3.0'
-
-- include: upgrade_image_members.yml
- vars:
- etcd_upgrade_version: '3.0.15'
-
-- include: upgrade_rpm_members.yml
- vars:
- etcd_upgrade_version: '3.1'
-
-- include: upgrade_image_members.yml
- vars:
- etcd_upgrade_version: '3.1.3'
-
-- include: upgrade_rpm_members.yml
- vars:
- etcd_upgrade_version: '3.2'
-
-- include: upgrade_image_members.yml
- vars:
- etcd_upgrade_version: '3.2.7'
-
-- name: Upgrade fedora to latest
- hosts: oo_etcd_hosts_to_upgrade
- serial: 1
- tasks:
- - include_role:
- name: etcd
- tasks_from: upgrade_image
- vars:
- etcd_peer: "{{ openshift.common.hostname }}"
- when:
- - ansible_distribution == 'Fedora'
- - not openshift.common.is_containerized | bool
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_image_members.yml b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_image_members.yml
deleted file mode 100644
index 6fca42bd0..000000000
--- a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_image_members.yml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-# INPUT etcd_upgrade_version
-# INPUT etcd_container_version
-# INPUT openshift.common.is_containerized
-- name: Upgrade containerized hosts to {{ etcd_upgrade_version }}
- hosts: oo_etcd_hosts_to_upgrade
- serial: 1
- tasks:
- - include_role:
- name: etcd
- tasks_from: upgrade_image
- vars:
- r_etcd_upgrade_version: "{{ etcd_upgrade_version }}"
- etcd_peer: "{{ openshift.common.hostname }}"
- when:
- - etcd_container_version | default('99') | version_compare(etcd_upgrade_version,'<')
- - openshift.common.is_containerized | bool
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_rpm_members.yml b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_rpm_members.yml
deleted file mode 100644
index 51e8786b3..000000000
--- a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade_rpm_members.yml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-# INPUT etcd_upgrade_version
-# INPUT etcd_rpm_version
-# INPUT openshift.common.is_containerized
-- name: Upgrade to {{ etcd_upgrade_version }}
- hosts: oo_etcd_hosts_to_upgrade
- serial: 1
- tasks:
- - include_role:
- name: etcd
- tasks_from: upgrade_rpm
- vars:
- r_etcd_upgrade_version: "{{ etcd_upgrade_version }}"
- etcd_peer: "{{ openshift.common.hostname }}"
- when:
- - etcd_rpm_version.stdout | default('99') | version_compare(etcd_upgrade_version, '<')
- - ansible_distribution == 'RedHat'
- - not openshift.common.is_containerized | bool
diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
index 503d75ba0..0d3fed212 100644
--- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
@@ -16,8 +16,8 @@
local_facts:
embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
-- name: Upgrade and backup etcd
- include: ./etcd/main.yml
+- name: Backup and upgrade etcd
+ include: ../../../openshift-etcd/private/upgrade_main.yml
# Create service signer cert when missing. Service signer certificate
# is added to master config in the master_config_upgrade hook.