$ atomic-openshift-installer install
The quick installation method allows you to use an interactive CLI utility,
atomic-openshift-installer command, to install OpenShift across a set of
hosts. This installer can deploy OpenShift components on targeted hosts by
either installing RPMs or running containerized services.
This installation method is provided to make the installation experience easier by interactively gathering the data needed to run on each host. The installer is a self-contained wrapper intended for usage on a Red Hat Enterprise Linux (RHEL) 7 system. While RHEL Atomic Host is supported for running containerized OpenShift services, the installer is provided by an RPM not available by default in RHEL Atomic Host, and must therefore be run from a RHEL 7 system. The host initiating the installation does not need to be intended for inclusion in the OpenShift cluster, but it can be.
In addition to running interactive
installations from scratch, the
atomic-openshift-installer command can also
be run or re-run using a predefined installation configuration file. This file
can be used with the installer to:
Alternatively, you can use the advanced installation method for more complex environments.
By default, any hosts you designate as masters during the installation process are automatically also configured as nodes so that the masters are configured as part of the OpenShift SDN. The node component on the masters, however, are marked unschedulable, which blocks pods from being scheduled on it. After the installation, you can mark them schedulable if you want.
Before installing OpenShift, you must first satisfy the prerequisites on your hosts, which includes verifying system and environment requirements and properly installing and configuring Docker. You must also be prepared to provide or validate the following information for each of your targeted hosts during the course of the installation:
User name on the target host that should run the Ansible-based installation (can be root or non-root)
Whether to install components for master, node, or both
Whether to use the RPM or containerized method
Internal and external IP addresses
If you are interested in installing OpenShift using the containerized method (optional for RHEL but required for RHEL Atomic Host), see RPM vs Containerized to ensure that you understand the differences between these methods, then return to this topic to continue.
Ensure you have read through Before You Begin.
You can start the interactive installation by running:
$ atomic-openshift-installer install
Then follow the on-screen instructions to install a new OpenShift Enterprise cluster.
The installer can use a predefined installation configuration file, which contains information about your installation, individual hosts, and cluster. When running an interactive installation, an installation configuration file based on your answers is created for you in ~/.config/openshift/installer.cfg.yml. The file is created if you are instructed to exit the installation to manually modify the configuration or when the installation completes. You can also create the configuration file manually from scratch to perform an unattended installation.
version: v1 (1) variant: openshift-enterprise (2) variant_version: 3.1 (3) ansible_ssh_user: root (4) ansible_log_path: /tmp/ansible.log (5) hosts: (6) - ip: 10.0.0.1 (7) hostname: master-private.example.com (7) public_ip: 22.214.171.124 (8) public_hostname: master.example.com (8) master: true (9) node: true (9) containerized: true (10) connect_to: 126.96.36.199 (11) - ip: 10.0.0.2 hostname: node1-private.example.com public_ip: 188.8.131.52 public_hostname: node1.example.com node: true connect_to: 10.0.0.2 - ip: 10.0.0.3 hostname: node2-private.example.com public_ip: 184.108.40.206 public_hostname: node2.example.com node: true connect_to: 10.0.0.3
|1||The version of this installation configuration file. As of OpenShift
Enterprise (OSE) 3.1, the only valid version here is
|2||The OpenShift variant to install. For OSE, set this to
|3||A valid version your selected variant. If not specified, this defaults to
the newest version for the specified variant. For example:
|4||Defines which user Ansible uses to SSH in to remote systems for gathering facts and for the installation. By default, this is the root user, but you can set it to any user that has sudo privileges.|
|5||Defines where the Ansible logs are stored. By default, this is the /tmp/ansible.log file.|
|6||Defines a list of the hosts onto which you want to install the OpenShift master and node components.|
|7||Required. Allows the installer to connect to the system and gather facts before proceeding with the install.|
|8||Required for unattended installations. If these details are not specified, then this information is pulled from the facts gathered by the installer, and you are asked to confirm the details. If undefined for an unattended installation, the installation fails.|
|9||Determines the type of services that are installed. At least one of these must be set to true for the configuration file to be considered valid.|
|10||If set to true, containerized OpenShift services are run on target master and node hosts instead of installed using RPM packages. If set to false or unset, the default RPM method is used. RHEL Atomic Host requires the containerized method, and is automatically selected for you based on the detection of the /run/ostree-booted file. See RPM vs Containerized for more details. Containerized installations are supported starting in OSE 3.1.1.|
|11||The IP address that Ansible attempts to connect to when installing, upgrading, or uninstalling the systems. If the configuration file was auto-generated, then this is the value you first enter for the host during that interactive install process.|
Ensure you have read through the Before You Begin.
Unattended installations allow you to define your hosts and cluster configuration in an installation configuration file before running the installer so that you do not have to go through all of the interactive installation questions and answers. It also allows you to resume an interactive installation you may have left unfinished, and quickly get back to where you left off.
To run an unattended installation, first define an
file at ~/.config/openshift/installer.cfg.yml. Then, run the installer with
$ atomic-openshift-installer -u install
By default in interactive or unattended mode, the installer uses the configuration file located at ~/.config/openshift/installer.cfg.yml if the file exists. If it does not exist, attempting to start an unattended installation fails.
Alternatively, you can specify a different location for the configuration file
-c option, but doing so will require you to specify the file
location every time you run the installation:
$ atomic-openshift-installer -u -c </path/to/file> install
After the installation completes:
Verify that the master is started and nodes are registered and reporting in Ready status. On the master host, run the following as root:
# oc get nodes NAME LABELS STATUS master.example.com kubernetes.io/hostname=master.example.com,region=infra,zone=default Ready,SchedulingDisabled node1.example.com kubernetes.io/hostname=node1.example.com,region=primary,zone=east Ready node2.example.com kubernetes.io/hostname=node2.example.com,region=primary,zone=west Ready
To verify that the web console is installed correctly, use the master host name and the console port number to access the console with a web browser.
For example, for a master host with a hostname of
master.openshift.com and using the default port of
8443, the web console would be found at:
Now that the install has been verified, run the following command on each master and node host to add the atomic-openshift packages back to the list of yum excludes on the host:
# atomic-openshift-excluder exclude
Then, see What’s Next for the next steps on configuring your OpenShift cluster.
You can use the installer to add nodes to your existing cluster, or to reinstall the cluster entirely.
If you installed OpenShift using the installer in either
unattended mode, you can re-run the
installation as long as you have an
file at ~/.config/openshift/installer.cfg.yml (or specify a different
location with the
If you installed using the advanced installation method and therefore do not have an installation configuration file, you can either try creating your own based on your cluster’s current configuration, or see the advanced installation method on how to run the playbook for adding new nodes directly.
To add nodes or reinstall the cluster:
Re-run the installer with the
install subcommand in interactive or
$ atomic-openshift-installer [-u] [-c </path/to/file>] install
The installer will detect your installed environment and allow you to either add an additional node or perform a clean install:
Gathering information from hosts... Installed environment detected. By default the installer only adds new nodes to an installed environment. Do you want to (1) only add additional nodes or (2) perform a clean install?:
Choose one of the options and follow the on-screen instructions to complete your desired task.
You can uninstall OpenShift Enterprise on all hosts in your cluster using the installer by running:
$ atomic-openshift-installer uninstall
See the advanced installation method for more options.