Installation of OpenShift
Installation of OpenShift
Installation Of OpenShift
• System Requirements:
The hosts should meet the following minimum requirements:
Masters:
• Physical or virtual system or an instance running on a public or private IaaS.
• Base OS: Fedora 21, CentOS 7.5, Red Hat Enterprise Linux (RHEL) 7.5 or later with the
"Minimal" installation option and the latest packages from the Extras channel.
• If RHEL is being used, the following minimal kernel versions are required:
a) RHEL 7.5: 3.10.0-862.31.1
b) RHEL 7.6: 3.10.0-957.27.2
c) RHEL 7.7: 3.10.0-1062
• Minimum 4 vCPUs
• Minimum 16 GB RAM (additional if etcd is co-hosted on the master)
• Minimum 40GB mountpoint for /var
• Minimum 16GB mountpoint for /usr/local/bin
• Minimum 1GB temp directory
• Masters with etcd co-located need minimum 4 cores
Nodes:
• Physical or virtual system or an instance running on a public or private IaaS.
• Base OS: Fedora 21, CentOS 7.5, Red Hat Enterprise Linux (RHEL) 7.5 or later with the
"Minimal" installation option and the latest packages from the Extras channel, or RHEL Atomic
Host 7.4.5 or later. If you use RHEL, you must use the following minimal kernel versions:
a) RHEL 7.5: 3.10.0-862.31.1
b) RHEL 7.6: 3.10.0-957.27.2
c) RHEL 7.7: 3.10.0-1062
• NetworkManager 1.0 or later
• 1 vCPU • Minimum 8 GB RAM
• Minimum 15 GB mountpoint for /var
• Minimum 1 GB mountpoint for /usr/local/bin
• Minimum 1 GB temp directory •
• Additional minimum 15GB unallocated storage on each system running the containers, required
for Docker storage
Ansible controller: The host that runs the Ansible controller must have 75MiB free memory per host
in the inventory.
Installation Of OpenShift Container Platform(non-HA):
we will be installing a single master and a single node setup. OKD 3.11 Can also be installed as an
all-in-one setup (master and node on the same machine) but this scenario is not recommended for
production systems.
1. Preparing the hosts:
a) Setting the value for PATH variable Ensure the PATH variable for the root user contains the
following directories: /bin, /sbin, /usr/bin, /usr/sbin
b) Configuring password-less SSH
Generate a SSH key on the master
# ssh-keygen
Copy the SSH key on the nodes
# ssh-copy-id -i ~/.ssh/id_rsa.
pub Confirm you can perform a password-less SSH to all the hosts
c) Install Ansible from the EPEL repository:
#Install the EPEL repository:
yum –y install
#Disable the EPEL repo to prevent its accidental use
Sed -i -e "s/^enabled=1/enabled=0/" /etc/yum.repos.d/epel.repo
#Install Ansible
yum -y --enablerepo=epel install ansible pyOpenSSL
#Install Git
yum -y install git
#Start NetworkManager service on CentOS
chkconfig NetworkManager on
service NetworkManager start
#Change SELinux mode and REBOOT.
/etc/selinux/config -> set SELINUX=enforcing
d) Clone the openshift/openshift-ansible repository from GitHub. This repo provides all the required
ansible playbooks for the installation:
# cd /root
# git clone https://github.com/openshift/openshiftansible
# cd openshift-ansible
# git checkout release-3.11
e) Docker installation: (Docker 1.13)
# yum install docker-1.13.1
Verify that version 1.13 was installed:
# rpm -V docker-1.13.1
# docker version
2. Configuring the inventory file:The inventory files contain all the details about the hosts in your
OpenShift environment, and also various variables and options that can be configured. The OpenShift
ansible playbooks parse the inventory file to get this information and install OKD across the hosts.
Lets now take a look at the commonly used variables from the inventory file:
OSEv3:children
This section contains the master and node groups in the environment.
Cluster variables: Global environment variables are set under the [OSEv2:vars] section of the hosts
file. Each parameter needs to be entered on a separate line.
debug_level=2
This variable sets the log level for INFO messages written to systemjournald.service
ansible_ssh_user=root
This sets the SSH user for the installer to use, and the default is root.
openshift_deployment_type=origin
openshift_release=3.11
This sets the deployment type and version of OpenShift
os_firewall_use_firewalld=true
Set to true to use the firewalld service instead of iptables
openshift_disable_check=memory_availability,disk_availa bility
This disables pre-install checks for the comma separated names of check names
openshift_metrics_install_metrics=false
This toggles installation of the OpenShift
openshift_cluster_monitoring_operator_install=false
This toggles installation of Prometheus
openshift_web_console_install=true
Used to enable/disable the OpenShift web console deployment
openshift_use_openshift_sdn=true
This sets the cluster to use OpenShift SDN plugin
os_sdn_network_plugin_name=redhat/openshift-ovsmultitenan
This sets the OpenShift SDN plugin to be used.
openshift_master_identity_providers=[{'name’:
'htpasswd_auth', 'login': 'true', 'challenge': 'true’,
'kind': 'HTPasswdPasswordIdentityProvider'}]
This variable sets the identity provider. In this case, it validates users and passwords against a file
generated using htpasswd.
openshift_master_htpasswd_users {'': '', '': '<hashed-password>’,’<name>’: ‘<hashed-password>’}