|
|
Line 1: |
Line 1: |
− | = Overview = | + | = Installation = |
| | | |
− | This page describes the process to install OpenShift with [[libvirt]] based on [https://github.com/openshift/installer/blob/master/docs/dev/libvirt-howto.md Libvirt HOWTO].
| + | * [[OpenShift 4 Installation on Libvirt]] |
− | | |
− | = Installing Dependencies =
| |
− | | |
− | <pre>
| |
− | $ yum install golang-bin gcc-c++ libvirt-devel dep
| |
− | $ yum install libvirt libvirt-devel libvirt-daemon-kvm qemu-kvm
| |
− | $ systemctl enable --now libvirtd
| |
− | </pre>
| |
− | | |
− | = Environment Variables =
| |
− | | |
− | <pre>
| |
− | $ export GOPATH=$HOME/go
| |
− | $ export PATH=$PATH:$GOPATH/bin
| |
− | $ export OS_OUTPUT_GOPATH=1
| |
− | </pre>
| |
− | | |
− | = Configuring Permissions =
| |
− | | |
− | <pre>
| |
− | $ 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
| |
− | </pre>
| |
− | | |
− | = Enabling IP Forwarding =
| |
− | | |
− | Make sure IP forwarding is enabled:
| |
− | | |
− | <pre>
| |
− | $ sysctl net.ipv4.ip_forward
| |
− | net.ipv4.ip_forward = 1
| |
− | </pre>
| |
− | | |
− | = Configuring libvirt =
| |
− | | |
− | Edit /etc/libvirt/libvirtd.conf:
| |
− | | |
− | <pre>
| |
− | listen_tls = 0
| |
− | listen_tcp = 1
| |
− | auth_tcp="none"
| |
− | tcp_port = "16509"
| |
− | </pre>
| |
− | | |
− | Edit /etc/sysconfig/libvirtd:
| |
− | | |
− | <pre>
| |
− | LIBVIRTD_ARGS="--listen"
| |
− | </pre>
| |
− | | |
− | Then:
| |
− | | |
− | <pre>
| |
− | $ systemctl restart libvirtd
| |
− | </pre>
| |
− | | |
− | = 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:
| |
− | | |
− | <pre>
| |
− | $ echo -e "[main]\ndns=dnsmasq" | tee /etc/NetworkManager/conf.d/openshift.conf
| |
− | </pre>
| |
− | | |
− | Configure dnsmasq to use the cluster:
| |
− | | |
− | <pre>
| |
− | $ echo server=/tt.testing/192.168.126.1 | tee /etc/NetworkManager/dnsmasq.d/openshift.conf
| |
− | </pre>
| |
− | | |
− | Reload NetworkManager:
| |
− | | |
− | <pre>
| |
− | $ systemctl reload NetworkManager
| |
− | </pre>
| |
− | | |
− | = Getting the Source Code =
| |
− | | |
− | <pre>
| |
− | $ git clone https://github.com/openshift/installer.git $GOPATH/src/github.com/openshift/installer
| |
− | </pre>
| |
− | | |
− | = Building OpenShift Installer =
| |
− | | |
− | <pre>
| |
− | $ cd $GOPATH/src/github.com/openshift/installer
| |
− | $ hack/build.sh
| |
− | </pre>
| |
− | | |
− | = Installing OpenShift Cluster =
| |
− | | |
− | <pre>
| |
− | $ bin/openshift-install create cluster --dir test
| |
− | </pre>
| |
− | | |
− | = Removing OpenShift Cluster =
| |
− | | |
− | <pre>
| |
− | $ bin/openshift-install destroy cluster
| |
− | </pre>
| |
| | | |
| = See Also = | | = See Also = |
Line 123: |
Line 10: |
| * [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]]
| |