mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
155 lines
5.5 KiB
Plaintext
155 lines
5.5 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * updating/updating_a_cluster/updating-cluster-rhel-compute.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="rhel-compute-updating-minor_{context}"]
|
|
= Updating {op-system-base} compute machines in your cluster
|
|
|
|
After you update your cluster, you must update the {op-system-base-full} compute machines in your cluster.
|
|
|
|
[IMPORTANT]
|
|
====
|
|
{op-system-base-full} versions 8.6 and later are supported for {op-system-base} compute machines.
|
|
====
|
|
|
|
You can also update your compute machines to another minor version of {product-title} if you are using {op-system-base} as the operating system. You do not need to exclude any RPM packages from {op-system-base} when performing a minor version update.
|
|
|
|
[IMPORTANT]
|
|
====
|
|
You cannot update {op-system-base} 7 compute machines to {op-system-base} 8. You must deploy new {op-system-base} 8 hosts, and the old {op-system-base} 7 hosts should be removed.
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
* You updated your cluster.
|
|
+
|
|
[IMPORTANT]
|
|
====
|
|
Because the {op-system-base} machines require assets that are generated by the cluster to complete the update process, you must update the cluster before you update the {op-system-base} worker machines in it.
|
|
====
|
|
|
|
* You have access to the local machine that you used to add the {op-system-base} compute machines to your cluster. You must have access to the `hosts` Ansible inventory file that defines your {op-system-base} machines and the `upgrade` playbook.
|
|
|
|
* For updates to a minor version, the RPM repository is using the same version of {product-title} that is running on your cluster.
|
|
|
|
.Procedure
|
|
|
|
. Stop and disable firewalld on the host:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# systemctl disable --now firewalld.service
|
|
----
|
|
+
|
|
[NOTE]
|
|
====
|
|
By default, the base OS RHEL with "Minimal" installation option enables firewalld service. Having the firewalld service enabled on your host prevents you from accessing {product-title} logs on the worker. Do not enable firewalld later if you wish to continue accessing {product-title} logs on the worker.
|
|
====
|
|
|
|
. Enable the repositories that are required for {product-title} {product-version}:
|
|
.. On the machine that you run the Ansible playbooks, update the required repositories:
|
|
+
|
|
[source,terminal,subs="attributes+"]
|
|
----
|
|
# subscription-manager repos --disable=rhocp-4.17-for-rhel-8-x86_64-rpms \
|
|
--enable=rhocp-{product-version}-for-rhel-8-x86_64-rpms
|
|
----
|
|
+
|
|
[IMPORTANT]
|
|
====
|
|
As of {product-title} 4.11, the Ansible playbooks are provided only for {op-system-base} 8. If a {op-system-base} 7 system was used as a host for the {product-title} 4.10 Ansible playbooks, you must either update the Ansible host to {op-system-base} 8, or create a new Ansible host on a {op-system-base} 8 system and copy over the inventories from the old Ansible host.
|
|
====
|
|
|
|
.. On the machine that you run the Ansible playbooks, update the Ansible package:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# yum swap ansible ansible-core
|
|
----
|
|
|
|
.. On the machine that you run the Ansible playbooks, update the required packages, including `openshift-ansible`:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# yum update openshift-ansible openshift-clients
|
|
----
|
|
|
|
.. On each {op-system-base} compute node, update the required repositories:
|
|
+
|
|
[source,terminal,subs="attributes+"]
|
|
----
|
|
# subscription-manager repos --disable=rhocp-4.17-for-rhel-8-x86_64-rpms \
|
|
--enable=rhocp-{product-version}-for-rhel-8-x86_64-rpms
|
|
----
|
|
|
|
. Update a {op-system-base} worker machine:
|
|
|
|
.. Review your Ansible inventory file at `/<path>/inventory/hosts` and update its contents so that the {op-system-base} 8 machines are listed in the `[workers]` section, as shown in the following example:
|
|
+
|
|
----
|
|
[all:vars]
|
|
ansible_user=root
|
|
#ansible_become=True
|
|
|
|
openshift_kubeconfig_path="~/.kube/config"
|
|
|
|
[workers]
|
|
mycluster-rhel8-0.example.com
|
|
mycluster-rhel8-1.example.com
|
|
mycluster-rhel8-2.example.com
|
|
mycluster-rhel8-3.example.com
|
|
----
|
|
|
|
.. Change to the `openshift-ansible` directory:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ cd /usr/share/ansible/openshift-ansible
|
|
----
|
|
|
|
.. Run the `upgrade` playbook:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ ansible-playbook -i /<path>/inventory/hosts playbooks/upgrade.yml <1>
|
|
----
|
|
<1> For `<path>`, specify the path to the Ansible inventory file that you created.
|
|
+
|
|
[NOTE]
|
|
====
|
|
The `upgrade` playbook only updates the {product-title} packages. It does not update the operating system packages.
|
|
====
|
|
|
|
. After you update all of the workers, confirm that all of your cluster nodes have updated to the new version:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# oc get node
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAME STATUS ROLES AGE VERSION
|
|
mycluster-control-plane-0 Ready master 145m v1.33.4
|
|
mycluster-control-plane-1 Ready master 145m v1.33.4
|
|
mycluster-control-plane-2 Ready master 145m v1.33.4
|
|
mycluster-rhel8-0 Ready worker 98m v1.33.4
|
|
mycluster-rhel8-1 Ready worker 98m v1.33.4
|
|
mycluster-rhel8-2 Ready worker 98m v1.33.4
|
|
mycluster-rhel8-3 Ready worker 98m v1.33.4
|
|
----
|
|
|
|
. Optional: Update the operating system packages that were not updated by the `upgrade` playbook. To update packages that are not on {product-version}, use the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# yum update
|
|
----
|
|
+
|
|
[NOTE]
|
|
====
|
|
You do not need to exclude RPM packages if you are using the same RPM repository that you used when you installed {product-version}.
|
|
====
|