$ mkdir ibi-config-iso-workdir (1)
You can manually generate a configuration ISO by using the openshift-install
program. Attach the configuration ISO to your preinstalled target host to complete the deployment.
You can use the openshift-install
program to configure and deploy a host that you preinstalled with an image-based installation. To configure the target host with site-specific details, you must create the following resources:
The install-config.yaml
installation manifest
The image-based-config.yaml
manifest
The openshift-install
program uses these resources to generate a configuration ISO that you attach to the preinstalled target host to complete the deployment.
For more information about the specifications for the |
You preinstalled a host with single-node OpenShift using an image-based installation.
You downloaded the latest version of the openshift-install
program.
You created a pull secret to authenticate pull requests. For more information, see "Using image pull secrets".
Create a working directory by running the following:
$ mkdir ibi-config-iso-workdir (1)
1 | Replace ibi-config-iso-workdir with the name of your working directory. |
Create the installation manifest:
Create a YAML file that defines the install-config
manifest:
install-config.yaml
fileapiVersion: v1
metadata:
name: sno-cluster-name
baseDomain: host.example.com
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
replicas: 0
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
replicas: 1
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
machineNetwork:
- cidr: 192.168.200.0/24
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
platform:
none: {}
fips: false
cpuPartitioningMode: "AllNodes"
pullSecret: '{"auths":{"<your_pull_secret>"}}}'
sshKey: 'ssh-rsa <your_ssh_pub_key>'
If your cluster deployment requires a proxy configuration, you must do the following:
|
Save the file in your working directory.
Optional. Create a configuration template in your working directory by running the following command:
$ openshift-install image-based create config-template --dir ibi-config-iso-workdir/
INFO Config-Template created in: ibi-config-iso-workdir
The command creates the image-based-config.yaml
configuration template in your working directory:
#
# Note: This is a sample ImageBasedConfig file showing
# which fields are available to aid you in creating your
# own image-based-config.yaml file.
#
apiVersion: v1beta1
kind: ImageBasedConfig
metadata:
name: example-image-based-config
additionalntpSources:
- 0.rhel.pool.ntp.org
- 1.rhel.pool.ntp.org
hostname: change-to-hostname
releaseRegistry: quay.io
# networkConfig contains the network configuration for the host in NMState format.
# See https://nmstate.io/examples.html for examples.
networkConfig:
interfaces:
- name: eth0
type: ethernet
state: up
mac-address: 00:00:00:00:00:00
ipv4:
enabled: true
address:
- ip: 192.168.122.2
prefix-length: 23
dhcp: false
Edit your configuration file:
image-based-config.yaml
file#
# Note: This is a sample ImageBasedConfig file showing
# which fields are available to aid you in creating your
# own image-based-config.yaml file.
#
apiVersion: v1beta1
kind: ImageBasedConfig
metadata:
name: sno-cluster-name
additionalntpSources:
- 0.rhel.pool.ntp.org
- 1.rhel.pool.ntp.org
hostname: host.example.com
releaseRegistry: quay.io
# networkConfig contains the network configuration for the host in NMState format.
# See https://nmstate.io/examples.html for examples.
networkConfig:
interfaces:
- name: ens1f0
type: ethernet
state: up
ipv4:
enabled: true
dhcp: false
auto-dns: false
address:
- ip: 192.168.200.25
prefix-length: 24
ipv6:
enabled: false
dns-resolver:
config:
server:
- 192.168.15.47
- 192.168.15.48
routes:
config:
- destination: 0.0.0.0/0
metric: 150
next-hop-address: 192.168.200.254
next-hop-interface: ens1f0
Create the configuration ISO in your working directory by running the following command:
$ openshift-install image-based create config-image --dir ibi-config-iso-workdir/
INFO Adding NMConnection file <ens1f0.nmconnection>
INFO Consuming Install Config from target directory
INFO Consuming Image-based Config ISO configuration from target directory
INFO Config-Image created in: ibi-config-iso-workdir/auth
View the output in the working directory:
ibi-config-iso-workdir/
├── auth
│ ├── kubeadmin-password
│ └── kubeconfig
└── imagebasedconfig.iso
Attach the imagebasedconfig.iso
to the preinstalled host using your preferred method and restart the host to complete the configuration process and deploy the cluster.
When the configuration process completes on the host, access the cluster to verify its status.
Export the kubeconfig
environment variable to your kubeconfig file by running the following command:
$ export KUBECONFIG=ibi-config-iso-workdir/auth/kubeconfig
Verify that the cluster is responding by running the following command:
$ oc get nodes
NAME STATUS ROLES AGE VERSION
node/sno-cluster-name.host.example.com Ready control-plane,master 5h15m v1.30.3
The following content describes the specifications for the image-based-config.yaml
manifest.
The openshift-install
program uses the image-based-config.yaml
manifest to create a site-specific configuration ISO for image-based deployments of single-node OpenShift.
Specification | Type | Description |
---|---|---|
|
|
Define the name of the node for the single-node OpenShift cluster. |
Specification | Type | Description | ||
---|---|---|---|---|
|
|
Specifies networking configurations for the host, for example:
If you require static networking, you must install the
|
||
|
|
Specifies a list of ntp sources for all cluster hosts. These ntp sources are added to any existing ntp sources in the cluster. You can use the hostname or IP address for the ntp source. |
||
|
|
Specifies the container image registry that you used for the release image of the seed cluster. |
You can optionally define additional resources in an image-based deployment for single-node OpenShift clusters.
Create the additional resources in an extra-manifests
folder in the same working directory that has the install-config.yaml
and image-based-config.yaml
manifests.
You can create a resource in the extra-manifests
folder of your working directory to add extra manifests to the image-based deployment for single-node OpenShift clusters.
The following example adds an single-root I/O virtualization (SR-IOV) network to the deployment.
You created a working directory with the install-config.yaml
and image-based-config.yaml
manifests
Go to your working directory and create the extra-manifests
folder by running the following command:
$ mkdir extra-manifests
Create the SriovNetworkNodePolicy
and SriovNetwork
resources in the extra-manifests
folder:
Create a YAML file that defines the resources:
sriov-extra-manifest.yaml
fileapiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetworkNodePolicy
metadata:
name: "example-sriov-node-policy"
namespace: openshift-sriov-network-operator
spec:
deviceType: vfio-pci
isRdma: false
nicSelector:
pfNames: [ens1f0]
nodeSelector:
node-role.kubernetes.io/master: ""
mtu: 1500
numVfs: 8
priority: 99
resourceName: example-sriov-node-policy
---
apiVersion: sriovnetwork.openshift.io/v1
kind: SriovNetwork
metadata:
name: "example-sriov-network"
namespace: openshift-sriov-network-operator
spec:
ipam: |-
{
}
linkState: auto
networkNamespace: sriov-namespace
resourceName: example-sriov-node-policy
spoofChk: "on"
trust: "off"
When you create the configuration ISO, you can view the reference to the extra manifests in the .openshift_install_state.json
file in your working directory:
"*configimage.ExtraManifests": {
"FileList": [
{
"Filename": "extra-manifests/sriov-extra-manifest.yaml",
"Data": "YXBFDFFD..."
}
]
}