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

     1  # Install: z/VM User Provided Infrastructure
     2  
     3  The steps for performing a UPI-based install are outlined here. Several [Ansible Playbooks][upi-zvm-example] are provided as an example to help model your own.
     4  
     5  ## Table of contents
     6  
     7  1. Minimum compute requirements
     8  
     9  2. Network topology requirements
    10  
    11  3. DNS requirements
    12  
    13  4. Getting Ignition configs for machines
    14  
    15  5. Getting OS related assets for machines
    16  
    17  6. Booting machines with RHCOS and Ignition configs
    18  
    19  7. Watching your installation (bootstrap complete, cluster available)
    20  
    21  8. Example Bare-Metal UPI deployment
    22  
    23  ## Compute
    24  
    25  The smallest OpenShift 4.x clusters require the following host:
    26  
    27  * 1 bootstrap machine.
    28  
    29  * 3 control plane machines.
    30  
    31  * at least 2 worker machines.
    32  
    33  NOTE: The cluster requires the bootstrap machine to deploy the OpenShift cluster on to the 3 control plane machines, and you can remove the bootstrap machine.
    34  
    35  The bootstrap and control plane machines must use Red Hat Enterprise Linux CoreOS (RHCOS) as the operating system.
    36  
    37  ### Minimum resource requirements
    38  
    39  Processing
    40  Memory
    41  Storage
    42  Networking
    43  
    44  [todo-link-to-minimum-resource-requirements]
    45  
    46  ## Network Topology Requirements
    47  
    48  OpenShift 4.x on Z currently requires all nodes to have internet access to pull images for platform containers and provide telemetry data to Red Hat.  OpenShift generally supports air-gapped installs, but this feature is not yet available for z/VM.
    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 as target 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 more details refer [doc][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, but also can be used as source for configuring RHEL based machines [todo-link-to-BYO-RHEL].
   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: 3
   130  controlPlane:
   131    name: master
   132    replicas: 2
   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 IPL 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://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-configuring_ip_networking_from_the_kernel_command_line) 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  * `console=ttysclp0` : Console TTY argument for s390x
   199  
   200  * `rd.znet`, `rd.dasd`, and/or `rd.zfcp` : IBM Z device ID [arguments](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/chap-installer-booting-ipl-s390) are required to access network and disk devices.
   201  
   202  ### IPL Boot RHCOS on z/VM
   203  
   204  * Using a 3270 console, connect to each guest and clear the z/VM virtual reader
   205  ```### 3270 console - for each z/VM guest
   206  logon <zvm_user> here
   207  cp query rdr all
   208  cp pur rdr all
   209  ```
   210  
   211  * For each z/VM guest, punch the RHCOS kernel, parameters file, and initramfs into the guest's virtual reader
   212    * example using `vmur` from another guest on the same z/VM hypervisor
   213  ```console
   214  # obtain the RHCOS images
   215  $ curl -O <RHCOS kernel>
   216  $ curl -O <RHCOS initramfs>
   217  
   218  # load the virtual punch card devices
   219  $ cio_ignore -r c-e
   220  # activate the virtual punch card devices
   221  $ chccwdev -e c-e
   222  
   223  # punch the kernel into the virtual reader
   224  $ vmur pun -r -u <z/vm guest id> -N kernel.img rhcos-<version>-installer-kernel
   225  # punch the parameter file created in an earlier step
   226  $ vmur pun -r -u <z/vm guest id> -N generic.parm <bootstrap,master,worker>.prm
   227  # punch the initramfs into the virtual reader
   228  $ vmur pun -r -u <z/vm guest id> -N initrd.img rhcos-<version>-installer-initramfs.img
   229  ```
   230  
   231  * Using a 3270 console, connect to each guest and boot from the virtual reader
   232  ```### 3270 console - for each z/VM guest
   233  cp ipl 00c
   234  cp set run on
   235  ```
   236  
   237  ## Watching your installation
   238  
   239  ### Monitor for bootstrap-complete
   240  
   241  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,
   242  
   243  ```console
   244  $ openshift-install --dir test-bare-metal wait-for bootstrap-complete
   245  INFO Waiting up to 30m0s for the Kubernetes API at https://api.test.example.com:6443...
   246  INFO API v1.12.4+c53f462 up
   247  INFO Waiting up to 30m0s for the bootstrap-complete event...
   248  ```
   249  
   250  ### Configure Image Registry Storage Provisioner
   251  
   252  
   253  The Cluster Image Registry [Operator][cluster-image-registry-operator] does not pick an 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.
   254  [NFS][openshift-nfs] should be picked as a [storage-backend][nfs-storage-backend].
   255  
   256  
   257  #### Configuring NFS
   258  
   259  NFS is currently the only supported persistent storage option for OpenShift on Z.  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.
   260  
   261  ```
   262  apiVersion: v1
   263  kind: PersistentVolume
   264  spec:
   265    accessModes:
   266    - ReadWriteMany
   267    - ReadWriteOnce
   268    capacity:
   269      storage: 100Gi
   270    nfs:
   271      path: <NFS export path>
   272      server: <ip of NFS server>
   273    persistentVolumeReclaimPolicy: Recycle
   274    volumeMode: Filesystem
   275  status: {}
   276  ```
   277  
   278  Once the persistent volume is created, the image registry must be patched to use it.
   279  
   280  ```
   281  oc patch configs.imageregistry.operator.openshift.io/cluster --type merge --patch '{"spec":{"storage":{"pvc":{"claim":""}}}}'
   282  ```
   283  
   284  #### Configuring Local Storage (testing/development only)
   285  
   286  Alternatively, for non-production clusters, `emptyDir` can be used for testing instead of NFS.
   287  
   288  ```sh
   289  oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}'
   290  ```
   291  
   292  ### Disabling Control Plane Schedulability
   293  
   294  By default, when the OpenShift installer creates a cluster without any managed
   295  workers (as is the default in a UPI installation), it configures the scheduler
   296  to allow user-created application pods to be scheduled to the master nodes.  In a
   297  production cluster, the master nodes should not be schedulable so that user-created
   298  applications can not consume resources dedicated to the control plane.  Users should
   299  configure the cluster to disable master schedulability.
   300  
   301  ```
   302  oc patch schedulers.config.openshift.io/cluster --type merge --patch '{"spec":{"mastersSchedulable": false}}'
   303  ```
   304  
   305  ## Monitor for cluster completion
   306  
   307  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.
   308  
   309  ```console
   310  $ openshift-install wait-for install-complete
   311  INFO Waiting up to 30m0s for the cluster to initialize...
   312  ```
   313  
   314  ## Example z/VM UPI configuration
   315  
   316  An [example ansible configuration][multiarch-upi-playbooks] for deploying a
   317  self-contained, development/testing cluster on z/VM is available.  This example
   318  configuration demonstrates a minimal set of infrastructure services to bring
   319  up a running cluster.  It is not a production-ready configuration.
   320  
   321  The repository includes examples of the following user-provided components,
   322  which are intended to serve as a guide for designing a user's cluster
   323  topology.
   324  
   325  * DNS
   326  * Load Balancing
   327  * DHCP
   328  * File Server (for Ignition configs)
   329  
   330  [cluster-image-registry-operator-configuration]: https://github.com/openshift/cluster-image-registry-operator#registry-resource
   331  [cluster-image-registry-operator]: https://github.com/openshift/cluster-image-registry-operator#image-registry-operator
   332  [coreos-installer-args]: https://github.com/coreos/coreos-installer#kernel-command-line-options-for-coreos-installer-running-in-the-initramfs
   333  [coreos-installer]: https://github.com/coreos/coreos-installer#coreos-installer
   334  [csr-requests]: https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/#requesting-a-certificate
   335  [etcd-ports]: https://github.com/openshift/origin/pull/21520
   336  [machine-config-server]: https://github.com/openshift/machine-config-operator/blob/master/docs/MachineConfigServer.md
   337  [openshift-router]: https://github.com/openshift/cluster-ingress-operator#openshift-ingress-operator
   338  [rrdns]: https://tools.ietf.org/html/rfc1794
   339  [sdn-ports]: https://github.com/openshift/origin/pull/21520
   340  [upi-metal-example-pre-req]: ../../../upi/metal/README.md#pre-requisites
   341  [upi-metal-example]: ../../../upi/metal/README.md
   342  [openshift-nfs]: https://docs.openshift.com/container-platform/4.2/storage/persistent-storage/persistent-storage-nfs.html
   343  [nfs-storage-backend]: https://docs.openshift.com/container-platform/4.2/registry/configuring-registry-storage/configuring-registry-storage-baremetal.html
   344  [multiarch-upi-playbooks]: https://github.com/multi-arch/multiarch-upi-playbooks
   345  [upi-zvm-example]: ./install_upi.md#example-zvm-upi-configuration