diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2016-09-19 14:57:13 -0300 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2016-09-29 10:26:01 -0300 |
commit | 0e7e7f6b45ace8a3a9516c8800e5cf84d7aa14fa (patch) | |
tree | 44b6aaf5d466d584194ffaf3c14ba8402a89aca9 /playbooks/byo/openshift-cluster | |
parent | 67fbf22ec96d07b8646de701b60e2718a4d6bef3 (diff) | |
download | openshift-0e7e7f6b45ace8a3a9516c8800e5cf84d7aa14fa.tar.gz openshift-0e7e7f6b45ace8a3a9516c8800e5cf84d7aa14fa.tar.bz2 openshift-0e7e7f6b45ace8a3a9516c8800e5cf84d7aa14fa.tar.xz openshift-0e7e7f6b45ace8a3a9516c8800e5cf84d7aa14fa.zip |
Allow filtering nodes to upgrade by label.
Diffstat (limited to 'playbooks/byo/openshift-cluster')
4 files changed, 16 insertions, 16 deletions
diff --git a/playbooks/byo/openshift-cluster/upgrades/docker/docker_upgrade.yml b/playbooks/byo/openshift-cluster/upgrades/docker/docker_upgrade.yml index 1fa32570c..9be6becc1 100644 --- a/playbooks/byo/openshift-cluster/upgrades/docker/docker_upgrade.yml +++ b/playbooks/byo/openshift-cluster/upgrades/docker/docker_upgrade.yml @@ -1,6 +1,6 @@ - name: Check for appropriate Docker versions - hosts: oo_masters_to_config:oo_nodes_to_config:oo_etcd_to_config + hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config roles: - openshift_facts tasks: @@ -19,7 +19,7 @@ # don't want to carry on, potentially taking out every node. The playbook can safely be re-run # and will not take any action on a node already running the requested docker version. - name: Evacuate and upgrade nodes - hosts: oo_masters_to_config:oo_nodes_to_config:oo_etcd_to_config + hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config serial: 1 any_errors_fatal: true tasks: @@ -27,13 +27,13 @@ command: > {{ openshift.common.admin_binary }} manage-node {{ openshift.node.nodename }} --schedulable=false delegate_to: "{{ groups.oo_first_master.0 }}" - when: l_docker_upgrade is defined and l_docker_upgrade | bool and inventory_hostname in groups.oo_nodes_to_config + when: l_docker_upgrade is defined and l_docker_upgrade | bool and inventory_hostname in groups.oo_nodes_to_upgrade - name: Evacuate Node for Kubelet upgrade command: > {{ openshift.common.admin_binary }} manage-node {{ openshift.node.nodename }} --evacuate --force delegate_to: "{{ groups.oo_first_master.0 }}" - when: l_docker_upgrade is defined and l_docker_upgrade | bool and inventory_hostname in groups.oo_nodes_to_config + when: l_docker_upgrade is defined and l_docker_upgrade | bool and inventory_hostname in groups.oo_nodes_to_upgrade - include: ../../../../common/openshift-cluster/upgrades/docker/upgrade.yml when: l_docker_upgrade is defined and l_docker_upgrade | bool @@ -43,5 +43,5 @@ {{ openshift.common.admin_binary }} manage-node {{ openshift.node.nodename }} --schedulable=true delegate_to: "{{ groups.oo_first_master.0 }}" when: openshift.node.schedulable | bool - when: l_docker_upgrade is defined and l_docker_upgrade | bool and inventory_hostname in groups.oo_nodes_to_config and openshift.node.schedulable | bool + when: l_docker_upgrade is defined and l_docker_upgrade | bool and inventory_hostname in groups.oo_nodes_to_upgrade and openshift.node.schedulable | bool diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml index 87a8ef66c..f704dfa7c 100644 --- a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml +++ b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml @@ -12,15 +12,16 @@ openshift_upgrade_min: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}" # Pre-upgrade -- include: ../../../../common/openshift-cluster/initialize_facts.yml + +- include: ../../../../common/openshift-cluster/upgrades/initialize_nodes_to_upgrade.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 + hosts: oo_masters_to_config:oo_nodes_to_upgrade: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 + hosts: oo_masters_to_config:oo_nodes_to_upgrade tasks: - set_fact: openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] @@ -66,7 +67,7 @@ # before we get into the serialized upgrade process which will then remove # remaining images if possible. - name: Cleanup unused Docker images - hosts: oo_masters_to_config:oo_nodes_to_config:oo_etcd_to_config + hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config tasks: - include: ../../../../common/openshift-cluster/upgrades/cleanup_unused_images.yml diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_control_plane.yml b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_control_plane.yml index bcc304141..7030c2ce0 100644 --- a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_control_plane.yml +++ b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_control_plane.yml @@ -21,7 +21,6 @@ openshift_upgrade_min: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}" # Pre-upgrade -- include: ../../../../common/openshift-cluster/initialize_facts.yml - name: Update repos on control plane hosts hosts: oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config @@ -29,7 +28,7 @@ - openshift_repos - name: Set openshift_no_proxy_internal_hostnames - hosts: oo_masters_to_config:oo_nodes_to_config + hosts: oo_masters_to_config:oo_nodes_to_upgrade tasks: - set_fact: openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] 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 e79df1a02..dcce0ff04 100644 --- a/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml +++ b/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml @@ -14,18 +14,18 @@ openshift_upgrade_min: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}" # Pre-upgrade -- include: ../../../../common/openshift-cluster/initialize_facts.yml +- include: ../../../../common/openshift-cluster/upgrades/initialize_nodes_to_upgrade.yml - name: Update repos on nodes - hosts: oo_masters_to_config:oo_nodes_to_config:oo_etcd_to_config:oo_lb_to_config + hosts: oo_masters_to_config:oo_nodes_to_upgrade: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 + hosts: oo_masters_to_config:oo_nodes_to_upgrade tasks: - set_fact: - openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] + openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_upgrade'] | union(groups['oo_masters_to_config']) | union(groups['oo_etcd_to_config'] | default([]))) | oo_collect('openshift.common.hostname') | default([]) | join (',') @@ -72,7 +72,7 @@ # before we get into the serialized upgrade process which will then remove # remaining images if possible. - name: Cleanup unused Docker images - hosts: oo_nodes_to_config + hosts: oo_nodes_to_upgrade tasks: - include: ../../../../common/openshift-cluster/upgrades/cleanup_unused_images.yml |