upgrade.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ---
  2. #
  3. # Full Control Plane + Nodes Upgrade
  4. #
  5. - import_playbook: ../init.yml
  6. tags:
  7. - pre_upgrade
  8. - name: Configure the upgrade target for the common upgrade tasks
  9. hosts: oo_all_hosts
  10. tags:
  11. - pre_upgrade
  12. tasks:
  13. - set_fact:
  14. openshift_upgrade_target: '3.7'
  15. openshift_upgrade_min: '3.6'
  16. - import_playbook: ../pre/config.yml
  17. vars:
  18. l_upgrade_repo_hosts: "oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config:oo_lb_to_config"
  19. l_upgrade_no_proxy_hosts: "oo_masters_to_config:oo_nodes_to_upgrade"
  20. l_upgrade_health_check_hosts: "oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config"
  21. l_upgrade_verify_targets_hosts: "oo_masters_to_config:oo_nodes_to_upgrade"
  22. l_upgrade_docker_target_hosts: "oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config"
  23. l_upgrade_excluder_hosts: "oo_nodes_to_config:oo_masters_to_config"
  24. openshift_protect_installed_version: False
  25. - import_playbook: validator.yml
  26. - name: Flag pre-upgrade checks complete for hosts without errors
  27. hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config
  28. tasks:
  29. - set_fact:
  30. pre_upgrade_complete: True
  31. # Pre-upgrade completed
  32. - import_playbook: ../upgrade_control_plane.yml
  33. vars:
  34. master_config_hook: "v3_7/master_config_upgrade.yml"
  35. # this must occur after the control plane is upgraded because systemd service
  36. # names are changed
  37. - name: Configure API aggregation on masters
  38. hosts: oo_masters_to_config
  39. serial: 1
  40. roles:
  41. - role: openshift_facts
  42. tasks:
  43. - include_tasks: ../../../../openshift-master/private/tasks/wire_aggregator.yml
  44. # All controllers must be stopped at the same time then restarted
  45. - name: Cycle all controller services to force new leader election mode
  46. hosts: oo_masters_to_config
  47. gather_facts: no
  48. roles:
  49. - role: openshift_facts
  50. tasks:
  51. - name: Stop {{ openshift_service_type }}-master-controllers
  52. systemd:
  53. name: "{{ openshift_service_type }}-master-controllers"
  54. state: stopped
  55. - name: Start {{ openshift_service_type }}-master-controllers
  56. systemd:
  57. name: "{{ openshift_service_type }}-master-controllers"
  58. state: started
  59. - import_playbook: ../upgrade_nodes.yml
  60. - import_playbook: ../post_control_plane.yml