forked from openshift/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
OpenShift 4 Installation on Libvirt
Endi S. Dewata edited this page Sep 15, 2023
·
1 revision
This page describes the process to install OpenShift with libvirt based on Libvirt HOWTO.
$ yum install golang-bin gcc-c++ libvirt-devel dep $ yum install libvirt libvirt-devel libvirt-daemon-kvm qemu-kvm $ systemctl enable --now libvirtd
$ export GOPATH=$HOME/go $ export PATH=$PATH:$GOPATH/bin $ export OS_OUTPUT_GOPATH=1
$ 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
Make sure IP forwarding is enabled:
$ sysctl net.ipv4.ip_forward net.ipv4.ip_forward = 1
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
Either disable firewall or allow connections from the IP range used by the cluster nodes. See Firewall.
Make sure a default storage pool has been defined. See libvirt.
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
$ git clone https://github.com/openshift/installer.git $GOPATH/src/github.com/openshift/installer
$ cd $GOPATH/src/github.com/openshift/installer $ hack/build.sh
$ bin/openshift-install create cluster --dir test
$ bin/openshift-install destroy cluster