Difference between revisions of "OpenShift 4"

From Dogtag
Jump to: navigation, search
m (See Also)
m (See Also)
Line 119: Line 119:
  
 
* [[OpenShift]]
 
* [[OpenShift]]
 +
* [https://try.openshift.com/ try.openshift.com]
 
* [https://github.com/openshift/installer openshift/installer]
 
* [https://github.com/openshift/installer openshift/installer]
 
* [https://blog.openshift.com/openshift-4-install-experience/ OpenShift 4: Install Experience]
 
* [https://blog.openshift.com/openshift-4-install-experience/ OpenShift 4: Install Experience]
 
* [[Terraform]]
 
* [[Terraform]]
 
* [[libvirt]]
 
* [[libvirt]]

Revision as of 20:36, 16 April 2019

Overview

This page describes the process to install OpenShift with libvirt based on Libvirt HOWTO.

Installing Dependencies

$ yum install golang-bin gcc-c++ libvirt-devel dep
$ yum install libvirt libvirt-devel libvirt-daemon-kvm qemu-kvm
$ systemctl enable --now libvirtd

Environment Variables

$ export GOPATH=$HOME/go
$ export PATH=$PATH:$GOPATH/bin
$ export OS_OUTPUT_GOPATH=1

Configuring Permissions

$ cat <<EOF >> /etc/polkit-1/rules.d/80-libvirt.rules
polkit.addRule(function(action, subject) {
  if (action.id == "org.libvirt.unix.manage" && subject.local && subject.active && subject.isInGroup("wheel")) {
      return polkit.Result.YES;
  }
});
EOF

Enabling IP Forwarding

Make sure IP forwarding is enabled:

$ sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1

Configuring libvirt

Edit /etc/libvirt/libvirtd.conf:

listen_tls = 0
listen_tcp = 1
auth_tcp="none"
tcp_port = "16509"

Edit /etc/sysconfig/libvirtd:

LIBVIRTD_ARGS="--listen"

Then:

$ systemctl restart libvirtd

Configuring Firewall

Either disable firewall or allow connections from the IP range used by the cluster nodes. See Firewall.

Configuring Storage Pool

Make sure a default storage pool has been defined. See libvirt.

Configure NetworkManager DNS Overlay

Configure NetworkManager to use dnsmasq:

$ echo -e "[main]\ndns=dnsmasq" | tee /etc/NetworkManager/conf.d/openshift.conf

Configure dnsmasq to use the cluster:

$ echo server=/tt.testing/192.168.126.1 | tee /etc/NetworkManager/dnsmasq.d/openshift.conf

Reload NetworkManager:

$ systemctl reload NetworkManager

Getting the Source Code

$ git clone https://github.com/openshift/installer.git $GOPATH/src/github.com/openshift/installer

Building OpenShift Installer

$ cd $GOPATH/src/github.com/openshift/installer
$ hack/build.sh

Installing OpenShift Cluster

$ bin/openshift-install create cluster --dir test

Removing OpenShift Cluster

$ bin/openshift-install destroy cluster

See Also