Created
August 6, 2021 14:27
-
-
Save sbuvaneshkumar/08de07a1f491abe5d1200f4f80ba5e09 to your computer and use it in GitHub Desktop.
ocp4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum groupinstall -y "GNOME Desktop" "Graphical Administration Tools" "Development Tools" && yum install -y git tigervnc* && yum install qemu-kvm virt-manager libvirt libvirt-python libvirt-devel libguestfs-tools virt-install virt-viewer epel-release -y && systemctl enable --now libvirtd && printf "redhat\nredhat\n\n" | vncpasswd && vncserver && virsh pool-define-as --name default --type dir --target /home && virsh pool-autostart default && virsh pool-start default && yum install -y https://releases.hashicorp.com/vagrant/2.2.14/vagrant_2.2.14_x86_64.rpm && mkdir vagrant && cd vagrant && wget https://gist.githubusercontent.com/sbuvaneshkumar/962fc91abd603e9704a479bf19567fc1/raw/33451fc72b047b854787f0116447d5f88c9aa427/Vagrantfile && echo 'unix_sock_group = "libvirt"' >> /etc/libvirt/libvirtd.conf && echo 'unix_sock_rw_perms = "0770"' >> /etc/libvirt/libvirtd.conf && systemctl restart libvirtd && vagrant plugin install vagrant-libvirt && vagrant box add fedora/32-cloud-base --provider=libvirt && cd | |
# Vagrant | |
yum install -y | |
# Openshift 4 in kvm | |
scp pull-secret | |
export version=4.6.1 | |
echo -e "[main]\ndns=dnsmasq" > /etc/NetworkManager/conf.d/nm-dns.conf && systemctl restart NetworkManager && cd /root && git clone https://github.com/kxr/ocp4_setup_upi_kvm.git && bash -x /root/ocp4_setup_upi_kvm/ocp4_setup_upi_kvm.sh --ocp-version $version --vm-dir /home && export KUBECONFIG=/root/ocp4_setup_ocp4/install_dir/auth/kubeconfig && wget https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/openshift-client-linux.tar.gz && tar xvf openshift-client-linux.tar.gz && mv oc kubectl /bin/ && oc get nodes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment