diff --git a/_topic_map.yml b/_topic_map.yml index 22a8157c9f..fbdae276ca 100644 --- a/_topic_map.yml +++ b/_topic_map.yml @@ -216,6 +216,8 @@ Topics: File: ipi-install-prerequisites - Name: Setting up the environment for an OpenShift installation File: ipi-install-installation-workflow + - Name: Expanding the cluster + File: ipi-install-expanding-the-cluster - Name: Troubleshooting File: ipi-install-troubleshooting - Name: Installing on IBM Z and LinuxONE diff --git a/installing/installing_bare_metal_ipi/ipi-install-expanding-the-cluster.adoc b/installing/installing_bare_metal_ipi/ipi-install-expanding-the-cluster.adoc new file mode 100644 index 0000000000..0b5ec9936b --- /dev/null +++ b/installing/installing_bare_metal_ipi/ipi-install-expanding-the-cluster.adoc @@ -0,0 +1,11 @@ +[id="ipi-install-expanding-the-cluster"] += Expanding the cluster +//include::modules/common-attributes.adoc[] +//:release:4.6 +:context: ipi-install + +After deploying an installer-provisioned {product-title} cluster, you can use the following procedures to expand the number of worker nodes. Ensure that each prospective worker node meets the prerequisites. + +include::modules/ipi-install-preparing-the-bare-metal-node.adoc[leveloffset=+1] + +include::modules/ipi-install-provisioning-the-bare-metal-node.adoc[leveloffset=+1] diff --git a/modules/ipi-install-preparing-the-bare-metal-node.adoc b/modules/ipi-install-preparing-the-bare-metal-node.adoc new file mode 100644 index 0000000000..a1cdcd9dba --- /dev/null +++ b/modules/ipi-install-preparing-the-bare-metal-node.adoc @@ -0,0 +1,124 @@ +// This is included in the following assemblies: +// +// ipi-install-expanding-the-cluster.adoc + +[id='preparing-the-bare-metal-node_{context}'] + += Preparing the bare metal node + +Preparing the bare metal node requires executing the following procedure from the provisioner node. + +.Procedure + +. Get the `oc` binary, if needed. It should already exist on the provisioner node. ++ +[source,bash] +---- +[kni@provisioner ~]$ curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/$VERSION/openshift-client-linux.tar.gz | tar zxvf - oc +---- ++ +[source,bash] +---- +[kni@provisioner ~]$ sudo cp oc /usr/local/bin +---- + +. Install the `ipmitool`. ++ +[source,bash] +---- +[kni@provisioner ~]$ sudo dnf install -y OpenIPMI ipmitool +---- + +. Power off the bare metal node and ensure it is off. ++ +[source,bash] +---- +[kni@provisioner ~]$ ipmitool -I lanplus -U -P -H power off +---- ++ +Where `` is the IP address of the bare metal node's base board management controller. ++ +[source,bash] +---- +[kni@provisioner ~]$ ipmitool -I lanplus -U -P -H power status +---- ++ +[source,bash] +---- +Chassis Power is off +---- + +. Retrieve the username and password of the bare metal node's baseboard management controller. Then, create `base64` strings from the username and password. In the following example, the username is `root` and the password is `calvin`. ++ +[source,bash] +---- +[kni@provisioner ~]$ echo -ne "root" | base64 +---- ++ +[source,bash] +---- +[kni@provisioner ~]$ echo -ne "calvin" | base64 +---- + +. Create a configuration file for the bare metal node. ++ +[source,bash] +---- +[kni@provisioner ~]$ vim bmh.yaml +---- ++ +[source,yaml] +---- +--- +apiVersion: v1 +kind: Secret +metadata: + name: openshift-worker--bmc-secret +type: Opaque +data: + username: + password: +--- +apiVersion: metal3.io/v1alpha1 +kind: BareMetalHost +metadata: + name: openshift-worker- +spec: + online: true + bootMACAddress: + bmc: + address: ipmi:// + credentialsName: openshift-worker--bmc-secret +---- ++ +Replace `` for the worker number of bare metal node in two `name` fields and `credentialsName` field. Replace `` with the `base64` string of the username. Replace `` with the `base64` string of the password. Replace `` with the MAC address of the bare metal node's first NIC. Replace `` with the IP address of the bare metal node's baseboard management controller. + +. Create the bare metal node. ++ +[source,bash] +---- +[kni@provisioner ~]$ oc -n openshift-machine-api create -f bmh.yaml +---- ++ +[source,bash] +---- +secret/openshift-worker--bmc-secret created +baremetalhost.metal3.io/openshift-worker- created +---- ++ +Where `` will be the worker number. + +. Power up and inspect the bare metal node. ++ +[source,bash] +---- +[kni@provisioner ~]$ oc -n openshift-machine-api get bmh openshift-worker- +---- ++ +Where `` is the worker node number. ++ +[source,bash] +---- +NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR +openshift-worker- OK ready ipmi:// unknown true +---- diff --git a/modules/ipi-install-provisioning-the-bare-metal-node.adoc b/modules/ipi-install-provisioning-the-bare-metal-node.adoc new file mode 100644 index 0000000000..b05aa538e2 --- /dev/null +++ b/modules/ipi-install-provisioning-the-bare-metal-node.adoc @@ -0,0 +1,121 @@ +// This is included in the following assemblies: +// +// ipi-install-expanding-the-cluster.adoc +[id='provisioning-the-bare-metal-node_{context}'] + += Provisioning the bare metal node + +Provisioning the bare metal node requires executing the following procedure from the provisioner node. + +.Procedure + +. Ensure the `PROVISIONING STATUS` is `ready` before provisioning the bare metal node. ++ +[source,bash] +---- +[kni@provisioner ~]$ oc -n openshift-machine-api get bmh openshift-worker- +---- ++ +Where `` is the worker node number. ++ +[source,bash] +---- +NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR +openshift-worker- OK ready ipmi:// unknown true +---- + +. Get a count of the number of worker nodes. +[source,bash] ++ +---- +[kni@provisioner ~]$ oc get nodes +---- ++ +[source,bash] +---- +NAME STATUS ROLES AGE VERSION +provisioner.openshift.example.com Ready master 30h v1.16.2 +openshift-master-1.openshift.example.com Ready master 30h v1.16.2 +openshift-master-2.openshift.example.com Ready master 30h v1.16.2 +openshift-master-3.openshift.example.com Ready master 30h v1.16.2 +openshift-worker-0.openshift.example.com Ready master 30h v1.16.2 +openshift-worker-1.openshift.example.com Ready master 30h v1.16.2 +---- + +. Get the machine set. ++ +[source,bash] +---- +[kni@provisioner ~]$ oc get machinesets -n openshift-machine-api +---- ++ +[source,bash] +---- +NAME DESIRED CURRENT READY AVAILABLE AGE +... +openshift-worker-0.example.com 1 1 1 1 55m +openshift-worker-1.example.com 1 1 1 1 55m +---- + +. Increase the number of worker nodes by one. ++ +[source,bash] +---- +[kni@provisioner ~]$ oc scale --replicas= machineset -n openshift-machine-api +---- ++ +Replace `` with the new number of worker nodes. Replace `` with the name of the machine set from the previous step. + +. Check the status of the bare metal node. ++ +[source,bash] +---- +[kni@provisioner ~]$ oc -n openshift-machine-api get bmh openshift-worker- +---- ++ +Where `` is the worker node number. The status changes from `ready` to `provisioning`. ++ +[source,bash] +---- +NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR +openshift-worker- OK provisioning openshift-worker--65tjz ipmi:// unknown true +---- ++ +The `provisioning` status remains until the {product-title} cluster provisions the node. This can take 30 minutes or more. Once complete, the status will change to `provisioned`. ++ +[source,bash] +---- +NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR +openshift-worker- OK provisioned openshift-worker--65tjz ipmi:// unknown true +---- + +. Once provisioned, ensure the bare metal node is ready. ++ +[source,bash] +---- +[kni@provisioner ~]$ oc get nodes +---- ++ +[source,bash] +---- +NAME STATUS ROLES AGE VERSION +provisioner.openshift.example.com Ready master 30h v1.16.2 +openshift-master-1.openshift.example.com Ready master 30h v1.16.2 +openshift-master-2.openshift.example.com Ready master 30h v1.16.2 +openshift-master-3.openshift.example.com Ready master 30h v1.16.2 +openshift-worker-0.openshift.example.com Ready master 30h v1.16.2 +openshift-worker-1.openshift.example.com Ready master 30h v1.16.2 +openshift-worker-.openshift.example.com Ready worker 3m27s v1.16.2 +---- ++ +You can also check the kubelet. ++ +[source,bash] +---- +[kni@provisioner ~]$ ssh openshift-worker- +---- ++ +[source,bash] +---- +[kni@openshift-worker-]$ journalctl -fu kubelet +----