Getting set up

Prerequisites for the Lab

Before we dive into the Labs, you need to be able to run the provided Lab VM. It contains a Minikube cluster and all the configurations for the subsequent labs.

  • Internet Access
  • PC with at least:
    • 4 Core CPU
    • 8GB of RAM / 16GB recommended (16GB needed for the Istio Lab)
    • 40GB of free Disk Space

Part 1 - Install Hypervisor

Before we dive into the Labs, you need to be able to run the provided Lab VM. It contains a Minikube cluster and all the configurations for the subsequent labs.

VMWare is the preferred option as it handles nested virtualization that we need for this lab very well. VirtualBox has this option in the latest releases but might prove unstable on certain PCs/Macs (especially the MacBook Pro 16’ seems to run into problems).

Option 1: Installing VMWare (preferred)

If you do not already have VMWare installed, install a 60 days trial for your OS now:

Option 2: Installing VirtualBox

If you do not already have VirtualBox installed, install it for your OS now:

It is important that you use a version equal or newer than 6.1.6!

Part 2 - Download the Lab VM on your PC

The VM is an 13GB zip file that has to be downloaded.

The easiest way to download the file is with IBM Aspera high-speed transfer solution.

Download it here:

Aspera VMWare

Aspera VirtualBox

Aspera OVA

You can also download it from Google Drive, which is much slower.

Download it here (VirtualBox only):

Google Drive VirtualBox

Part 3 - Starting the VM

VMWare

  1. Open the VM by double-clicking on the Training2020.vmx file.

  2. Start the VM from the VmWare interface.

VirtualBox

IMPORTANT: There have been problems reported running VirtualBox and Docker Desktop on Mac at the same time. If you have Docker Desktop running please shut it down first, we’ll use Docker in the VM.

  1. Open the VM by double-clicking on the Training2020.vbox file.

  2. Start the VM from the VmWare interface.

Part 4 - Testing the VM

  1. When the VM is up and running you can login with

    User: training

    Pwd: passw0rd

  2. You can now open the Firefox browser in the VM and check that you can open a webpage (google.com for example)

  3. Open a terminal window (in the dock)

  4. Execute the following commands to initialize your Training Environment

    ./welcome.sh
    

    ``

    This will

    • pull the latest example code from my GitHub repository
    • start minikube if not already running
    • installs the registry
    • installs the Network Plugin (Cilium)
    • starts the Personal Training Environment

    During this you will have to provide a name (your name) that will be used to show your progress in the Instructor Dashboard in order to better assist you.

If you encounter any trouble starting minikube you can try running ./reset.sh

Using your own environment

These are two methods to perform the Labs without downloading and starting the VM.

This is untested and I cannot guarantee that all the Labs will be working 100%.

Standalone installation

For installation on your local PC

1) Install the prerequisites

This describes how to setup an environment on your local PC. This is untested and I cannot guarantee that all the Labs will be working 100%.

You must have the following setup on your PC:

  • Minikube
  • Docker
  • Git
  1. Clone the lab repository to your home directory

    git clone https://github.com/niklaushirt/training.git

  2. Go to the installation directory

    cd ~/training/standalone

  3. Run the preparation script

    ./standalone-pc.sh

  4. Get the Cluster IP (MY-CLUSTER-IP)

    minikube ip
    

    ``

  5. You can access the PTE via

    http://<MY-CLUSTER-IP>:31222
    

    ``

Cloud Installation

1) Create Kubernetes Cluster on IBM Cloud

  1. Go to https://cloud.ibm.com

  2. Login or create your account

  3. Type Kubernetes in the search field and select Kubernetes Service

  4. Select Free Cluster and click Create

  5. Follow the instructions on the Access tab:

    1. Download and install the CLI tools

    2. Log in to your IBM Cloud account.

    3. Set the Kubernetes context

    4. Verify that you can connect

    5. Run the following

      kubectl get nodes                                                                                                                           
             
      > NAME           STATUS   ROLES    AGE   VERSION
      > w.x.y.z.       Ready    <none>   24d   v1.17.6+IKS
      

      ``

    6. Now you’re ready to follow the next steps

2) Install the prerequisites

This describes how to setup an environment in the Cloud. This is untested and I cannot guarantee that all the Labs will be working 100%.

You must have the following setup on your PC:

  • Docker
  • Git
  1. Clone the lab repository to your home directory

    git clone https://github.com/niklaushirt/training.git

  2. Go to the installation directory

    cd ~/training/standalone

  3. Run the preparation script

    ./standalone-cloud.sh

  4. Get the Cluster IP (MY-CLUSTER-IP)

    IBM Cloud Kubernetes Service

    ibmcloud ks worker ls --cluster mycluster-free
    

    ``

    Or any other means for other clouds.

  5. You can access the PTE via

    http://<MY-CLUSTER-IP>:31222
    

    ``

Troubleshooting

  1. If the startup script doesn’t work you can run ./resetEnvironment.sh (this can take up to 30 minutes as it has to redownload all Docker images)

  2. If you lose your PTE Webpage just run minikube service student-ui

  3. Problems on Windows 10

    Can be fixed in most cases by turning off Hyper-V by running (as admin): bcdedit /set hypervisorlaunchtype off and rebooting.

    This disables Hyper-V and allows Virtualbox to support nested virtualisation.

    You can turn it back on again with bcdedit /set hypervisorlaunchtype auto