Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sbuvaneshkumar/08de07a1f491abe5d1200f4f80ba5e09 to your computer and use it in GitHub Desktop.
Save sbuvaneshkumar/08de07a1f491abe5d1200f4f80ba5e09 to your computer and use it in GitHub Desktop.
ocp4
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