|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/installing_oci/installing-oci-agent-based-installer.adoc [Using the Agent-based Installer to install a cluster on OCI] |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="creating-config-files-cluster-install-oci_{context}"] |
| 7 | += Creating configuration files for installing a cluster on OCI |
| 8 | + |
| 9 | +You need to create the `install-config.yaml` and the `agent-config.yaml` configuration files so that you can use the Agent-based Installer to generate a bootable ISO image. The Agent-based installation comprises a bootable ISO that contains the Assisted discovery agent and the Assisted Service. Both of these components are required to perform the cluster installation, but the latter component runs on only one of the hosts. |
| 10 | + |
| 11 | +In a subsequent procedure, you can upload your generated Agent ISO image to Oracle’s default Object Storage bucket, which is the initial step for integrating your {product-title} cluster on {oci-first}. |
| 12 | + |
| 13 | +You can also use the Agent-based Installer to generate or accept Zero Touch Provisioning (ZTP) custom resources. |
| 14 | + |
| 15 | +.Prerequisites |
| 16 | +* You reviewed details about the xref:../../architecture/architecture-installation.html#installation-overview_architecture-installation[{product-title} installation and update processes]. |
| 17 | +* You read the documentation on xref:../../installing/installing-preparing.html#installing-preparing-selecting-cluster-type[Selecting a cluster installation method and preparing it for users]. |
| 18 | +* You have read the xref:../../installing/installing_with_agent_based_installer/preparing-to-install-with-agent-based-installer.html#about-the-agent-based-installer[Preparing to install with the Agent-based Installer] documentation. |
| 19 | +* You downloaded the xref:../../installing/installing_with_agent_based_installer/installing-with-agent-based-installer.html#installing-ocp-agent-retrieve_installing-with-agent-based-installer[Agent-Based Installer] and the command-line interface (CLI) from Red Hat’s Hybrid Cloud Console. |
| 20 | +* For a disconnected environment, you created a container image registry, such as Red Hat Quay. See xref:../../installing/disconnected_install/installing-mirroring-creating-registry.html#mirror-registry-introduction_installing-mirroring-creating-registry[Mirror registry for Red Hat OpenShift introduction]. |
| 21 | +* You have logged into the {product-title} with administrator privileges. |
| 22 | +
|
| 23 | +.Procedure |
| 24 | + |
| 25 | +. Configure the `install-config.yaml` configuration file to meet the needs of your organization. |
| 26 | ++ |
| 27 | +.Example `install-config.yaml` configuration file that demonstrates setting an external platform |
| 28 | ++ |
| 29 | +[source,yaml] |
| 30 | +---- |
| 31 | +# install-config.yaml |
| 32 | +apiVersion: v1 |
| 33 | +baseDomain: <base_domain> <1> |
| 34 | +networking: |
| 35 | + clusterNetwork: |
| 36 | + - cidr: 10.128.0.0/14 |
| 37 | + hostPrefix: 23 |
| 38 | + network type: OVNKubernetes |
| 39 | + machineNetwork: |
| 40 | + - cidr: <ip_address_from_cidr> <2> |
| 41 | + serviceNetwork: |
| 42 | + - 172.30.0.0/16 |
| 43 | +compute: |
| 44 | + - architecture: amd64 <3> |
| 45 | + hyperthreading: Enabled |
| 46 | + name: worker |
| 47 | + replicas: 0 |
| 48 | +controlPlane: |
| 49 | + architecture: amd64 <3> |
| 50 | + hyperthreading: Enabled |
| 51 | + name: master |
| 52 | + replicas: 3 |
| 53 | +platform: |
| 54 | + external: |
| 55 | + platformName: oci <4> |
| 56 | + cloudControllerManager: External |
| 57 | +sshKey: <public_ssh_key> <5> |
| 58 | +pullSecret: '<pull_secret>' <6> |
| 59 | +# ... |
| 60 | +---- |
| 61 | +<1> The base domain of your cloud provider. |
| 62 | +<2> The IP address from the VCN that the CIDR allocates to resources and components that operate on your network. |
| 63 | +<3> Depending on your infrastructure, you can select either `x86_64`, or `amd64`. |
| 64 | +<4> Set `OCI` as the external platform, so that {product-title} can integrate with {oci}. |
| 65 | +<5> Specify your SSH public key. |
| 66 | +<6> The pull secret that you need for authenticate purposes when downloading container images for {product-title} components and services, such as Quay.io. See link:https://console.redhat.com/openshift/install/pull-secret[Install {product-title} 4] from the Red Hat Hybrid Cloud Console. |
| 67 | + |
| 68 | +. Create a directory on your local system named `openshift`. |
| 69 | ++ |
| 70 | +[IMPORTANT] |
| 71 | +==== |
| 72 | +Do not move the `install-config.yaml` and `agent-config.yaml` configuration files to the `openshift` directory. |
| 73 | +==== |
| 74 | + |
| 75 | +. From the link:https://github.com/oracle-quickstart/oci-openshift[`oracle-quickstart / oci-openshift`] GitHub web page, select the **<> Code** button and click **Download ZIP**. Save the archive file to your `openshift` directory, so that all the {oci-ccm-full} and {oci-csi-full} manifests exist in the same directory. The downloaded archive file includes files for creating cluster resources and custom manifests. |
| 76 | + |
| 77 | +. Go to the link:https://github.com/oracle-quickstart/oci-openshift/tree/main/custom_manifests[custom_manifests] web page on GitHub to access the custom manifest files. |
| 78 | ++ |
| 79 | +The {oci-ccm} manifest are required for deploying the {oci-ccm} during cluster installation so that {product-title} can connect to the external {oci} platform. The {oci-csi} custom manifests are required for deploying the {oci-csi} driver during cluster installation so that {product-title} can claim required objects from {oci}. |
| 80 | ++ |
| 81 | +[IMPORTANT] |
| 82 | +==== |
| 83 | +You must modify the secret `oci-cloud-controller-manager` defined in the link:https://github.com/oracle-quickstart/oci-openshift/blob/main/custom_manifests/manifests/oci-ccm.yml[`oci-ccm.yml`] configuration file to match your organization's region, compartment {ocid}, VCN {ocid}, and the subnet {ocid} from the load balancer. |
| 84 | +==== |
| 85 | + |
| 86 | +. Use the Agent-based Installer to generate a minimal ISO image, which excludes the `rootfs` image, by entering the following command in your {product-title} CLI. You can use this image later in the process to boot all your cluster’s nodes. |
| 87 | ++ |
| 88 | +[source,terminal] |
| 89 | +---- |
| 90 | +$ ./openshift-install agent create image --log-level debug |
| 91 | +---- |
| 92 | ++ |
| 93 | +The previous command also completes the following actions: |
| 94 | ++ |
| 95 | +* Creates a subdirectory, `./<installation_directory>/auth directory:`, and places `kubeadmin-password` and `kubeconfig` files in the subdirectory. |
| 96 | +* Creates a `rendezvousIP` file based on the IP address that you specified in the `agent-config.yaml` configuration file. |
| 97 | +* Optional: Any modifications you made to `agent-config.yaml` and `install-config.yaml` configuration files get imported to the Zero Touch Provisioning (ZTP) custom resources. |
| 98 | ++ |
| 99 | +[IMPORTANT] |
| 100 | +==== |
| 101 | +The Agent-based Installer uses {op-system-first}. The `rootfs` image, which is mentioned in a subsequent listed item, is required for booting, recovering, and repairing your operating system. |
| 102 | +==== |
| 103 | + |
| 104 | +. Configure the `agent-config.yaml` configuration file to meet your organization’s requirements. |
| 105 | ++ |
| 106 | +.Example `agent-config.yaml` configuration file that sets values for an IPv4 formatted network. |
| 107 | +[source,yaml] |
| 108 | +---- |
| 109 | +apiVersion: v1alpha1 |
| 110 | +metadata: |
| 111 | + name: <cluster_name> <1> |
| 112 | + namespace: <cluster_namespace> <2> |
| 113 | +rendezvousIP:<ip_address_from_CIDR> <3> |
| 114 | +bootArtifactsBaseURL:<server_URL> <4> |
| 115 | +# … |
| 116 | +---- |
| 117 | +<1> The cluster name that you specified in your DNS record. |
| 118 | +<2> The name of your cluster on {product-title}. |
| 119 | +<3> If you are using IPv4 as the network IP address format, ensure that you set the `rendezvousIP` parameter to an IPv4 address that the VCN’s Classless Inter-Domain Routing (CIDR) method allocates on your network. Also ensure that at least one instance from the pool of instances that you booted with the ISO matches the IP address value you set for `rendezvousIP`. |
| 120 | +<4> The URL of the server where you want to upload the `rootfs` image. |
| 121 | + |
| 122 | +. Apply one of the following two updates to your `agent-config.yaml` configuration file: |
| 123 | ++ |
| 124 | +* For a disconnected network: After you run the command to generate a minimal ISO Image, the Agent-based installer saves the `rootfs` image into the `./<installation_directory>/boot-artifacts` directory on your local system. Upload `rootfs` to the location stated in the `bootArtifactsBaseURL` parameter in the `agent-config.yaml` configuration file. |
| 125 | ++ |
| 126 | +For example, if the URL states \http://192.168.122.20, you would upload the generated `rootfs` image to this location, so that the installer can access the image from \http://192.168.122.20/agent.x86_64-rootfs.img. After the installer boots the minimal ISO for the external platform, the Agent-based Installer downloads the `rootfs` image from the \http://192.168.122.20/agent.x86_64-rootfs.img location into the system memory. |
| 127 | ++ |
| 128 | +[NOTE] |
| 129 | +==== |
| 130 | +The Agent-based Installer also adds the value of the `bootArtifactsBaseURL` to the minimal ISO Image’s configuration, so that when the Operator boots a cluster’s node, the Agent-based Installer downloads the `rootfs` image into system memory. |
| 131 | +==== |
| 132 | ++ |
| 133 | +* For a connected network: You do not need to specify the `bootArtifactsBaseURL` parameter in the `agent-config.yaml` configuration file, because the Agent-based Installer, by default, reads the a `rootfs` URL location from \https://rhcos.mirror.openshift.com. After the Agent-based Installer boots the minimal ISO for the external platform, the Agent-based Installer then downloads the `rootfs` file into your system’s memory from the default {op-system} URL. |
| 134 | ++ |
| 135 | +[IMPORTANT] |
| 136 | +==== |
| 137 | +Consider that the full ISO image, which is in excess of `1` GB, includes the `rootfs` image and the image is considerably larger than the minimal ISO Image, which is typical less than `150` MB. |
| 138 | +==== |
0 commit comments