OpenShift hosts

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Examples

Overview

The default Ansible inventory file is /etc/ansible/hosts. It is used by the Ansible playbook to install the OpenShift environment. The inventory file describes the configuration and the topology of the OpenShift cluster. A generally accepted method is to start from a template like the ones linked from Examples above and customize it to match the environment.

Configuration Elements

Ansible Configuration


If anything else than "root" is used for installation, both "ansible_ssh_user" and "ansible_become" must be set.

ansible_ssh_user

The ssh user used by Ansible to connect to hosts. This user should allow ssh based authentication without requiring a password, and also it should allow passwordless sudo to root. If using ssh key based authentication, then the key should be managed by an ssh agent. Also see ansible_become. See Support Node for O/S level configuration required by an "ansible" user.

ansible_become

If ansible_ssh_user is not root, ansible_become must be set to true and the user must be configured for passwordless sudo.

General Settings

openshift_enable_unsupported_configurations

Enable unsupported configurations, things that will yield a partially functioning cluster but would not be supported for production use.

debug_level

Describes which INFO messages are logged to the systemd-journald.service. Set one of the following:

  • 0 to log errors and warnings only
  • 2 to log normal information (default)
  • 4 to log debugging-level information
  • 6 to log API-level (request/response) debugging information
  • 8 to log body-level API debugging information

This can also be configured after installation by following the procedure described here:

Change the Log Level for OpenShift Processes

openshift_use_system_containers

If set to true, containerized OpenShift services (instead of RPM-based) are run on all nodes. The default is "false", which means the default RPM method is used. RHEL Atomic Host requires the containerized method, which is automatically selected for you based on the detection of the /run/ostree-booted file. Since 3.1.1.

openshift_deployment_type

Deployment type ("origin" or "openshift-enterprise").

For more details see:

https://docs.openshift.com/container-platform/3.5/install_config/install/advanced_install.html#advanced-install-deployment-types

openshift_release

openshift_install_examples

Set to true to install example imagestreams and templates during install and upgrade.

openshift_master_identity_providers

openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]

openshift_master_htpasswd_file

Path on the support node, usually /etc/ansible/installation-htpasswd

Make sure "ansible" can read it.

osm_use_cockpit

osm_use_cockpit=true

osm_cockpit_plugins

osm_cockpit_plugins=['cockpit-kubernetes']

openshift_master_cluster_method

The "native" method implies a load balancer. If no "lb" group is defined, the installer assumes that a load balancer has been independently deployed and pre-configured. If a host is defined in the "lb" section of the inventory file, Ansible installs and configures HAProxy automatically on that host. For this HA method, 'openshift_master_cluster_hostname' must resolve to the internal hostname of the load balancer or to one or all of internal hostnames of the masters defined in the inventory if no load balancer is present.

openshift_master_cluster_method=native

openshift_master_cluster_hostname

openshift_master_cluster_hostname=api-lb.ocp36.local

openshift_master_cluster_public_hostname

openshift_master_cluster_public_hostname=master.openshift.novaordis.io

openshift_master_default_subdomain

The default subdomain to use for exposed routes. This name must be a valid wildcard DNS subdomain and resolve correctly to a publicly accessible IP address both 1) externally and 2) by the DNS serving the OpenShift cluster.

osm_default_node_selector

Override the node selector that projects will use by default when placing pods.

osm_default_node_selector='env=app'

openshift_hosted_router_selector

Router selector (optional) - router will only be created if nodes matching this label are present.

openshift_hosted_router_selector='env=infra'

Organizatorium

If the target nodes have multiple network interfaces, and the network interface used to cluster OpenShift is NOT associated with the default route, modify the inventory file as follows:

...
openshift_set_node_ip=true

...
[nodes]
master1.openshift35.local openshift_ip=172.23.0.4 ...

Network Configuration

TODO: https://docs.openshift.com/container-platform/3.5/install_config/configuring_sdn.html#install-config-configuring-sdn

Logging Configuration

OpenShift Logging Concepts

openshift_hosted_logging_deploy

Logging infrastructure deployment is disabled by default. It can be enabled by setting:

openshift_hosted_logging_deploy=true

Other Logging Configuration Options

https://docs.openshift.com/container-platform/latest/install_config/aggregate_logging.html#aggregate-logging-ansible-variables

Organizatorium

openshift_master_default_subdomain

OpenShift 3.5 Installation