1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-07 09:46:53 +01:00
Files
openshift-docs/modules/rhel-adding-more-nodes.adoc
2020-09-10 15:58:55 -04:00

76 lines
2.3 KiB
Plaintext

// Module included in the following assemblies:
//
// * machine_management/user_provisioned/more-rhel-compute.adoc
[id="rhel-adding-more-nodes_{context}"]
= Adding more RHEL compute machines to your cluster
You can add more compute machines that use Red Hat Enterprise Linux as the operating
system to an {product-title} {product-version} cluster.
.Prerequisites
* Your {product-title} cluster already contains RHEL compute nodes.
* The `hosts` file
that you used to add the first RHEL compute machines to your cluster is on the
machine that you use the run the playbook.
* The machine that you run the playbook on must be able to access all of the
RHEL hosts. You can use any method that your company allows, including a
bastion with an SSH proxy or a VPN.
* The `kubeconfig` file for the cluster and the installation program that you
used to install the cluster are on the machine that you use the run the playbook.
* You must prepare the RHEL hosts for installation.
* Configure a user on the machine that you run the playbook on that has SSH
access to all of the RHEL hosts.
* If you use SSH key-based authentication, you must manage the key with an
SSH agent.
* Install the OpenShift CLI (`oc`)
on the machine that you run the playbook on.
.Procedure
. Open the Ansible inventory file at `/<path>/inventory/hosts` that defines your
compute machine hosts and required variables.
. Rename the `[new_workers]` section of the file to `[workers]`.
. Add a `[new_workers]` section to the file and define the fully-qualified
domain names for each new host. The file resembles the following example:
+
----
[all:vars]
ansible_user=root
#ansible_become=True
openshift_kubeconfig_path="~/.kube/config"
[workers]
mycluster-rhel7-0.example.com
mycluster-rhel7-1.example.com
[new_workers]
mycluster-rhel7-2.example.com
mycluster-rhel7-3.example.com
----
+
In this example, the `mycluster-rhel7-0.example.com` and
`mycluster-rhel7-1.example.com` machines are in the cluster and you add the
`mycluster-rhel7-2.example.com` and `mycluster-rhel7-3.example.com` machines.
. Navigate to the Ansible playbook directory:
+
[source,terminal]
----
$ cd /usr/share/ansible/openshift-ansible
----
. Run the scaleup playbook:
+
[source,terminal]
----
$ ansible-playbook -i /<path>/inventory/hosts playbooks/scaleup.yml <1>
----
<1> For `<path>`, specify the path to the Ansible inventory file
that you created.