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

     1  # Installer Overview
     2  
     3  The OpenShift Installer is designed to help users, ranging from novices to experts, create OpenShift clusters in various environments. By default, the installer acts as an installation wizard, prompting the user for values that it cannot determine on its own and providing reasonable defaults for everything else. For more advanced users, the installer provides facilities for varying levels of customization.
     4  
     5  On [supported platforms](../../README.md#supported-platforms), the installer is also capable of provisioning the underlying infrastructure for the cluster. It is recommended that most users make use of this functionality in order to avoid having to provision their own infrastructure. For other platforms or in scenarios where installer-created infrastructure would be incompatible, the installer can stop short of creating the infrastructure, and allow the user to provision their own infrastructure using the cluster assets generated by the installer.
     6  
     7  ## Cluster Installation Process
     8  
     9  OpenShift is unique in that its management extends all the way down to the operating system itself. Every machine boots with a configuration which references resources hosted in the cluster it is joining. This allows the cluster to manage itself as updates are applied. A downside to this approach, however, is that new clusters have no way of starting without external help - every machine in the to-be-created cluster is waiting on the to-be-created cluster.
    10  
    11  OpenShift breaks this dependency loop using a temporary bootstrap machine. This bootstrap machine is booted with a concrete [Ignition Config][ignition] which describes how to create the cluster. This machine acts as a temporary control plane whose sole purpose is launching the rest of the cluster.
    12  
    13  The main assets generated by the installer are the Ignition Configs for the bootstrap, master, and worker machines. Given these three configs (and correctly configured infrastructure), it is possible to start an OpenShift cluster. The process for bootstrapping a cluster looks like the following:
    14  
    15    1. The bootstrap machine boots and starts hosting the remote resources required for the master machines to boot.
    16    2. The master machines fetch the remote resources from the bootstrap machine and finish booting.
    17    3. The master machines use the bootstrap node to form an etcd cluster.
    18    4. The bootstrap node starts a temporary Kubernetes control plane using the newly-created etcd cluster.
    19    5. The temporary control plane schedules the production control plane to the master machines.
    20    6. The bootstrap node injects OpenShift-specific components via the temporary control plane.
    21    7. The temporary control plane shuts down, leaving just the production control plane.
    22    8. The installer tears down the bootstrap node.
    23  
    24  The result of this bootstrapping process is a fully running OpenShift cluster. The cluster will then download and configure remaining components needed for the day-to-day operation, including the creation of worker machines in supported platforms.
    25  
    26  [ignition]: https://github.com/coreos/ignition/blob/master/docs/getting-started.md
    27  
    28  ## Key Concepts
    29  
    30  While striving to remain simple and easy to use, the installer allows many aspects of the clusters it creates to be customized. It is helpful to understand certain key concepts before attempting to customize the installation.
    31  
    32  ### Targets
    33  
    34  The OpenShift Installer operates on the notion of creating and destroying targets. Similar to other tools which operate on a graph of dependencies (e.g. make, systemd), each target represents a subset of the dependencies in the graph. The main target in the installer creates a cluster, but the other targets allow the user to interrupt this process and consume or modify the intermediate artifacts (e.g. the Kubernetes manifests that will be installed into the cluster). Only the immediate dependencies of a target are written to disk by the installer, but the installer can be invoked [multiple times](#multiple-invocations).
    35  
    36  The following targets can be created by the installer:
    37  
    38  - `install-config` - The install config contains the main parameters for the installation process. This configuration provides the user with more options than the interactive prompts and comes pre-populated with default values.
    39  - `manifests` - This target outputs all of the Kubernetes manifests that will be installed on the cluster.
    40  - `ignition-configs` - These are the three Ignition Configs for the bootstrap, master, and worker machines.
    41  - `cluster` - This target provisions the cluster and its associated infrastructure.
    42  
    43  The following targets can be destroyed by the installer:
    44  
    45  - `cluster` - This destroys the created cluster and its associated infrastructure.
    46  - `bootstrap` - This destroys the bootstrap infrastructure.
    47  
    48  ### Multiple Invocations
    49  
    50  In order to allow users to [customize their installation](customization.md), the installer can be invoked multiple times. The state is stored in a hidden file in the asset directory and contains all of the intermediate artifacts. This allows the installer to pause during the installation and wait for the user to modify intermediate artifacts.
    51  
    52  For example, you can create an install config and save it in a cluster-agnostic location:
    53  
    54  ```sh
    55  openshift-install --dir=initial create install-config
    56  mv initial/install-config.yaml .
    57  rm -rf initial
    58  ```
    59  
    60  You can use the saved install-config for future clusters by copying it into the asset directory and then invoking the installer:
    61  
    62  ```sh
    63  mkdir cluster-0
    64  cp install-config.yaml cluster-0/
    65  openshift-install --dir=cluster-0 create cluster
    66  ```
    67  
    68  Supplying a previously-generated install-config like this is explicitly part of the stable installer API.
    69  Note that the installer would consume `install-config.yaml` from the asset directory.
    70  At any point before running `destroy cluster`, `install-config.yaml` can be regenerated by running `openshift-install --dir=cluster-0 create install-config`.
    71  
    72  You can also edit the assets in the asset directory during a single run.
    73  For example, you can adjust [the cluster-version operator's configuration][cluster-version]:
    74  
    75  ```sh
    76  mkdir cluster-1
    77  cp install-config.yaml cluster-1/
    78  openshift-install --dir=cluster-1 create manifests  # warning: this target is unstable
    79  "${EDITOR}" cluster-1/manifests/cvo-overrides.yaml
    80  openshift-install --dir=cluster-1 create cluster
    81  ```
    82  
    83  As the unstable warning suggests, the presence of `manifests` and the names and content of its output is an unstable installer API.
    84  It is occasionally useful to make alterations like this as one-off changes, but don't expect them to work on subsequent installer releases.
    85  
    86  [cluster-version]: https://github.com/openshift/cluster-version-operator/blob/master/docs/dev/clusterversion.md
    87  
    88  ### CoreOS bootimages
    89  
    90  The `openshift-install` binary contains pinned versions of RHEL CoreOS "bootimages" (e.g. OpenStack `qcow2`, AWS AMI, bare metal `.iso`).
    91  Fully automated installs use these by default.
    92  
    93  For UPI (User Provisioned Infrastructure) installs, you can use the `openshift-install coreos print-stream-json` command to access information
    94  about the bootimages in [CoreOS Stream Metadata](https://github.com/coreos/stream-metadata-go) format.
    95  
    96  For example, this command will print the `x86_64` AMI for `us-west-1`:
    97  
    98  ```
    99  $ openshift-install coreos print-stream-json | jq -r '.architectures.x86_64.images.aws.regions["us-west-1"].image'
   100  ami-0c548bdf93b74cd59
   101  ```
   102  
   103  For on-premise clouds (e.g. OpenStack) with UPI installs, you may need to manually copy
   104  a bootimage into the infrastructure.  Here's an example command to print the `x86_64` `qcow2` file for `openstack`:
   105  
   106  ```
   107  $ openshift-install coreos print-stream-json | jq -r '.architectures.x86_64.artifacts.openstack.formats["qcow2.gz"]'
   108  {
   109    "disk": {
   110      "location": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-openstack.x86_64.qcow2.gz",
   111      "signature": "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.8/48.83.202102230316-0/x86_64/rhcos-48.83.202102230316-0-openstack.x86_64.qcow2.gz.sig",
   112      "sha256": "abc2add9746eb7be82e6919ec13aad8e9eae8cf073d8da6126d7c95ea0dee962",
   113      "uncompressed-sha256": "9ed73a4e415ac670535c2188221e5a4a5f3e945bc2e03a65b1ed4fc76e5db6f2"
   114    }
   115  }
   116  ```