mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
66 lines
2.0 KiB
Plaintext
66 lines
2.0 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * machine_management/adding-rhel-compute.adoc
|
|
|
|
[id="rhel-adding-node_{context}"]
|
|
= Adding a RHEL compute machine to your cluster
|
|
|
|
You can add compute machines that use Red Hat Enterprise Linux as the operating
|
|
system to an {product-title} {product-version} cluster.
|
|
|
|
.Prerequisites
|
|
|
|
* You installed the required packages and performed the necessary configuration
|
|
on the machine that you run the playbook on.
|
|
* You prepared the RHEL hosts for installation.
|
|
|
|
.Procedure
|
|
|
|
Perform the following steps on the machine that you prepared to run the
|
|
playbook:
|
|
|
|
. Extract the pull secret for your cluster:
|
|
+
|
|
----
|
|
$ oc -n openshift-config get -o jsonpath='{.data.\.dockerconfigjson}' secret pull-secret | base64 -d | jq .
|
|
----
|
|
|
|
. Save the pull secret in a file that is named `pull-secret.txt`.
|
|
|
|
. Create an Ansible inventory file that is named `/<path>/inventory/hosts` that
|
|
defines your compute machine hosts and required variables:
|
|
+
|
|
----
|
|
[all:vars]
|
|
ansible_user=root <1>
|
|
#ansible_become=True <2>
|
|
|
|
openshift_kubeconfig_path="~/.kube/config" <3>
|
|
openshift_pull_secret_path="~/pull-secret.txt" <4>
|
|
|
|
[new_workers] <5>
|
|
mycluster-worker-0.example.com
|
|
mycluster-worker-1.example.com
|
|
----
|
|
<1> Specify the user name that runs the Ansible tasks on the remote compute
|
|
machines.
|
|
<2> If you do not specify `root` for the `ansible_user`, you must set `ansible_become`
|
|
to `True` and assign the user sudo permissions.
|
|
<3> Specify the path to the `kubeconfig` file for your cluster.
|
|
<4> Specify the path to the file that contains the pull secret for the image
|
|
registry for your cluster.
|
|
<5> List each RHEL machine to add to your cluster. You must provide the
|
|
fully-qualified domain name for each host. This name is the host name that the
|
|
cluster uses to access the machine, so set the correct public or private name
|
|
to access the machine.
|
|
|
|
. Run the playbook:
|
|
+
|
|
----
|
|
$ cd /usr/share/ansible/openshift-ansible
|
|
$ ansible-playbook -i /<path>/inventory/hosts playbooks/scaleup.yml <1>
|
|
----
|
|
<1> For `<path>`, specify the path to the Ansible inventory file
|
|
that you created.
|
|
|