OpenShift 3.5 Installation: Difference between revisions
Line 83: | Line 83: | ||
</pre> | </pre> | ||
Configure the DNS client to use the DNS server that was installed as part of the procedure. See [[ | Configure the DNS client to use the DNS server that was installed as part of the procedure. See "[[/etc/resolv.conf#Manual_resolv.conf_Configuration|Manual /etc/resolv.conf Configuration]]" and https://docs.openshift.com/container-platform/3.5/install_config/install/prerequisites.html#prereq-dns | ||
Revision as of 21:33, 22 May 2017
External
Internal
Overview
There are two installation methods: quick install, which uses a CLI tool available in the "atomic-openshift-utils" package, which, in turn, uses Ansible in the background, and advanced install. The advanced install assumes familiarity with Ansible. This document covers advance install.
Prerequisites
External DNS Setup
An external DNS server is required.
Procedure to configure a bind server:
Minimum Hardware Requirements
A full Master installation requires ... GB of disk.
O/S Requirements and Configuration
Install RHEL 7.3 in "minimal" installation mode. A possible way to install it is on top of a VirtualBox virtual machine, as described here.
OpenShift requires NetworkManager on all nodes (see https://docs.openshift.com/container-platform/3.5/install_config/install/prerequisites.html#prereq-networkmanager). Using NetworkManager, assign a static IP address to the interface to be used by the OpenShift cluster, as described here: adding a Static Ethernet Connection with NetworkManager.
Turn off sshd client name DNS verification.
Attach the node to the subscription, using subscription manager, as described here: registering a RHEL System with subscription manager then follow the specific subscription steps required by OpenShift: https://docs.openshift.com/container-platform/3.5/install_config/install/host_preparation.html#host-registration
Sequence of steps - the goal of these steps is to configure the following supported repositories on the system: "rhel-7-server-rpms", "rhel-7-server-extras-rpms", "rhel-7-server-ose-3.5-rpms", "rhel-7-fast-datapath-rpms":
subscription-manager register subscription-manager list --available --matches '*OpenShift*' subscription-manager attach --pool=<pool-id> --quantity=1 subscription-manager repos --disable="*" subscription-manager repos --list-enabled yum repolist yum-config-manager --disable <repo_id> subscription-manager repos --enable="rhel-7-server-rpms" --enable="rhel-7-server-extras-rpms" --enable="rhel-7-server-ose-3.5-rpms" --enable="rhel-7-fast-datapath-rpms" subscription-manager repos --list-enabled yum repolist
Install base packages (https://docs.openshift.com/container-platform/3.5/install_config/install/host_preparation.html#installing-base-packages):
yum install wget git net-tools bind-utils iptables-services bridge-utils bash-completion yum update yum install atomic-openshift-utils
Prevent accidental upgrades of OpenShiift and Docker, by installing "excluder" packages. The *-excluder packages add entries to the "exclude" directive in the host’s /etc/yum.conf file when installed. Those entries can be removed later when we explicitly want to upgrade OpenShift or Docker. More details in yum Exclusion.
yum install atomic-openshift-excluder atomic-openshift-docker-excluder
If later we need to upgrade, we must run the following command:
atomic-openshift-excluder unexclude
Reboot the system to make sure it starts correctly after package installation:
systemctl reboot
Configure the DNS client to use the DNS server that was installed as part of the procedure. See "Manual /etc/resolv.conf Configuration" and https://docs.openshift.com/container-platform/3.5/install_config/install/prerequisites.html#prereq-dns
- Optionally configure the number of cores used by the master and node OpenShift processes.
- Make sure SELinux is enabled on all hosts. If is not, enable SELinux and make sure SELINUXTYPE is "targeted" in /etc/selinux/config.
- Enable Network Time Protocol (NTP) on all hosts in the cluster. This can be done automatically by Ansible, see "openshift_clock_enabled".
- Persistent storage support preparation: https://docs.openshift.com/container-platform/3.5/install_config/persistent_storage/persistent_storage_nfs.html#install-config-persistent-storage-persistent-storage-nfs
- Cloud-provider specific configuration
- https://docs.openshift.com/container-platform/3.5/install_config/configuring_aws.html#install-config-configuring-aws
- https://docs.openshift.com/container-platform/3.5/install_config/configuring_openstack.html#install-config-configuring-openstack
- https://docs.openshift.com/container-platform/3.5/install_config/configuring_gce.html#install-config-configuring-gce
Register all hosts with Red Hat Subscription Manager to RHEL 7.x and OpenShift 3 repositories.
Extra packages required:
yum install wget git net-tools bind-utils iptables-services bridge-utils bash-completion yum update -y
Turn off firewalld and configure the iptables service
- Make sure master can issue remote commands on the nodes without requiring password. Ansible, who runs the installation process, requires a user that has password-less access to all hosts.
From the master, as root:
# ssh-keygen # ssh-copy-id root@node1.example.com
- Configure iptables. iptables must be running and the following ports must be open. Most of the ports will be configured by the installer, automatically - verify that.:
Install Docker
A Docker that works with OpenShift must be installed from rhel-7-server-ose-3.2-rpms and have it running on master and all nodes before installing OpenShift. Version requirements are specified in Prerequisites.
yum install docker
Edit /etc/sysconfig/docker and add:
OPTIONS=--selinux-enabled --insecure-registry 172.30.0.0/16
--insecure-registry instructs Docker daemon to trust any Docker registry on 172.30.0.0/16 subnet without requiring a certificate.
The default loopback storage is not appropriate for production, it should be replaced by a thin-pool logical volume. Use the docker-storage-setup script:
- The script reads configuration options from /etc/sysconfig/docker-storage-setup.
- Reinitialized Docker before starting docker-storage-setup:
systemctl stop docker rm -rf /var/lib/docker/*
- Execute docker-storage-setup to create thin-pool volume free space in the volume group where the root filesystem resides.
- Use the existing volume group to create thin-pool:
# cat /etc/sysconfig/docker-storage-setup DEVS=/dev/vdb VG=docker-vg # docker-storage-setup
TODO B3cEwd.
Generic installation instructions:
Run CLI to Install
Post-Install
Deploy the Integrated Docker Registry
Deploy the HAProxy Router
Load Image Streams
Load Templates
Set up NFS
The NFS server is required for persistent volumes.
Advanced Installation
TODO
DNS Configuration
After setup, the DNS server needs to be configured to resolve a public wildcard DNS entry to the public IP address of the node that executes the default router, by adding an A record, with a low TTL. If the environment has multiple routers, an external load balancer is required.
*.myapp.example.com. 300 IN A 1.2.3.4