Use the following procedures to create the assets needed to PXE boot an OpenShift Container Platform cluster using the Agent-based Installer.

The assets you create in these procedures will deploy a single-node OpenShift Container Platform installation. You can use these procedures as a basis and modify configurations according to your requirements.


Downloading the Agent-based Installer

Use this procedure to download the Agent-based Installer and the CLI needed for your installation.

  1. Log in to the OpenShift Container Platform web console using your login credentials.

  2. Navigate to Datacenter.

  3. Click Run Agent-based Installer locally.

  4. Select the operating system and architecture for the OpenShift Installer and Command line interface.

  5. Click Download Installer to download and extract the install program.

  6. You can either download or copy the pull secret by clicking on Download pull secret or Copy pull secret.

  7. Click Download command-line tools and place the openshift-install binary in a directory that is on your PATH.

Creating the preferred configuration inputs

Use this procedure to create the preferred configuration inputs used to create the PXE files.

  1. Install nmstate dependency by running the following command:

    $ sudo dnf install /usr/bin/nmstatectl -y
  2. Place the openshift-install binary in a directory that is on your PATH.

  3. Create a directory to store the install configuration by running the following command:

    $ mkdir ~/<directory_name>

    This is the preferred method for the Agent-based installation. Using GitOps ZTP manifests is optional.

  4. Create the install-config.yaml file:

    $ cat << EOF > ./my-cluster/install-config.yaml
    apiVersion: v1
    baseDomain: test.example.com
    - architecture: amd64 (1)
      hyperthreading: Enabled
      name: worker
      replicas: 0
      architecture: amd64
      hyperthreading: Enabled
      name: master
      replicas: 1
      name: sno-cluster (2)
      - cidr:
        hostPrefix: 23
      - cidr:
      networkType: OVNKubernetes (3)
      none: {}
    pullSecret: '<pull_secret>' (4)
    sshKey: '<ssh_pub_key>' (5)
    1 Specify the system architecture, valid values are amd64 and arm64.
    2 Required. Specify your cluster name.
    3 Specify the cluster network plugin to install. The supported values are OVNKubernetes and OpenShiftSDN. The default value is OVNKubernetes.
    4 Specify your pull secret.
    5 Specify your SSH public key.

    If you set the platform to vSphere or baremetal, you can configure IP address endpoints for cluster nodes in three ways:

    • IPv4

    • IPv6

    • IPv4 and IPv6 in parallel (dual-stack)

    IPv6 is supported only on bare metal platforms.

    Example of dual-stack networking
        - cidr:
          hostPrefix: 23
        - cidr: fd02::/48
          hostPrefix: 64
        - cidr:
        - cidr: 2001:DB8::/32
        - fd03::/112
      networkType: OVNKubernetes
        - 2001:DB8::4
        - 2001:DB8::5
  5. Create the agent-config.yaml file:

    $ cat > agent-config.yaml << EOF
    apiVersion: v1beta1
    kind: AgentConfig
      name: sno-cluster
    rendezvousIP: (1)
    hosts: (2)
      - hostname: master-0 (3)
          - name: eno1
            macAddress: 00:ef:44:21:e6:a5
        rootDeviceHints: (4)
          deviceName: /dev/sdb
        networkConfig: (5)
            - name: eno1
              type: ethernet
              state: up
              mac-address: 00:ef:44:21:e6:a5
                enabled: true
                  - ip:
                    prefix-length: 23
                dhcp: false
              - destination:
                next-hop-interface: eno1
                table-id: 254
    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 Red Hat Enterprise Linux CoreOS (RHCOS) 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.
    5 Optional: Configures the network interface of a host in NMState format.
  6. Optional: To create an iPXE script, add the bootArtifactsBaseURL to the agent-config.yaml file:

    apiVersion: v1beta1
    kind: AgentConfig
      name: sno-cluster
    bootArtifactsBaseURL: <asset_server_URL>

    Where <asset_server_URL> is the URL of the server you will upload the PXE assets to.

Creating the PXE assets

Use the following procedure to create the assets and optional script to implement in your PXE infrastructure.

  1. Create the PXE assets by running the following command:

    $ openshift-install agent create pxe-files

    The generated PXE assets and optional iPXE script can be found in the boot-artifacts directory.

    Example filesystem with PXE assets and optional iPXE script
        ├─ agent.x86_64-initrd.img
        ├─ agent.x86_64.ipxe
        ├─ agent.x86_64-rootfs.img
        └─ agent.x86_64-vmlinuz

    Red Hat Enterprise Linux CoreOS (RHCOS) supports multipathing on the primary disk, allowing stronger resilience to hardware failure to achieve higher host availability. Multipathing is enabled by default in the agent ISO image, with a default /etc/multipath.conf configuration.

  2. Upload the PXE assets and optional script to your infrastructure where they will be accessible during the boot process.

    If you generated an iPXE script, the location of the assets must match the bootArtifactsBaseURL you added to the agent-config.yaml file.

Additional resources