summaryrefslogtreecommitdiffstats
path: root/playbooks/byo
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-09-12 13:17:32 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-09-28 11:57:54 -0300
commitcbe003803a4a7509ee7aa1fac776cc618818bb4e (patch)
tree6cd528d71671a22ceab5647a79bac365fee6e572 /playbooks/byo
parent0cb963375165f03807818a8e8fa99a52a8244c04 (diff)
downloadopenshift-cbe003803a4a7509ee7aa1fac776cc618818bb4e.tar.gz
openshift-cbe003803a4a7509ee7aa1fac776cc618818bb4e.tar.bz2
openshift-cbe003803a4a7509ee7aa1fac776cc618818bb4e.tar.xz
openshift-cbe003803a4a7509ee7aa1fac776cc618818bb4e.zip
Attempt to tease apart pre upgrade for masters/nodes.
Diffstat (limited to 'playbooks/byo')
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml53
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_masters.yml49
-rw-r--r--playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml47
3 files changed, 147 insertions, 2 deletions
diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml
index 3a1712000..5a95b5fdb 100644
--- a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml
+++ b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml
@@ -1,4 +1,7 @@
---
+#
+# Full Control Plane + Nodes Upgrade
+#
- include: ../../../../common/openshift-cluster/upgrades/init.yml
# Configure the upgrade target for the common upgrade tasks:
@@ -8,13 +11,59 @@
openshift_upgrade_target: "{{ '1.3' if deployment_type == 'origin' else '3.3' }}"
openshift_upgrade_min: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}"
-- include: ../../../../common/openshift-cluster/upgrades/pre.yml
+# Pre-upgrade
+- include: ../initialize_facts.yml
+
+- name: Update repos and initialize facts on all hosts
+ hosts: oo_masters_to_config:oo_nodes_to_config:oo_etcd_to_config:oo_lb_to_config
+ roles:
+ - openshift_repos
+
+- name: Set openshift_no_proxy_internal_hostnames
+ hosts: oo_masters_to_config:oo_nodes_to_config
+ tasks:
+ - set_fact:
+ openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config']
+ | union(groups['oo_masters_to_config'])
+ | union(groups['oo_etcd_to_config'] | default([])))
+ | oo_collect('openshift.common.hostname') | default([]) | join (',')
+ }}"
+ when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and
+ openshift_generate_no_proxy_hosts | default(True) | bool }}"
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml
+
+- include: ../initialize_openshift_version.yml
vars:
- openshift_deployment_type: "{{ deployment_type }}"
+ # Request specific openshift_release and let the openshift_version role handle converting this
+ # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if
+ # defined, and overriding the normal behavior of protecting the installed version
+ openshift_release: "{{ openshift_upgrade_target }}"
+ openshift_protect_installed_version: False
+ # Docker role (a dependency) should be told not to do anything to installed version
+ # of docker, we handle this separately during upgrade. (the inventory may have a
+ # docker_version defined, we don't want to actually do it until later)
+ docker_protect_installed_version: True
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_control_plane_running
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_docker_upgrade_targets.yml
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/gate_checks.yml
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/backup_etcd.yml
+
+ # vars:
+ # openshift_deployment_type: "{{ deployment_type }}"
+
- include: ../../../../common/openshift-cluster/upgrades/upgrade.yml
vars:
openshift_deployment_type: "{{ deployment_type }}"
master_config_hook: "v3_3/master_config_upgrade.yml"
node_config_hook: "v3_3/node_config_upgrade.yml"
+
- include: ../../../openshift-master/restart.yml
+
- include: ../../../../common/openshift-cluster/upgrades/post.yml
diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_masters.yml b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_masters.yml
index c7d7eb3c6..5c2bba209 100644
--- a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_masters.yml
+++ b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_masters.yml
@@ -1,4 +1,9 @@
---
+#
+# Control Plane Upgrade Playbook
+#
+# Upgrades masters and etcd.
+#
- include: ../../../../common/openshift-cluster/upgrades/init.yml
# Configure the upgrade target for the common upgrade tasks:
@@ -7,3 +12,47 @@
- set_fact:
openshift_upgrade_target: "{{ '1.3' if deployment_type == 'origin' else '3.3' }}"
openshift_upgrade_min: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}"
+
+# Pre-upgrade
+- include: ../initialize_facts.yml
+
+- name: Update repos and initialize facts on all hosts
+ hosts: oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config
+ roles:
+ - openshift_repos
+
+- name: Set openshift_no_proxy_internal_hostnames
+ hosts: oo_masters_to_config:oo_nodes_to_config
+ tasks:
+ - set_fact:
+ openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config']
+ | union(groups['oo_masters_to_config'])
+ | union(groups['oo_etcd_to_config'] | default([])))
+ | oo_collect('openshift.common.hostname') | default([]) | join (',')
+ }}"
+ when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and
+ openshift_generate_no_proxy_hosts | default(True) | bool }}"
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml
+
+- include: ../initialize_openshift_version.yml
+ vars:
+ # Request specific openshift_release and let the openshift_version role handle converting this
+ # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if
+ # defined, and overriding the normal behavior of protecting the installed version
+ openshift_release: "{{ openshift_upgrade_target }}"
+ openshift_protect_installed_version: False
+ # Docker role (a dependency) should be told not to do anything to installed version
+ # of docker, we handle this separately during upgrade. (the inventory may have a
+ # docker_version defined, we don't want to actually do it until later)
+ docker_protect_installed_version: True
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_control_plane_running
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_docker_upgrade_targets.yml
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/gate_checks.yml
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/backup_etcd.yml
diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml
index c7d7eb3c6..d9c82d8dc 100644
--- a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml
+++ b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml
@@ -1,4 +1,9 @@
---
+#
+# Node Upgrade Playbook
+#
+# Upgrades nodes only, but requires the control plane to have already been upgraded.
+#
- include: ../../../../common/openshift-cluster/upgrades/init.yml
# Configure the upgrade target for the common upgrade tasks:
@@ -7,3 +12,45 @@
- set_fact:
openshift_upgrade_target: "{{ '1.3' if deployment_type == 'origin' else '3.3' }}"
openshift_upgrade_min: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}"
+
+# Pre-upgrade
+- include: ../initialize_facts.yml
+
+- name: Update repos and initialize facts on all hosts
+ hosts: oo_nodes_to_config
+ roles:
+ - openshift_repos
+
+- name: Set openshift_no_proxy_internal_hostnames
+ hosts: oo_masters_to_config:oo_nodes_to_config
+ tasks:
+ - set_fact:
+ openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config']
+ | union(groups['oo_masters_to_config'])
+ | union(groups['oo_etcd_to_config'] | default([])))
+ | oo_collect('openshift.common.hostname') | default([]) | join (',')
+ }}"
+ when: "{{ (openshift_http_proxy is defined or openshift_https_proxy is defined) and
+ openshift_generate_no_proxy_hosts | default(True) | bool }}"
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_inventory_vars.yml
+
+- include: ../initialize_openshift_version.yml
+ vars:
+ # Request specific openshift_release and let the openshift_version role handle converting this
+ # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if
+ # defined, and overriding the normal behavior of protecting the installed version
+ openshift_release: "{{ openshift_upgrade_target }}"
+ openshift_protect_installed_version: False
+ # Docker role (a dependency) should be told not to do anything to installed version
+ # of docker, we handle this separately during upgrade. (the inventory may have a
+ # docker_version defined, we don't want to actually do it until later)
+ docker_protect_installed_version: True
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_control_plane_running
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/verify_docker_upgrade_targets.yml
+
+- include: ../../../../common/openshift-cluster/upgrades/pre/gate_checks.yml