github.com/openshift/installer@v1.4.17/docs/user/power/install_upi.md (about)

     1  # Install: Power User Provided Infrastructure
     2  
     3  The steps for performing a UPI-based install are outlined here. Example automation is provided [here](#example-power-upi-configuration) to help model your own.
     4  
     5  ## Table of contents
     6  
     7  1. [Minimum compute requirements](#minimum-resource-requirements)
     8  
     9  2. [Network topology requirements](#network-topology-requirements)
    10  
    11  3. [DNS requirements](#dns-requirements)
    12  
    13  4. [Getting Ignition configs for machines](#getting-ignition-configs-for-machines)
    14  
    15  5. [Booting machines with RHCOS and Ignition configs](#booting-machines-with-rhcos-and-ignition-configs)
    16  
    17  6. [Watching your installation (bootstrap complete, cluster available)](#watching-your-installation)
    18  
    19  7. [Example Bare-Metal UPI deployment](#example-power-upi-configuration)
    20  
    21  ## Compute
    22  
    23  The smallest OpenShift 4.x cluster requires the following hosts:
    24  
    25  * 1 bootstrap machine.
    26  
    27  * 3 control plane machines.
    28  
    29  * 2 worker machines.
    30  
    31  NOTE: The cluster requires the bootstrap machine to deploy the OpenShift cluster on to the 3 control plane machines. Once the installation completes you can remove the bootstrap machine.
    32  
    33  All the machines must use Red Hat Enterprise Linux CoreOS (RHCOS) as the operating system.
    34  
    35  ### Minimum resource requirements
    36  
    37  | Machine       | Operating System | vCPU | RAM   | Storage |
    38  |---------------|------------------|------|-------|---------|
    39  | Bootstrap     | RHCOS            | 2    | 16 GB | 120 GB  |
    40  | Control Plane | RHCOS            | 2    | 16 GB | 120 GB  |
    41  | Compute       | RHCOS            | 2    | 16 GB | 120 GB  |
    42  
    43  
    44  
    45  ## Network Topology Requirements
    46  
    47  The easiest way to get started is to ensure all Power nodes have internet access to pull images for platform containers and provide telemetry data to Red Hat.
    48  OpenShift 4.x also supports a restricted network installation.
    49  
    50  ### Load balancers
    51  
    52  Before you install OpenShift, you must provision two load balancers.
    53  
    54  * A load balancer for the control plane and bootstrap machines that targets port 6443 (Kubernetes APIServer) and 22623([Machine Config server][machine-config-server]). Port 6443 must be accessible to both clients external to the cluster and nodes within the cluster, and port 22623 must be accessible to nodes within the cluster.
    55  
    56    NOTE: Bootstrap machine can be deleted after cluster installation is finished.
    57  
    58  * A load balancer for the machines that run the [ingress router][openshift-router] pods that balances ports 443 and 80. Both the ports must be accessible to both clients external to the cluster and nodes within the cluster.
    59  
    60      NOTE: A working configuration for the ingress router is required for an OpenShift 4.x cluster.
    61  
    62      NOTE: The default configuration for Cluster Ingress Operator  deploys the ingress router to `worker` nodes in the cluster. The administrator needs to configure the [ingress][openshift-router] after the control plane has been bootstrapped.
    63  
    64  ### Connectivity between machines
    65  
    66  You must configure the network connectivity between machines to allow cluster components to communicate.
    67  
    68  * etcd
    69  
    70      As the etcd members are located on the control plane machines. Each control plane machine requires connectivity to [etcd server][etcd-ports], [etcd peer][etcd-ports] and [etcd-metrics][etcd-ports] on every other control plane machine.
    71  
    72  * OpenShift SDN
    73  
    74      All the machines require connectivity to certain reserved ports on every other machine to establish in-cluster networking. For further detail, please refer to the following [documentation][sdn-ports].
    75  
    76  * Kubernetes NodePort
    77  
    78      All the machines require connectivity to Kubernetes NodePort range 30000-32767 on every other machine for OpenShift platform components.
    79  
    80  * OpenShift reserved
    81  
    82      All the machines require connectivity to reserved port ranges 10250-12252 and 9000-9999 on every other machine for OpenShift platform components.
    83  
    84  ## DNS requirements
    85  
    86  * Kubernetes API
    87  
    88      OpenShift 4.x requires the DNS records `api.$cluster_name.$base_domain` and `api-int.$cluster_name.$base_domain` to point to the load balancer targeting the control plane machines. Both records must be resolvable from all the nodes within the cluster. The `api.$cluster_name.$base_domain` must also be resolvable by clients external to the cluster.
    89  
    90  * etcd
    91  
    92      For each control plane machine, OpenShift 4.x requires DNS records `etcd-$idx.$cluster_name.$base_domain` to point to `$idx`'th control plane machine. The DNS record must resolve to an unicast IPV4 address for the control plane machine and the records must be resolvable from all the nodes in the cluster.
    93  
    94      For each control plane machine, OpenShift 4.x also requires a SRV DNS record for etcd server on that machine with priority `0`, weight `10` and port `2380`. For 3 control plane cluster, the records look like:
    95  
    96      ```plain
    97      # _service._proto.name.                            TTL   class SRV priority weight port target.
    98      _etcd-server-ssl._tcp.$cluster_name.$base_domain   86400 IN    SRV 0        10     2380 etcd-0.$cluster_name.$base_domain.
    99      _etcd-server-ssl._tcp.$cluster_name.$base_domain   86400 IN    SRV 0        10     2380 etcd-1.$cluster_name.$base_domain.
   100      _etcd-server-ssl._tcp.$cluster_name.$base_domain   86400 IN    SRV 0        10     2380 etcd-2.$cluster_name.$base_domain.
   101      ```
   102  
   103  * OpenShift Routes
   104  
   105      OpenShift 4.x requires the DNS record `*.apps.$cluster_name.$base_domain` to point to the load balancer targeting the machines running the ingress router pods. This record must be resolvable by both clients external to the cluster and from all the nodes within the cluster.
   106  
   107  ## Getting Ignition configs for machines
   108  
   109  The OpenShift Installer provides administrators various assets that are required to create an OpenShift cluster, namely:
   110  
   111  * Ignition configs: The OpenShift Installer provides Ignition configs that should be used to configure the RHCOS based bootstrap and control plane machines using `bootstrap.ign`  and `master.ign` respectively. The OpenShift Installer also provides `worker.ign` that can be used to configure the RHCOS based `worker` machines.
   112  
   113  * Admin Kubeconfig: The OpenShift Installer provides a kubeconfig with admin level privileges to Kubernetes APIServer.
   114  
   115      NOTE: This kubeconfig is configured to use `api.$cluster_name.$base_domain` DNS name to communicate with the Kubernetes APIServer.
   116  
   117  ### Setting up install-config for installer
   118  
   119  The OpenShift installer uses an [Install Config](../customization.md#platform-customization) to drive all install time configuration.
   120  
   121  An example install config for bare-metal UPI is as follows:
   122  
   123  ```yaml
   124  apiVersion: v1
   125  ## The base domain of the cluster. All DNS records will be sub-domains of this base and will also include the cluster name.
   126  baseDomain: example.com
   127  compute:
   128  - name: worker
   129    replicas: 1
   130  controlPlane:
   131    name: master
   132    replicas: 3
   133  metadata:
   134    ## The name for the cluster
   135    name: test
   136  platform:
   137    none: {}
   138  ## The pull secret that provides components in the cluster access to images for OpenShift components.
   139  pullSecret: ''
   140  ## The default SSH key that will be programmed for `core` user.
   141  sshKey: ''
   142  ```
   143  
   144  Create a directory that will be used by the OpenShift installer to provide all the assets. For example `test-bare-metal`,
   145  
   146  ```console
   147  $ mkdir test-bare-metal
   148  $ tree test-bare-metal
   149  test-bare-metal
   150  
   151  0 directories, 0 files
   152  ```
   153  
   154  Copy *your* `install-config` to the `INSTALL_DIR`. For example using the `test-bare-metal` as our `INSTALL_DIR`,
   155  
   156  ```console
   157  $ cp <your-instal-config> test-bare-metal/install-config.yaml
   158  $ tree test-bare-metal
   159  test-bare-metal
   160  └── install-config.yaml
   161  
   162  0 directories, 1 file
   163  ```
   164  
   165  NOTE: The filename for `install-config` in the `INSTALL_DIR` must be `install-config.yaml`
   166  
   167  ### Invoking the installer to get Ignition configs
   168  
   169  Given that you have setup the `INSTALL_DIR` with the appropriate `install-config`, you can create the Ignition configs by using the `create ignition-configs` target. For example,
   170  
   171  ```console
   172  $ openshift-install --dir test-bare-metal create ignition-configs
   173  INFO Consuming "Install Config" from target directory
   174  $ tree test-bare-metal
   175  test-bare-metal
   176  ├── auth
   177  │   └── kubeconfig
   178  ├── bootstrap.ign
   179  ├── master.ign
   180  └── worker.ign
   181  
   182  1 directory, 4 files
   183  ```
   184  
   185  The `bootstrap.ign`, `master.ign`, and `worker.ign` files must be made available as http/https file downloads resolvable by the RHCOS nodes.
   186  
   187  ## Booting machines with RHCOS and Ignition configs
   188  
   189  ### Required kernel parameters for boot
   190  A kernel parameter file must be created for each node with the following parameters:
   191  
   192  * `rd.neednet=1`: [CoreOS Installer][coreos-installer] needs internet access to fetch the OS image that needs to be installed on the machine.
   193  
   194  * IP configuration [arguments](https://docs.openshift.com/container-platform/4.3/installing/installing_bare_metal/installing-bare-metal-network-customizations.html#network-customization-config-yaml_installing-bare-metal-network-customizations) may be required to access the network.
   195  
   196  * CoreOS Installer [arguments][coreos-installer-args] are required to be configured to install RHCOS and setup the Ignition config file for that machine.
   197  
   198  * Refer to the following docs for details on booting a PowerVM machine
   199    - [iso boot](https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Power+Systems/page/Mounting+an+ISO+image+on+VIO+client+LPAR)
   200    - [network boot](https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/Power+Systems/page/How+to+initiate+network+boot+of+an+LPAR)
   201  
   202  ## Watching your installation
   203  
   204  ### Monitor for bootstrap-complete
   205  
   206  The administrators can use the `wait-for bootstrap-complete` target of the OpenShift Installer to monitor cluster bootstrapping. The command succeeds when it notices `bootstrap-complete` event from Kubernetes APIServer. This event is generated by the bootstrap machine after the Kubernetes APIServer has been bootstrapped on the control plane machines. For example,
   207  
   208  ```console
   209  $ openshift-install --dir test-bare-metal wait-for bootstrap-complete
   210  INFO Waiting up to 30m0s for the Kubernetes API at https://api.test.example.com:6443...
   211  INFO API v1.16.2 up
   212  INFO Waiting up to 30m0s for bootstrapping to complete...
   213  ```
   214  
   215  ### Configure Image Registry Storage Provisioner
   216  
   217  
   218  The Cluster Image Registry [Operator][cluster-image-registry-operator] does not pick a storage backend for `None` platform. Therefore, the cluster operator will be stuck in progressing because it is waiting for the administrator to [configure][cluster-image-registry-operator-configuration] a storage backend for the image-registry.
   219  [NFS][openshift-nfs] should be picked as a [storage-backend][nfs-storage-backend].
   220  
   221  
   222  #### Configuring NFS
   223  
   224  To make an existing NFS share accessible for OpenShift to use as persistent storage, users must first attach it as a Persistent Volume.  At least 100GB of NFS storage space must be available for the image registry claim.
   225  
   226  ```
   227  apiVersion: v1
   228  kind: PersistentVolume
   229  spec:
   230    accessModes:
   231    - ReadWriteMany
   232    - ReadWriteOnce
   233    capacity:
   234      storage: 100Gi
   235    nfs:
   236      path: <NFS export path>
   237      server: <ip of NFS server>
   238    persistentVolumeReclaimPolicy: Recycle
   239    volumeMode: Filesystem
   240  status: {}
   241  ```
   242  
   243  Once the persistent volume is created, the image registry must be patched to use it.
   244  
   245  ```sh
   246  oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"pvc":{"claim":""}}, "managementState": "Managed"}}'
   247  ```
   248  
   249  #### Configuring Local Storage (testing/development only)
   250  
   251  Alternatively, for non-production clusters, `emptyDir` can be used for testing instead of NFS.
   252  
   253  ```sh
   254  oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}, "managementState": "Managed"}}'
   255  ```
   256  
   257  
   258  ## Monitor for cluster completion
   259  
   260  The administrators can use the `wait-for install-complete` target of the OpenShift Installer to monitor cluster completion. The command succeeds when it notices that Cluster Version Operator has completed rolling out the OpenShift cluster from Kubernetes APIServer.
   261  
   262  ```console
   263  $ openshift-install wait-for install-complete
   264  INFO Waiting up to 30m0s for the cluster to initialize...
   265  ```
   266  
   267  ## Example Power UPI configuration
   268  
   269  An [example terraform configuration](https://github.com/ppc64le/ocp4_upi_powervm) for deploying a
   270  self-contained, development/testing cluster on Power is available.  This example
   271  configuration demonstrates a minimal set of infrastructure services to bring
   272  up a running cluster.  It is not a production-ready configuration.
   273  
   274  The repository includes examples of the following user-provided components,
   275  which are intended to serve as a guide for designing a user's cluster
   276  topology.
   277  
   278  * DNS
   279  * Load Balancing
   280  * DHCP
   281  * File Server (for Ignition configs)
   282  
   283  [cluster-image-registry-operator-configuration]: https://github.com/openshift/cluster-image-registry-operator#registry-resource
   284  [cluster-image-registry-operator]: https://github.com/openshift/cluster-image-registry-operator#image-registry-operator
   285  [coreos-installer-args]: https://github.com/coreos/coreos-installer#kernel-command-line-options-for-coreos-installer-running-in-the-initramfs
   286  [coreos-installer]: https://github.com/coreos/coreos-installer#coreos-installer
   287  [csr-requests]: https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/#requesting-a-certificate
   288  [etcd-ports]: https://github.com/openshift/origin/pull/21520
   289  [machine-config-server]: https://github.com/openshift/machine-config-operator/blob/master/docs/MachineConfigServer.md
   290  [openshift-router]: https://github.com/openshift/cluster-ingress-operator#openshift-ingress-operator
   291  [rrdns]: https://tools.ietf.org/html/rfc1794
   292  [sdn-ports]: https://github.com/openshift/origin/pull/21520
   293  [upi-metal-example-pre-req]: ../../../upi/metal/README.md#pre-requisites
   294  [upi-metal-example]: ../../../upi/metal/README.md
   295  [openshift-nfs]: https://docs.openshift.com/container-platform/4.3/storage/persistent_storage/persistent-storage-nfs.html
   296  [nfs-storage-backend]: https://docs.openshift.com/container-platform/4.3/registry/configuring_registry_storage/configuring-registry-storage-baremetal.html