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!
- macOS VirtualBox, VMware Fusion, HyperKit
- Linux VirtualBox, KVM
- Windows VirtualBox, Hyper-V
Part 2 - Download the Lab VM on your PC
The VM is an 13GB zip file that has to be downloaded.
Option 1: Download with Aspera (recommended)
The easiest way to download the file is with IBM Aspera high-speed transfer solution.
Download it here:
Option 2: Download from Google Drive (not recommended)
You can also download it from Google Drive, which is much slower.
Download it here (VirtualBox only):
Part 3 - Starting the VM
VMWare
-
Open the VM by double-clicking on the Training2020.vmx file.
-
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.
-
Open the VM by double-clicking on the Training2020.vbox file.
-
Start the VM from the VmWare interface.
Part 4 - Testing the VM
-
When the VM is up and running you can login with
User: training
Pwd: passw0rd
-
You can now open the Firefox browser in the VM and check that you can open a webpage (google.com for example)
-
Open a terminal window (in the dock)
-
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
-
Clone the lab repository to your home directory
git clone https://github.com/niklaushirt/training.git
-
Go to the installation directory
cd ~/training/standalone
-
Run the preparation script
./standalone-pc.sh
-
Get the Cluster IP (MY-CLUSTER-IP)
minikube ip
``
-
You can access the PTE via
http://<MY-CLUSTER-IP>:31222
``
Cloud Installation
1) Create Kubernetes Cluster on IBM Cloud
-
Go to https://cloud.ibm.com
-
Login or create your account
-
Type
Kubernetes
in the search field and selectKubernetes Service
-
Select
Free Cluster
and clickCreate
-
Follow the instructions on the
Access
tab:-
Download and install the CLI tools
-
Log in to your IBM Cloud account.
-
Set the Kubernetes context
-
Verify that you can connect
-
Run the following
kubectl get nodes > NAME STATUS ROLES AGE VERSION > w.x.y.z. Ready <none> 24d v1.17.6+IKS
``
-
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
-
Clone the lab repository to your home directory
git clone https://github.com/niklaushirt/training.git
-
Go to the installation directory
cd ~/training/standalone
-
Run the preparation script
./standalone-cloud.sh
-
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.
-
You can access the PTE via
http://<MY-CLUSTER-IP>:31222
``
Troubleshooting
-
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)
-
If you lose your PTE Webpage just run minikube service student-ui
-
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