Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 2. Installing OpenShift on a single node
You can install single-node OpenShift by using either the web-based Assisted Installer or the
coreos-installer
Consider using single-node OpenShift when you want to run a cluster in a low-resource or an isolated environment for testing, troubleshooting, training, or small-scale project purposes.
2.1. Installing single-node OpenShift using the Assisted Installer Link kopierenLink in die Zwischenablage kopiert!
To install OpenShift Container Platform on a single node, use the web-based Assisted Installer wizard to guide you through the process and manage the installation.
See the Assisted Installer for OpenShift Container Platform documentation for details and configuration options.
2.1.1. Generating the discovery ISO with the Assisted Installer Link kopierenLink in die Zwischenablage kopiert!
Installing OpenShift Container Platform on a single node requires a discovery ISO, which the Assisted Installer can generate.
Procedure
- On the administration host, open a browser and navigate to Red Hat OpenShift Cluster Manager.
- Click Create New Cluster to create a new cluster.
- In the Cluster name field, enter a name for the cluster.
In the Base domain field, enter a base domain. For example:
example.comAll DNS records must be subdomains of this base domain and include the cluster name, for example:
<cluster_name>.example.comNoteYou cannot change the base domain or cluster name after cluster installation.
- Select Install single node OpenShift (SNO) and complete the rest of the wizard steps. Download the discovery ISO.
Complete the remaining Assisted Installer wizard steps.
ImportantEnsure that you take note of the discovery ISO URL for installing with virtual media.
If you enable OpenShift Virtualization during this process, you must have a second local storage device of at least 50GiB for your virtual machines.
2.1.2. Installing single-node OpenShift with the Assisted Installer Link kopierenLink in die Zwischenablage kopiert!
Use the Assisted Installer to install the single-node cluster.
Prerequisites
- Ensure that the boot drive order in the server BIOS settings defaults to booting the server from the target installation disk.
Procedure
- Attach the discovery ISO image to the target host.
- Boot the server from the discovery ISO image. The discovery ISO image writes the system configuration to the target installation disk and automatically triggers a server restart.
- On the administration host, return to the browser. Wait for the host to appear in the list of discovered hosts. If necessary, reload the Assisted Clusters page and select the cluster name.
- Complete the install wizard steps. Add networking details, including a subnet from the available subnets. Add the SSH public key if necessary.
- Monitor the installation’s progress. Watch the cluster events. After the installation process finishes writing the operating system image to the server’s hard disk, the server restarts.
Optional: Remove the discovery ISO image.
The server restarts several times automatically, deploying the control plane.
2.2. Installing single-node OpenShift manually Link kopierenLink in die Zwischenablage kopiert!
To install OpenShift Container Platform on a single node, first generate the installation ISO, and then boot the server from the ISO. You can monitor the installation using the
openshift-install
2.2.1. Generating the installation ISO with coreos-installer Link kopierenLink in die Zwischenablage kopiert!
Installing OpenShift Container Platform on a single node requires an installation ISO, which you can generate with the following procedure.
Prerequisites
-
Install .
podman
See "Requirements for installing OpenShift on a single node" for networking requirements, including DNS records.
Procedure
Set the OpenShift Container Platform version:
$ export OCP_VERSION=<ocp_version>1 - 1
- Replace
<ocp_version>with the current version, for example,latest-4.14
Set the host architecture:
$ export ARCH=<architecture>1 - 1
- Replace
<architecture>with the target host architecture, for example,aarch64orx86_64.
Download the OpenShift Container Platform client (
) and make it available for use by entering the following commands:oc$ curl -k https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$OCP_VERSION/openshift-client-linux.tar.gz -o oc.tar.gz$ tar zxf oc.tar.gz$ chmod +x ocDownload the OpenShift Container Platform installer and make it available for use by entering the following commands:
$ curl -k https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$OCP_VERSION/openshift-install-linux.tar.gz -o openshift-install-linux.tar.gz$ tar zxvf openshift-install-linux.tar.gz$ chmod +x openshift-installRetrieve the RHCOS ISO URL by running the following command:
$ export ISO_URL=$(./openshift-install coreos print-stream-json | grep location | grep $ARCH | grep iso | cut -d\" -f4)Download the RHCOS ISO:
$ curl -L $ISO_URL -o rhcos-live.isoPrepare the
file:install-config.yamlapiVersion: v1 baseDomain: <domain>1 compute: - name: worker replicas: 02 controlPlane: name: master replicas: 13 metadata: name: <name>4 networking:5 clusterNetwork: - cidr: 10.128.0.0/14 hostPrefix: 23 machineNetwork: - cidr: 10.0.0.0/166 networkType: OVNKubernetes serviceNetwork: - 172.30.0.0/16 platform: none: {} bootstrapInPlace: installationDisk: /dev/disk/by-id/<disk_id>7 pullSecret: '<pull_secret>'8 sshKey: | <ssh_key>9 - 1
- Add the cluster domain name.
- 2
- Set the
computereplicas to0. This makes the control plane node schedulable. - 3
- Set the
controlPlanereplicas to1. In conjunction with the previouscomputesetting, this setting ensures the cluster runs on a single node. - 4
- Set the
metadataname to the cluster name. - 5
- Set the
networkingdetails. OVN-Kubernetes is the only allowed network plugin type for single-node clusters. - 6
- Set the
cidrvalue to match the subnet of the single-node OpenShift cluster. - 7
- Set the path to the installation disk drive, for example,
/dev/disk/by-id/wwn-0x64cd98f04fde100024684cf3034da5c2. - 8
- Copy the pull secret from Red Hat OpenShift Cluster Manager and add the contents to this configuration setting.
- 9
- Add the public SSH key from the administration host so that you can log in to the cluster after installation.
Generate OpenShift Container Platform assets by running the following commands:
$ mkdir ocp$ cp install-config.yaml ocp$ ./openshift-install --dir=ocp create single-node-ignition-configEmbed the ignition data into the RHCOS ISO by running the following commands:
$ alias coreos-installer='podman run --privileged --pull always --rm \ -v /dev:/dev -v /run/udev:/run/udev -v $PWD:/data \ -w /data quay.io/coreos/coreos-installer:release'$ coreos-installer iso ignition embed -fi ocp/bootstrap-in-place-for-live-iso.ign rhcos-live.isoImportantThe SSL certificates for the RHCOS ISO installation image are only valid for 24 hours. If you use the ISO image to install a node more than 24 hours after creating the image, the installation can fail. To re-create the image after 24 hours, delete the
directory and re-create the OpenShift Container Platform assets.ocp
2.2.2. Monitoring the cluster installation using openshift-install Link kopierenLink in die Zwischenablage kopiert!
Use
openshift-install
Prerequisites
- Ensure that the boot drive order in the server BIOS settings defaults to booting the server from the target installation disk.
Procedure
- Attach the discovery ISO image to the target host.
- Boot the server from the discovery ISO image. The discovery ISO image writes the system configuration to the target installation disk and automatically triggers a server restart.
On the administration host, monitor the installation by running the following command:
$ ./openshift-install --dir=ocp wait-for install-completeOptional: Remove the discovery ISO image.
The server restarts several times while deploying the control plane.
Verification
After the installation is complete, check the environment by running the following command:
$ export KUBECONFIG=ocp/auth/kubeconfig$ oc get nodesExample output
NAME STATUS ROLES AGE VERSION control-plane.example.com Ready master,worker 10m v1.27.3
2.3. Installing single-node OpenShift on cloud providers Link kopierenLink in die Zwischenablage kopiert!
2.3.1. Additional requirements for installing single-node OpenShift on a cloud provider Link kopierenLink in die Zwischenablage kopiert!
The documentation for installer-provisioned installation on cloud providers is based on a high availability cluster consisting of three control plane nodes. When referring to the documentation, consider the differences between the requirements for a single-node OpenShift cluster and a high availability cluster.
- A high availability cluster requires a temporary bootstrap machine, three control plane machines, and at least two compute machines. For a single-node OpenShift cluster, you need only a temporary bootstrap machine and one cloud instance for the control plane node and no compute nodes.
- The minimum resource requirements for high availability cluster installation include a control plane node with 4 vCPUs and 100GB of storage. For a single-node OpenShift cluster, you must have a minimum of 8 vCPUs and 120GB of storage.
-
The setting in the
controlPlane.replicasfile should be set toinstall-config.yaml.1 -
The setting in the
compute.replicasfile should be set toinstall-config.yaml. This makes the control plane node schedulable.0
2.3.2. Supported cloud providers for single-node OpenShift Link kopierenLink in die Zwischenablage kopiert!
The following table contains a list of supported cloud providers and CPU architectures.
| Cloud provider | CPU architecture |
|---|---|
| Amazon Web Service (AWS) | x86_64 and AArch64 |
| Microsoft Azure | x86_64 |
| Google Cloud | x86_64 and AArch64 |
2.3.3. Installing single-node OpenShift on AWS Link kopierenLink in die Zwischenablage kopiert!
Installing a single-node cluster on AWS requires installer-provisioned installation using the "Installing a cluster on AWS with customizations" procedure.
2.3.4. Installing single-node OpenShift on Azure Link kopierenLink in die Zwischenablage kopiert!
Installing a single node cluster on Azure requires installer-provisioned installation using the "Installing a cluster on Azure with customizations" procedure.
2.3.5. Installing single-node OpenShift on Google Cloud Link kopierenLink in die Zwischenablage kopiert!
Installing a single node cluster on Google Cloud requires installer-provisioned installation using the "Installing a cluster on Google Cloud with customizations" procedure.
2.4. Creating a bootable ISO image on a USB drive Link kopierenLink in die Zwischenablage kopiert!
You can install software using a bootable USB drive that contains an ISO image. Booting the server with the USB drive prepares the server for the software installation.
Procedure
- On the administration host, insert a USB drive into a USB port.
Create a bootable USB drive, for example:
# dd if=<path_to_iso> of=<path_to_usb> status=progresswhere:
- <path_to_iso>
-
is the relative path to the downloaded ISO file, for example,
rhcos-live.iso. - <path_to_usb>
-
is the location of the connected USB drive, for example,
/dev/sdb.
After the ISO is copied to the USB drive, you can use the USB drive to install software on the server.
2.5. Booting from an HTTP-hosted ISO image using the Redfish API Link kopierenLink in die Zwischenablage kopiert!
You can provision hosts in your network using ISOs that you install using the Redfish Baseboard Management Controller (BMC) API.
This example procedure demonstrates the steps on a Dell server.
Ensure that you have the latest firmware version of iDRAC that is compatible with your hardware. If you have any issues with the hardware or firmware, you must contact the provider.
Prerequisites
- Download the installation Red Hat Enterprise Linux CoreOS (RHCOS) ISO.
- Use a Dell PowerEdge server that is compatible with iDRAC9.
Procedure
- Copy the ISO file to an HTTP server accessible in your network.
Boot the host from the hosted ISO file, for example:
Call the Redfish API to set the hosted ISO as the
boot media by running the following command:VirtualMedia$ curl -k -u <bmc_username>:<bmc_password> -d '{"Image":"<hosted_iso_file>", "Inserted": true}' -H "Content-Type: application/json" -X POST <host_bmc_address>/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD/Actions/VirtualMedia.InsertMediaWhere:
- <bmc_username>:<bmc_password>
- Is the username and password for the target host BMC.
- <hosted_iso_file>
-
Is the URL for the hosted installation ISO, for example:
http://webserver.example.com/rhcos-live-minimal.iso. The ISO must be accessible from the target host machine. - <host_bmc_address>
- Is the BMC IP address of the target host machine.
Set the host to boot from the
device by running the following command:VirtualMedia$ curl -k -u <bmc_username>:<bmc_password> -X PATCH -H 'Content-Type: application/json' -d '{"Boot": {"BootSourceOverrideTarget": "Cd", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideEnabled": "Once"}}' <host_bmc_address>/redfish/v1/Systems/System.Embedded.1Reboot the host:
$ curl -k -u <bmc_username>:<bmc_password> -d '{"ResetType": "ForceRestart"}' -H 'Content-type: application/json' -X POST <host_bmc_address>/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.ResetOptional: If the host is powered off, you can boot it using the
switch. Run the following command:{"ResetType": "On"}$ curl -k -u <bmc_username>:<bmc_password> -d '{"ResetType": "On"}' -H 'Content-type: application/json' -X POST <host_bmc_address>/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset
2.6. Creating a custom live RHCOS ISO for remote server access Link kopierenLink in die Zwischenablage kopiert!
In some cases, you cannot attach an external disk drive to a server, however, you need to access the server remotely to provision a node. It is recommended to enable SSH access to the server. You can create a live RHCOS ISO with SSHd enabled and with predefined credentials so that you can access the server after it boots.
Prerequisites
-
You installed the utility.
butane
Procedure
-
Download the binary from the
coreos-installerimage mirror page.coreos-installer - Download the latest live RHCOS ISO from mirror.openshift.com.
Create the
file that theembedded.yamlutility uses to create the Ignition file:butanevariant: openshift version: 4.14.0 metadata: name: sshd labels: machineconfiguration.openshift.io/role: worker passwd: users: - name: core1 ssh_authorized_keys: - '<ssh_key>'- 1
- The
coreuser has sudo privileges.
Run the
utility to create the Ignition file using the following command:butane$ butane -pr embedded.yaml -o embedded.ignAfter the Ignition file is created, you can include the configuration in a new live RHCOS ISO, which is named
, with therhcos-sshd-4.14.0-x86_64-live.x86_64.isoutility:coreos-installer$ coreos-installer iso ignition embed -i embedded.ign rhcos-4.14.0-x86_64-live.x86_64.iso -o rhcos-sshd-4.14.0-x86_64-live.x86_64.iso
Verification
Check that the custom live ISO can be used to boot the server by running the following command:
# coreos-installer iso ignition show rhcos-sshd-4.14.0-x86_64-live.x86_64.isoExample output
{ "ignition": { "version": "3.2.0" }, "passwd": { "users": [ { "name": "core", "sshAuthorizedKeys": [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZnG8AIzlDAhpyENpK2qKiTT8EbRWOrz7NXjRzopbPu215mocaJgjjwJjh1cYhgPhpAp6M/ttTk7I4OI7g4588Apx4bwJep6oWTU35LkY8ZxkGVPAJL8kVlTdKQviDv3XX12l4QfnDom4tm4gVbRH0gNT1wzhnLP+LKYm2Ohr9D7p9NBnAdro6k++XWgkDeijLRUTwdEyWunIdW1f8G0Mg8Y1Xzr13BUo3+8aey7HLKJMDtobkz/C8ESYA/f7HJc5FxF0XbapWWovSSDJrr9OmlL9f4TfE+cQk3s+eoKiz2bgNPRgEEwihVbGsCN4grA+RzLCAOpec+2dTJrQvFqsD alosadag@sonnelicht.local" ] } ] } }
2.7. Installing single-node OpenShift with IBM Z and IBM LinuxONE Link kopierenLink in die Zwischenablage kopiert!
Installing a single-node cluster on IBM Z® and IBM® LinuxONE requires user-provisioned installation using either the "Installing a cluster with RHEL KVM on IBM Z® and IBM® LinuxONE" or the "Installing a cluster with z/VM on IBM Z® and IBM® LinuxONE" procedure.
Installing a single-node cluster on IBM Z® simplifies installation for development and test environments and requires less resource requirements at entry level.
2.7.1. Hardware requirements Link kopierenLink in die Zwischenablage kopiert!
- The equivalent of two Integrated Facilities for Linux (IFL), which are SMT2 enabled, for each cluster.
-
At least one network connection to both connect to the service and to serve data for traffic outside the cluster.
LoadBalancer
You can use dedicated or shared IFLs to assign sufficient compute resources. Resource sharing is one of the key strengths of IBM Z®. However, you must adjust capacity correctly on each hypervisor layer and ensure sufficient resources for every OpenShift Container Platform cluster.
2.7.2. Installing single-node OpenShift with z/VM on IBM Z and IBM LinuxONE Link kopierenLink in die Zwischenablage kopiert!
Prerequisites
-
You have installed .
podman
Procedure
Set the OpenShift Container Platform version by running the following command:
$ OCP_VERSION=<ocp_version>1 - 1
- Replace
<ocp_version>with the current version, for example,latest-4.14
Set the host architecture by running the following command:
$ ARCH=<architecture>1 - 1
- Replace
<architecture>with the target host architectures390x.
Download the OpenShift Container Platform client (
) and make it available for use by entering the following commands:oc$ curl -k https://mirror.openshift.com/pub/openshift-v4/${ARCH}/clients/ocp/${OCP_VERSION}/openshift-client-linux.tar.gz -o oc.tar.gz$ tar zxf oc.tar.gz$ chmod +x ocDownload the OpenShift Container Platform installer and make it available for use by entering the following commands:
$ curl -k https://mirror.openshift.com/pub/openshift-v4/${ARCH}/clients/ocp/${OCP_VERSION}/openshift-install-linux.tar.gz -o openshift-install-linux.tar.gz$ tar zxvf openshift-install-linux.tar.gz$ chmod +x openshift-installPrepare the
file:install-config.yamlapiVersion: v1 baseDomain: <domain>1 compute: - name: worker replicas: 02 controlPlane: name: master replicas: 13 metadata: name: <name>4 networking:5 clusterNetwork: - cidr: 10.128.0.0/14 hostPrefix: 23 machineNetwork: - cidr: 10.0.0.0/166 networkType: OVNKubernetes serviceNetwork: - 172.30.0.0/16 platform: none: {} bootstrapInPlace: installationDisk: /dev/disk/by-id/<disk_id>7 pullSecret: '<pull_secret>'8 sshKey: | <ssh_key>9 - 1
- Add the cluster domain name.
- 2
- Set the
computereplicas to0. This makes the control plane node schedulable. - 3
- Set the
controlPlanereplicas to1. In conjunction with the previouscomputesetting, this setting ensures the cluster runs on a single node. - 4
- Set the
metadataname to the cluster name. - 5
- Set the
networkingdetails. OVN-Kubernetes is the only allowed network plugin type for single-node clusters. - 6
- Set the
cidrvalue to match the subnet of the single-node OpenShift cluster. - 7
- Set the path to the installation disk drive, for example,
/dev/disk/by-id/wwn-0x64cd98f04fde100024684cf3034da5c2. - 8
- Copy the pull secret from Red Hat OpenShift Cluster Manager and add the contents to this configuration setting.
- 9
- Add the public SSH key from the administration host so that you can log in to the cluster after installation.
Generate OpenShift Container Platform assets by running the following commands:
$ mkdir ocp$ cp install-config.yaml ocp$ ./openshift-install --dir=ocp create single-node-ignition-configObtain the RHEL
,kernel, andinitramfsartifacts from the Product Downloads page on the Red Hat Customer Portal or from the RHCOS image mirror page.rootfsImportantThe RHCOS images might not change with every release of OpenShift Container Platform. You must download images with the highest version that is less than or equal to the OpenShift Container Platform version that you install. Only use the appropriate
,kernel, andinitramfsartifacts described in the following procedure.rootfsThe file names contain the OpenShift Container Platform version number. They resemble the following examples:
kernel-
rhcos-<version>-live-kernel-<architecture> initramfs-
rhcos-<version>-live-initramfs.<architecture>.img rootfsrhcos-<version>-live-rootfs.<architecture>.imgNoteThe
image is the same for FCP and DASD.rootfs
Move the following artifacts and files to an HTTP or HTTPS server:
-
Downloaded RHEL live ,
kernel, andinitramfsartifactsrootfs - Ignition files
-
Downloaded RHEL live
Create parameter files for a particular virtual machine:
Example parameter file
rd.neednet=1 \ console=ttysclp0 \ coreos.live.rootfs_url=<rhcos_liveos>:8080/rootfs.img \1 ignition.firstboot ignition.platform.id=metal \ ignition.config.url=<rhcos_ign>:8080/ignition/bootstrap-in-place-for-live-iso.ign \2 ip=encbdd0:dhcp::02:00:00:02:34:023 rd.znet=qeth,0.0.bdd0,0.0.bdd1,0.0.bdd2,layer2=1 \ rd.dasd=0.0.4411 \4 rd.zfcp=0.0.8001,0x50050763040051e3,0x4000406300000000 \5 zfcp.allow_lun_scan=0 \ rd.luks.options=discard- 1
- For the
coreos.live.rootfs_url=artifact, specify the matchingrootfsartifact for thekernel`and `initramfsyou are booting. Only HTTP and HTTPS protocols are supported. - 2
- For the
ignition.config.url=parameter, specify the Ignition file for the machine role. Only HTTP and HTTPS protocols are supported. - 3
- For the
ip=parameter, assign the IP address automatically using DHCP or manually as described in "Installing a cluster with z/VM on IBM Z® and IBM® LinuxONE". - 4
- For installations on DASD-type disks, use
rd.dasd=to specify the DASD where RHCOS is to be installed. Omit this entry for FCP-type disks. - 5
- For installations on FCP-type disks, use
rd.zfcp=<adapter>,<wwpn>,<lun>to specify the FCP disk where RHCOS is to be installed. Omit this entry for DASD-type disks.
Leave all other parameters unchanged.
Transfer the following artifacts, files, and images to z/VM. For example by using FTP:
-
and
kernelartifactsinitramfs - Parameter files
RHCOS images
For details about how to transfer the files with FTP and boot from the virtual reader, see Installing under Z/VM.
-
- Punch the files to the virtual reader of the z/VM guest virtual machine that is to become your bootstrap node.
- Log in to CMS on the bootstrap machine.
IPL the bootstrap machine from the reader by running the following command:
$ cp ipl cAfter the first reboot of the virtual machine, run the following commands directly after one another:
To boot a DASD device after first reboot, run the following commands:
$ cp i <devno> clear loadparm promptwhere:
<devno>- Specifies the device number of the boot device as seen by the guest.
$ cp vi vmsg 0 <kernel_parameters>where:
<kernel_parameters>- Specifies a set of kernel parameters to be stored as system control program data (SCPDATA). When booting Linux, these kernel parameters are concatenated to the end of the existing kernel parameters that are used by your boot configuration. The combined parameter string must not exceed 896 characters.
To boot an FCP device after first reboot, run the following commands:
$ cp set loaddev portname <wwpn> lun <lun>where:
<wwpn>-
Specifies the target port and
<lun>the logical unit in hexadecimal format.
$ cp set loaddev bootprog <n>where:
<n>- Specifies the kernel to be booted.
$ cp set loaddev scpdata {APPEND|NEW} '<kernel_parameters>'where:
<kernel_parameters>- Specifies a set of kernel parameters to be stored as system control program data (SCPDATA). When booting Linux, these kernel parameters are concatenated to the end of the existing kernel parameters that are used by your boot configuration. The combined parameter string must not exceed 896 characters.
<APPEND|NEW>-
Optional: Specify
APPENDto append kernel parameters to existing SCPDATA. This is the default. SpecifyNEWto replace existing SCPDATA.
Example
$ cp set loaddev scpdata 'rd.zfcp=0.0.8001,0x500507630a0350a4,0x4000409D00000000 ip=encbdd0:dhcp::02:00:00:02:34:02 rd.neednet=1'To start the IPL and boot process, run the following command:
$ cp i <devno>where:
<devno>- Specifies the device number of the boot device as seen by the guest.
2.7.3. Installing single-node OpenShift with RHEL KVM on IBM Z and IBM LinuxONE Link kopierenLink in die Zwischenablage kopiert!
Prerequisites
-
You have installed .
podman
Procedure
Set the OpenShift Container Platform version by running the following command:
$ OCP_VERSION=<ocp_version>1 - 1
- Replace
<ocp_version>with the current version, for example,latest-4.14
Set the host architecture by running the following command:
$ ARCH=<architecture>1 - 1
- Replace
<architecture>with the target host architectures390x.
Download the OpenShift Container Platform client (
) and make it available for use by entering the following commands:oc$ curl -k https://mirror.openshift.com/pub/openshift-v4/${ARCH}/clients/ocp/${OCP_VERSION}/openshift-client-linux.tar.gz -o oc.tar.gz$ tar zxf oc.tar.gz$ chmod +x ocDownload the OpenShift Container Platform installer and make it available for use by entering the following commands:
$ curl -k https://mirror.openshift.com/pub/openshift-v4/${ARCH}/clients/ocp/${OCP_VERSION}/openshift-install-linux.tar.gz -o openshift-install-linux.tar.gz$ tar zxvf openshift-install-linux.tar.gz$ chmod +x openshift-installPrepare the
file:install-config.yamlapiVersion: v1 baseDomain: <domain>1 compute: - name: worker replicas: 02 controlPlane: name: master replicas: 13 metadata: name: <name>4 networking:5 clusterNetwork: - cidr: 10.128.0.0/14 hostPrefix: 23 machineNetwork: - cidr: 10.0.0.0/166 networkType: OVNKubernetes serviceNetwork: - 172.30.0.0/16 platform: none: {} bootstrapInPlace: installationDisk: /dev/disk/by-id/<disk_id>7 pullSecret: '<pull_secret>'8 sshKey: | <ssh_key>9 - 1
- Add the cluster domain name.
- 2
- Set the
computereplicas to0. This makes the control plane node schedulable. - 3
- Set the
controlPlanereplicas to1. In conjunction with the previouscomputesetting, this setting ensures the cluster runs on a single node. - 4
- Set the
metadataname to the cluster name. - 5
- Set the
networkingdetails. OVN-Kubernetes is the only allowed network plugin type for single-node clusters. - 6
- Set the
cidrvalue to match the subnet of the single-node OpenShift cluster. - 7
- Set the path to the installation disk drive, for example,
/dev/disk/by-id/wwn-0x64cd98f04fde100024684cf3034da5c2. - 8
- Copy the pull secret from Red Hat OpenShift Cluster Manager and add the contents to this configuration setting.
- 9
- Add the public SSH key from the administration host so that you can log in to the cluster after installation.
Generate OpenShift Container Platform assets by running the following commands:
$ mkdir ocp$ cp install-config.yaml ocp$ ./openshift-install --dir=ocp create single-node-ignition-configObtain the RHEL
,kernel, andinitramfsartifacts from the Product Downloads page on the Red Hat Customer Portal or from the RHCOS image mirror page.rootfsImportantThe RHCOS images might not change with every release of OpenShift Container Platform. You must download images with the highest version that is less than or equal to the OpenShift Container Platform version that you install. Only use the appropriate
,kernel, andinitramfsartifacts described in the following procedure.rootfsThe file names contain the OpenShift Container Platform version number. They resemble the following examples:
kernel-
rhcos-<version>-live-kernel-<architecture> initramfs-
rhcos-<version>-live-initramfs.<architecture>.img rootfs-
rhcos-<version>-live-rootfs.<architecture>.img
Before you launch
, move the following files and artifacts to an HTTP or HTTPS server:virt-install-
Downloaded RHEL live ,
kernel, andinitramfsartifactsrootfs - Ignition files
-
Downloaded RHEL live
Create the KVM guest nodes by using the following components:
-
RHEL and
kernelartifactsinitramfs - Ignition files
- The new disk image
- Adjusted parm line arguments
-
RHEL
$ virt-install \
--name <vm_name> \
--autostart \
--memory=<memory_mb> \
--cpu host \
--vcpus <vcpus> \
--location <media_location>,kernel=<rhcos_kernel>,initrd=<rhcos_initrd> \
--disk size=100 \
--network network=<virt_network_parm> \
--graphics none \
--noautoconsole \
--extra-args "ip=<ip>::<gateway>:<mask>:<hostname>::none" \
--extra-args "nameserver=<name_server>" \
--extra-args "ip=dhcp rd.neednet=1 ignition.platform.id=metal ignition.firstboot" \
--extra-args "coreos.live.rootfs_url=<rhcos_liveos>" \
--extra-args "ignition.config.url=<rhcos_ign>" \
--extra-args "random.trust_cpu=on rd.luks.options=discard" \
--extra-args "console=ttysclp0" \
--wait
- 1
- For the
--locationparameter, specify the location of the kernel/initrd on the HTTP or HTTPS server. - 2
- For the
coreos.live.rootfs_url=artifact, specify the matchingrootfsartifact for thekernelandinitramfsyou are booting. Only HTTP and HTTPS protocols are supported. - 3
- For the
ignition.config.url=parameter, specify the Ignition file for the machine role. Only HTTP and HTTPS protocols are supported.
2.8. Installing single-node OpenShift with IBM Power Link kopierenLink in die Zwischenablage kopiert!
Installing a single-node cluster on IBM Power® requires user-provisioned installation using the "Installing a cluster with IBM Power®" procedure.
Installing a single-node cluster on IBM Power® simplifies installation for development and test environments and requires less resource requirements at entry level.
2.8.1. Hardware requirements Link kopierenLink in die Zwischenablage kopiert!
- The equivalent of two Integrated Facilities for Linux (IFL), which are SMT2 enabled, for each cluster.
-
At least one network connection to connect to the service and to serve data for traffic outside of the cluster.
LoadBalancer
You can use dedicated or shared IFLs to assign sufficient compute resources. Resource sharing is one of the key strengths of IBM Power®. However, you must adjust capacity correctly on each hypervisor layer and ensure sufficient resources for every OpenShift Container Platform cluster.
2.8.2. Setting up basion for single-node OpenShift with IBM Power Link kopierenLink in die Zwischenablage kopiert!
Prior to installing single-node OpenShift on IBM Power®, you must set up bastion. Setting up a bastion server for single-node OpenShift on IBM Power® requires the configuration of the following services:
PXE is used for the single-node OpenShift cluster installation. PXE requires the following services to be configured and run:
- DNS to define api, api-int, and *.apps
- DHCP service to enable PXE and assign an IP address to single-node OpenShift node
- HTTP to provide ignition and RHCOS rootfs image
- TFTP to enable PXE
-
You must install to support DNS, DHCP and PXE, httpd for HTTP.
dnsmasq
Use the following procedure to configure a bastion server that meets these requirements.
Procedure
Use the following command to install
, which is required to enable PXE for PowerVM:grub2grub2-mknetdir --net-directory=/var/lib/tftpbootExample
/var/lib/tftpboot/boot/grub2/grub.cfgfiledefault=0 fallback=1 timeout=1 if [ ${net_default_mac} == fa:b0:45:27:43:20 ]; then menuentry "CoreOS (BIOS)" { echo "Loading kernel" linux "/rhcos/kernel" ip=dhcp rd.neednet=1 ignition.platform.id=metal ignition.firstboot coreos.live.rootfs_url=http://192.168.10.5:8000/install/rootfs.img ignition.config.url=http://192.168.10.5:8000/ignition/sno.ign echo "Loading initrd" initrd "/rhcos/initramfs.img" } fiUse the following commands to download RHCOS image files from the mirror repo for PXE.
Enter the following command to assign the
variable the follow 4.12 URL:RHCOS_URL$ export RHCOS_URL=https://mirror.openshift.com/pub/openshift-v4/ppc64le/dependencies/rhcos/4.12/latest/Enter the following command to navigate to the
directory:/var/lib/tftpboot/rhcos$ cd /var/lib/tftpboot/rhcosEnter the following command to download the specified RHCOS kernel file from the URL stored in the
variable:RHCOS_URL$ wget ${RHCOS_URL}/rhcos-live-kernel-ppc64le -o kernelEnter the following command to download the RHCOS
file from the URL stored in theinitramfsvariable:RHCOS_URL$ wget ${RHCOS_URL}/rhcos-live-initramfs.ppc64le.img -o initramfs.imgEnter the following command to navigate to the
directory:/var//var/www/html/install/$ cd /var//var/www/html/install/Enter the following command to download, and save, the RHCOS
image file from the URL stored in theroot filesystemvariable:RHCOS_URL$ wget ${RHCOS_URL}/rhcos-live-rootfs.ppc64le.img -o rootfs.img
To create the ignition file for a single-node OpenShift cluster, you must create the
file.install-config.yamlEnter the following command to create the work directory that holds the file:
$ mkdir -p ~/sno-workEnter the following command to navigate to the
directory:~/sno-work$ cd ~/sno-workUse the following sample file can to create the required
in theinstall-config.yamldirectory:~/sno-workapiVersion: v1 baseDomain: <domain>1 compute: - name: worker replicas: 02 controlPlane: name: master replicas: 13 metadata: name: <name>4 networking:5 clusterNetwork: - cidr: 10.128.0.0/14 hostPrefix: 23 machineNetwork: - cidr: 10.0.0.0/166 networkType: OVNKubernetes serviceNetwork: - 172.30.0.0/16 platform: none: {} bootstrapInPlace: installationDisk: /dev/disk/by-id/<disk_id>7 pullSecret: '<pull_secret>'8 sshKey: | <ssh_key>9 - 1
- Add the cluster domain name.
- 2
- Set the
computereplicas to0. This makes the control plane node schedulable. - 3
- Set the
controlPlanereplicas to1. In conjunction with the previouscomputesetting, this setting ensures that the cluster runs on a single node. - 4
- Set the
metadataname to the cluster name. - 5
- Set the
networkingdetails. OVN-Kubernetes is the only allowed network plugin type for single-node clusters. - 6
- Set the
cidrvalue to match the subnet of the single-node OpenShift cluster. - 7
- Set the path to the installation disk drive, for example,
/dev/disk/by-id/wwn-0x64cd98f04fde100024684cf3034da5c2. - 8
- Copy the pull secret from Red Hat OpenShift Cluster Manager and add the contents to this configuration setting.
- 9
- Add the public SSH key from the administration host so that you can log in to the cluster after installation.
Download the
image to create the ignition file and copy it to theopenshift-installdirectory.httpEnter the following command to download the
.tar file:openshift-install-linux-4.12.0$ wget https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp/4.12.0/openshift-install-linux-4.12.0.tar.gzEnter the following command to unpack the
archive:openshift-install-linux-4.12.0.tar.gz$ tar xzvf openshift-install-linux-4.12.0.tar.gzEnter the following command to
$ ./openshift-install --dir=~/sno-work create create single-node-ignition-configEnter the following command to create the ignition file:
$ cp ~/sno-work/single-node-ignition-config.ign /var/www/html/ignition/sno.ignEnter the following command to restore SELinux file for the
directory:/var/www/html$ restorecon -vR /var/www/html || trueBastion now has all the required files and is properly configured in order to install single-node OpenShift.
2.8.3. Installing single-node OpenShift with IBM Power Link kopierenLink in die Zwischenablage kopiert!
Prerequisites
- You have set up bastion.
Procedure
There are two steps for the single-node OpenShift cluster installation. First the single-node OpenShift logical partition (LPAR) needs to boot up with PXE, then you need to monitor the installation progress.
Use the following command to boot powerVM with netboot:
$ lpar_netboot -i -D -f -t ent -m <sno_mac> -s auto -d auto -S <server_ip> -C <sno_ip> -G <gateway> <lpar_name> default_profile <cec_name>where:
- sno_mac
- Specifies the MAC address of the single-node OpenShift cluster.
- sno_ip
- Specifies the IP address of the single-node OpenShift cluster.
- server_ip
- Specifies the IP address of bastion (PXE server).
- gateway
- Specifies the Network’s gateway IP.
- lpar_name
- Specifies the single-node OpenShift lpar name in HMC.
- cec_name
- Specifies the System name where the sno_lpar resides
After the single-node OpenShift LPAR boots up with PXE, use the
command to monitor the progress of installation:openshift-installRun the following command after the bootstrap is complete:
./openshift-install wait-for bootstrap-completeRun the following command after it returns successfully:
./openshift-install wait-for install-complete