mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 21:46:22 +01:00
54 lines
1.7 KiB
Plaintext
54 lines
1.7 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:
|
|
|
|
. 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>
|
|
|
|
[new_workers] <4>
|
|
mycluster-rhel7-0.example.com
|
|
mycluster-rhel7-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> 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.
|