1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/installing-ocp-agent-inputs.adoc
2025-09-19 15:54:17 +00:00

228 lines
7.1 KiB
Plaintext

// Module included in the following assemblies:
//
// * installing/installing-with-agent-based-installer/installing-with-agent-based-installer.adoc
// *installing/installing_with_agent_based_installer/prepare-pxe-infra-agent.adoc
// * installing/installing_with_agent_based_installer/installing-using-iscsi.adoc
ifeval::["{context}" == "prepare-pxe-assets-agent"]
:pxe-boot:
endif::[]
ifeval::["{context}" == "installing-using-iscsi"]
:iscsi-boot:
endif::[]
:_mod-docs-content-type: PROCEDURE
[id="installing-ocp-agent-inputs_{context}"]
= Creating the preferred configuration inputs
ifndef::pxe-boot[]
Use this procedure to create the preferred configuration inputs used to create the agent image.
[NOTE]
====
Configuring the `install-config.yaml` and `agent-config.yaml` files is the preferred method for using the Agent-based Installer. Using {ztp} manifests is optional.
====
endif::pxe-boot[]
ifdef::pxe-boot[]
Use this procedure to create the preferred configuration inputs used to create the PXE files.
[NOTE]
====
Configuring the `install-config.yaml` and `agent-config.yaml` files is the preferred method for using the Agent-based Installer. Using {ztp} manifests is optional.
====
endif::pxe-boot[]
.Procedure
. Install the `nmstate` dependency by running the following command:
+
[source,terminal]
----
$ sudo dnf install /usr/bin/nmstatectl -y
----
. Place the `openshift-install` binary in a directory that is on your PATH.
. Create a directory to store the install configuration by running the following command:
+
[source,terminal]
----
$ mkdir ~/<directory_name>
----
. Create the `install-config.yaml` file by running the following command:
+
--
[source,terminal]
----
$ cat << EOF > ./<directory_name>/install-config.yaml
apiVersion: v1
baseDomain: test.example.com
compute:
- architecture: amd64 // <1>
hyperthreading: Enabled
name: worker
replicas: 0
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
replicas: 1
metadata:
name: sno-cluster // <2>
networking:
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
machineNetwork:
- cidr: 192.168.0.0/16
networkType: OVNKubernetes // <3>
serviceNetwork:
- 172.30.0.0/16
platform: <4>
none: {}
pullSecret: '<pull_secret>' // <5>
sshKey: '<ssh_pub_key>' // <6>
EOF
----
<1> Specify the system architecture. Valid values are `amd64`, `arm64`, `ppc64le`, and `s390x`.
+
If you are using the release image with the `multi` payload, you can install the cluster on different architectures such as `arm64`, `amd64`, `s390x`, and `ppc64le`. Otherwise, you can install the cluster only on the `release architecture` displayed in the output of the `openshift-install version` command. For more information, see "Verifying the supported architecture for installing an Agent-based Installer cluster".
<2> Required. Specify your cluster name.
<3> The cluster network plugin to install. The default value `OVNKubernetes` is the only supported value.
<4> Specify your platform.
+
[NOTE]
====
For bare-metal platforms, host settings made in the platform section of the `install-config.yaml` file are used by default, unless they are overridden by configurations made in the `agent-config.yaml` file.
====
<5> Specify your pull secret.
<6> Specify your SSH public key.
--
+
[NOTE]
====
If you set the platform to `vSphere`, `baremetal`, or `none`, you can configure IP address endpoints for cluster nodes in three ways:
* IPv4
* IPv6
* IPv4 and IPv6 in parallel (dual-stack)
====
+
.Example of dual-stack networking
[source,yaml]
----
networking:
clusterNetwork:
- cidr: 172.21.0.0/16
hostPrefix: 23
- cidr: fd02::/48
hostPrefix: 64
machineNetwork:
- cidr: 192.168.11.0/16
- cidr: 2001:DB8::/32
serviceNetwork:
- 172.22.0.0/16
- fd03::/112
networkType: OVNKubernetes
platform:
baremetal:
apiVIPs:
- 192.168.11.3
- 2001:DB8::4
ingressVIPs:
- 192.168.11.4
- 2001:DB8::5
----
+
[NOTE]
====
When you use a disconnected mirror registry, you must add the certificate file that you created previously for your mirror registry to the `additionalTrustBundle` field of the `install-config.yaml` file.
====
. Create the `agent-config.yaml` file by running the following command:
+
--
[source,terminal]
----
$ cat > agent-config.yaml << EOF
apiVersion: v1beta1
kind: AgentConfig
metadata:
name: sno-cluster
rendezvousIP: 192.168.111.80 // <1>
hosts: // <2>
- hostname: master-0 // <3>
interfaces:
- name: eno1
macAddress: 00:ef:44:21:e6:a5
rootDeviceHints: // <4>
deviceName: /dev/sdb
networkConfig: // <5>
interfaces:
- name: eno1
type: ethernet
state: up
mac-address: 00:ef:44:21:e6:a5
ipv4:
enabled: true
address:
- ip: 192.168.111.80
prefix-length: 23
dhcp: false
dns-resolver:
config:
server:
- 192.168.111.1
routes:
config:
- destination: 0.0.0.0/0
next-hop-address: 192.168.111.2
next-hop-interface: eno1
table-id: 254
ifdef::iscsi-boot[minimalISO: true <6>]
EOF
----
<1> This IP address is used to determine which node performs the bootstrapping process as well as running the `assisted-service` component.
You must provide the rendezvous IP address when you do not specify at least one host's IP address in the `networkConfig` parameter. If this address is not provided, one IP address is selected from the provided hosts' `networkConfig`.
<2> Optional: Host configuration. The number of hosts defined must not exceed the total number of hosts defined in the `install-config.yaml` file, which is the sum of the values of the `compute.replicas` and `controlPlane.replicas` parameters.
<3> Optional: Overrides the hostname obtained from either the Dynamic Host Configuration Protocol (DHCP) or a reverse DNS lookup. Each host must have a unique hostname supplied by one of these methods.
<4> Enables provisioning of the {op-system-first} image to a particular device. The installation program examines the devices in the order it discovers them, and compares the discovered values with the hint values. It uses the first discovered device that matches the hint value.
+
[NOTE]
====
This parameter is mandatory for FCP multipath configurations on {ibm-z-title}.
====
+
<5> Optional: Configures the network interface of a host in NMState format.
ifdef::iscsi-boot[]
<6> Generates an ISO image without the rootfs image file, and instead provides details about where to pull the rootfs file from.
You must set this parameter to `true` to enable iSCSI booting.
endif::iscsi-boot[]
--
ifdef::pxe-boot[]
. Optional: To create an iPXE script, add the `bootArtifactsBaseURL` to the `agent-config.yaml` file:
+
[source,yaml]
----
apiVersion: v1beta1
kind: AgentConfig
metadata:
name: sno-cluster
rendezvousIP: 192.168.111.80
bootArtifactsBaseURL: <asset_server_URL>
----
+
Where `<asset_server_URL>` is the URL of the server you will upload the PXE assets to.
endif::pxe-boot[]
ifeval::["{context}" == "prepare-pxe-assets-agent"]
:!pxe-boot:
endif::[]
ifeval::["{context}" == "installing-using-iscsi"]
:!iscsi-boot:
endif::[]