upgrade_control_plane.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. ---
  2. #
  3. # Control Plane Upgrade Playbook
  4. #
  5. # Upgrades masters and Docker (only on standalone etcd hosts)
  6. #
  7. # This upgrade does not include:
  8. # - node service running on masters
  9. # - docker running on masters
  10. # - node service running on dedicated nodes
  11. #
  12. # You can run the upgrade_nodes.yml playbook after this to upgrade these components separately.
  13. #
  14. - import_playbook: ../init.yml
  15. vars:
  16. l_upgrade_no_switch_firewall_hosts: "oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config"
  17. l_init_fact_hosts: "oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config"
  18. l_base_packages_hosts: "oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config"
  19. - name: Configure the upgrade target for the common upgrade tasks 3.10
  20. hosts: oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config
  21. tasks:
  22. - set_fact:
  23. openshift_upgrade_target: '3.10'
  24. openshift_upgrade_min: '3.9'
  25. openshift_release: '3.10'
  26. - import_playbook: ../pre/config.yml
  27. # These vars a meant to exclude oo_nodes from plays that would otherwise include
  28. # them by default.
  29. vars:
  30. l_openshift_version_set_hosts: "oo_etcd_to_config:oo_masters_to_config:!oo_first_master"
  31. l_openshift_version_check_hosts: "oo_masters_to_config:!oo_first_master"
  32. l_upgrade_repo_hosts: "oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config"
  33. l_upgrade_no_proxy_hosts: "oo_masters_to_config"
  34. l_upgrade_health_check_hosts: "oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config"
  35. l_upgrade_verify_targets_hosts: "oo_masters_to_config"
  36. l_upgrade_docker_target_hosts: "oo_masters_to_config:oo_etcd_to_config"
  37. l_upgrade_excluder_hosts: "oo_masters_to_config"
  38. openshift_protect_installed_version: False
  39. - name: Flag pre-upgrade checks complete for hosts without errors
  40. hosts: oo_masters_to_config:oo_etcd_to_config
  41. tasks:
  42. - set_fact:
  43. pre_upgrade_complete: True
  44. - import_playbook: label_nodes.yml
  45. # To upgrade, we need masters to be capable of signing certificates
  46. - hosts: oo_masters
  47. serial: 1
  48. tasks:
  49. - name: Enable core bootstrapping components
  50. include_tasks: ../../../../openshift-master/private/tasks/enable_bootstrap.yml
  51. - name: Place shim commands on the masters before we begin the upgrade
  52. import_role:
  53. name: openshift_control_plane
  54. tasks_from: static_shim
  55. # TODO: need to verify settings about the bootstrap configs
  56. # 1. Does network policy match the master config
  57. - name: Configure components that must be available prior to upgrade
  58. hosts: oo_first_master
  59. pre_tasks:
  60. - name: Enable core bootstrapping components
  61. include_tasks: ../../../../openshift-master/private/tasks/enable_bootstrap_config.yml
  62. - name: Ensure the master bootstrap config has bootstrapping config
  63. import_role:
  64. name: openshift_node_group
  65. tasks_from: upgrade
  66. - name: Enable node configuration reconciliation
  67. import_role:
  68. name: openshift_node_group
  69. tasks_from: sync
  70. roles:
  71. - role: openshift_sdn
  72. when: openshift_use_openshift_sdn | default(True) | bool
  73. - name: Update master nodes
  74. hosts: oo_masters
  75. serial: 1
  76. tasks:
  77. - import_role:
  78. name: openshift_node
  79. tasks_from: upgrade_pre
  80. - import_role:
  81. name: openshift_node
  82. tasks_from: upgrade
  83. vars:
  84. r_node_dynamic_config_name: "{{ openshift_node_group_name | default('node-config-master') }}"
  85. - import_playbook: ../upgrade_control_plane.yml
  86. vars:
  87. openshift_release: '3.10'
  88. - import_playbook: ../post_control_plane.yml
  89. - hosts: oo_masters
  90. tasks:
  91. - import_role:
  92. name: openshift_web_console
  93. tasks_from: remove_old_asset_config