Skip to content

Commit 00600ce

Browse files
authored
Merge pull request #27424 from johnwilkins/ipi-baremetal-install-4.6-sprint6
Added an assembly and modules for expanding the cluster.
2 parents f35cf56 + 12e1cb3 commit 00600ce

File tree

4 files changed

+258
-0
lines changed

4 files changed

+258
-0
lines changed

_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ Topics:
216216
File: ipi-install-prerequisites
217217
- Name: Setting up the environment for an OpenShift installation
218218
File: ipi-install-installation-workflow
219+
- Name: Expanding the cluster
220+
File: ipi-install-expanding-the-cluster
219221
- Name: Troubleshooting
220222
File: ipi-install-troubleshooting
221223
- Name: Installing on IBM Z and LinuxONE
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[id="ipi-install-expanding-the-cluster"]
2+
= Expanding the cluster
3+
//include::modules/common-attributes.adoc[]
4+
//:release:4.6
5+
:context: ipi-install
6+
7+
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.
8+
9+
include::modules/ipi-install-preparing-the-bare-metal-node.adoc[leveloffset=+1]
10+
11+
include::modules/ipi-install-provisioning-the-bare-metal-node.adoc[leveloffset=+1]
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
// This is included in the following assemblies:
2+
//
3+
// ipi-install-expanding-the-cluster.adoc
4+
5+
[id='preparing-the-bare-metal-node_{context}']
6+
7+
= Preparing the bare metal node
8+
9+
Preparing the bare metal node requires executing the following procedure from the provisioner node.
10+
11+
.Procedure
12+
13+
. Get the `oc` binary, if needed. It should already exist on the provisioner node.
14+
+
15+
[source,bash]
16+
----
17+
[kni@provisioner ~]$ curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview/$VERSION/openshift-client-linux.tar.gz | tar zxvf - oc
18+
----
19+
+
20+
[source,bash]
21+
----
22+
[kni@provisioner ~]$ sudo cp oc /usr/local/bin
23+
----
24+
25+
. Install the `ipmitool`.
26+
+
27+
[source,bash]
28+
----
29+
[kni@provisioner ~]$ sudo dnf install -y OpenIPMI ipmitool
30+
----
31+
32+
. Power off the bare metal node and ensure it is off.
33+
+
34+
[source,bash]
35+
----
36+
[kni@provisioner ~]$ ipmitool -I lanplus -U <user> -P <password> -H <management-server-ip> power off
37+
----
38+
+
39+
Where `<management-server-ip>` is the IP address of the bare metal node's base board management controller.
40+
+
41+
[source,bash]
42+
----
43+
[kni@provisioner ~]$ ipmitool -I lanplus -U <user> -P <password> -H <management-server-ip> power status
44+
----
45+
+
46+
[source,bash]
47+
----
48+
Chassis Power is off
49+
----
50+
51+
. 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`.
52+
+
53+
[source,bash]
54+
----
55+
[kni@provisioner ~]$ echo -ne "root" | base64
56+
----
57+
+
58+
[source,bash]
59+
----
60+
[kni@provisioner ~]$ echo -ne "calvin" | base64
61+
----
62+
63+
. Create a configuration file for the bare metal node.
64+
+
65+
[source,bash]
66+
----
67+
[kni@provisioner ~]$ vim bmh.yaml
68+
----
69+
+
70+
[source,yaml]
71+
----
72+
---
73+
apiVersion: v1
74+
kind: Secret
75+
metadata:
76+
name: openshift-worker-<num>-bmc-secret
77+
type: Opaque
78+
data:
79+
username: <base64-of-uid>
80+
password: <base64-of-pwd>
81+
---
82+
apiVersion: metal3.io/v1alpha1
83+
kind: BareMetalHost
84+
metadata:
85+
name: openshift-worker-<num>
86+
spec:
87+
online: true
88+
bootMACAddress: <NIC1-mac-address>
89+
bmc:
90+
address: ipmi://<bmc-ip>
91+
credentialsName: openshift-worker-<num>-bmc-secret
92+
----
93+
+
94+
Replace `<num>` for the worker number of bare metal node in two `name` fields and `credentialsName` field. Replace `<base64-of-uid>` with the `base64` string of the username. Replace `<base64-of-pwd>` with the `base64` string of the password. Replace `<NIC1-mac-address>` with the MAC address of the bare metal node's first NIC. Replace `<bmc-ip>` with the IP address of the bare metal node's baseboard management controller.
95+
96+
. Create the bare metal node.
97+
+
98+
[source,bash]
99+
----
100+
[kni@provisioner ~]$ oc -n openshift-machine-api create -f bmh.yaml
101+
----
102+
+
103+
[source,bash]
104+
----
105+
secret/openshift-worker-<num>-bmc-secret created
106+
baremetalhost.metal3.io/openshift-worker-<num> created
107+
----
108+
+
109+
Where `<num>` will be the worker number.
110+
111+
. Power up and inspect the bare metal node.
112+
+
113+
[source,bash]
114+
----
115+
[kni@provisioner ~]$ oc -n openshift-machine-api get bmh openshift-worker-<num>
116+
----
117+
+
118+
Where `<num>` is the worker node number.
119+
+
120+
[source,bash]
121+
----
122+
NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR
123+
openshift-worker-<num> OK ready ipmi://<out-of-band-ip> unknown true
124+
----
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
// This is included in the following assemblies:
2+
//
3+
// ipi-install-expanding-the-cluster.adoc
4+
[id='provisioning-the-bare-metal-node_{context}']
5+
6+
= Provisioning the bare metal node
7+
8+
Provisioning the bare metal node requires executing the following procedure from the provisioner node.
9+
10+
.Procedure
11+
12+
. Ensure the `PROVISIONING STATUS` is `ready` before provisioning the bare metal node.
13+
+
14+
[source,bash]
15+
----
16+
[kni@provisioner ~]$ oc -n openshift-machine-api get bmh openshift-worker-<num>
17+
----
18+
+
19+
Where `<num>` is the worker node number.
20+
+
21+
[source,bash]
22+
----
23+
NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR
24+
openshift-worker-<num> OK ready ipmi://<out-of-band-ip> unknown true
25+
----
26+
27+
. Get a count of the number of worker nodes.
28+
[source,bash]
29+
+
30+
----
31+
[kni@provisioner ~]$ oc get nodes
32+
----
33+
+
34+
[source,bash]
35+
----
36+
NAME STATUS ROLES AGE VERSION
37+
provisioner.openshift.example.com Ready master 30h v1.16.2
38+
openshift-master-1.openshift.example.com Ready master 30h v1.16.2
39+
openshift-master-2.openshift.example.com Ready master 30h v1.16.2
40+
openshift-master-3.openshift.example.com Ready master 30h v1.16.2
41+
openshift-worker-0.openshift.example.com Ready master 30h v1.16.2
42+
openshift-worker-1.openshift.example.com Ready master 30h v1.16.2
43+
----
44+
45+
. Get the machine set.
46+
+
47+
[source,bash]
48+
----
49+
[kni@provisioner ~]$ oc get machinesets -n openshift-machine-api
50+
----
51+
+
52+
[source,bash]
53+
----
54+
NAME DESIRED CURRENT READY AVAILABLE AGE
55+
...
56+
openshift-worker-0.example.com 1 1 1 1 55m
57+
openshift-worker-1.example.com 1 1 1 1 55m
58+
----
59+
60+
. Increase the number of worker nodes by one.
61+
+
62+
[source,bash]
63+
----
64+
[kni@provisioner ~]$ oc scale --replicas=<num> machineset <machineset> -n openshift-machine-api
65+
----
66+
+
67+
Replace `<num>` with the new number of worker nodes. Replace `<machineset>` with the name of the machine set from the previous step.
68+
69+
. Check the status of the bare metal node.
70+
+
71+
[source,bash]
72+
----
73+
[kni@provisioner ~]$ oc -n openshift-machine-api get bmh openshift-worker-<num>
74+
----
75+
+
76+
Where `<num>` is the worker node number. The status changes from `ready` to `provisioning`.
77+
+
78+
[source,bash]
79+
----
80+
NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR
81+
openshift-worker-<num> OK provisioning openshift-worker-<num>-65tjz ipmi://<out-of-band-ip> unknown true
82+
----
83+
+
84+
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`.
85+
+
86+
[source,bash]
87+
----
88+
NAME STATUS PROVISIONING STATUS CONSUMER BMC HARDWARE PROFILE ONLINE ERROR
89+
openshift-worker-<num> OK provisioned openshift-worker-<num>-65tjz ipmi://<out-of-band-ip> unknown true
90+
----
91+
92+
. Once provisioned, ensure the bare metal node is ready.
93+
+
94+
[source,bash]
95+
----
96+
[kni@provisioner ~]$ oc get nodes
97+
----
98+
+
99+
[source,bash]
100+
----
101+
NAME STATUS ROLES AGE VERSION
102+
provisioner.openshift.example.com Ready master 30h v1.16.2
103+
openshift-master-1.openshift.example.com Ready master 30h v1.16.2
104+
openshift-master-2.openshift.example.com Ready master 30h v1.16.2
105+
openshift-master-3.openshift.example.com Ready master 30h v1.16.2
106+
openshift-worker-0.openshift.example.com Ready master 30h v1.16.2
107+
openshift-worker-1.openshift.example.com Ready master 30h v1.16.2
108+
openshift-worker-<num>.openshift.example.com Ready worker 3m27s v1.16.2
109+
----
110+
+
111+
You can also check the kubelet.
112+
+
113+
[source,bash]
114+
----
115+
[kni@provisioner ~]$ ssh openshift-worker-<num>
116+
----
117+
+
118+
[source,bash]
119+
----
120+
[kni@openshift-worker-<num>]$ journalctl -fu kubelet
121+
----

0 commit comments

Comments
 (0)