Skip to content

Lab‐1: Install Microshift

anandpavithran edited this page Oct 23, 2024 · 10 revisions
  1. Access the RH134 Workstation.


  2. Open firefox and download the file (microshiftrepo.tar) (use download ICON) from the following link[in WORKSTATION].


    https://drive.google.com/file/d/1k3fODGbKbrzkgf_i7jQy8hkeEc6LJCol/view?usp=sharing


  3. Copy the file to servera machine

    [student@workstation ~]$ scp /home/student/Downloads/microshiftrepo.tar student@servera:

  4. From workstation, access servera as student user

    [student@workstation ~]$ ssh student@servera
  5. From terminal of servera list the files

    [student@servera ~]$ ls
  6. Extract the packages required for installation

    [student@servera ~]$ tar -xvf microshiftrepo.tar
  7. Switch to package directory

    [student@servera ~]$ cd /home/student/root/microshiftrepo
  8. Install the required packages.

    [student@servera microshiftrepo]$ sudo dnf install * -y


    Note: If above command fails, try "sudo dnf install * -y – -skip-broken
    [student@servera microshiftrepo]$ cd

  9. Download pullsecret to workstation using RedHat account from the url below
    https://console.redhat.com/openshift/create/local

  10. Copy the pullsecret

    [student@workstation ~]$ scp /home/student/Downloads/pull-secret root@servera:/etc/crio/openshift-pull-secret

  11. Change the ownership and permission of pullsecret file

    [student@servera ~]$ sudo chown root:root /etc/crio/openshift-pull-secret

    [student@servera ~]$ sudo chmod 600 /etc/crio/openshift-pull-secret

  12. Configure LVM

    [student@servera ~]$ sudo fdisk -l

    [student@servera ~]$ sudo pvcreate /dev/vd{b,c,d}

    [student@servera ~]$ sudo vgcreate vmdisk /dev/vd{b,c,d}

    [student@servera ~]$ sudo vgs

  13. Create a file for configuring lvm based permanent storage for microshift. Copy from


    https://github.com/anandpavithran/microshift/blob/main/lvmd.yaml

    [student@servera ~]$ sudo vi /etc/microshift/lvmd.yaml

  14. Disable the firewalld as it is the lab environment.

    [student@servera ~]$ sudo systemctl disable firewalld


    [student@servera ~]$ sudo systemctl stop firewalld

  15. Start and enable microshift

    [student@servera ~]$ sudo systemctl enable microshift


    [student@servera ~]$ sudo systemctl start microshift

  16. Configure access to Microshift

    [student@servera ~]$ mkdir .kube

    [student@servera ~]$ sudo cp /var/lib/microshift/resources/kubeadmin/kubeconfig ~/.kube/config

    [student@servera ~]$ sudo chown student:student ~/.kube/config

    [student@servera ~]$ oc get pod -A

Clone this wiki locally