Lab Environment

Lab description

This lab is designed to simulate real problems in OpenShift Virtualization, providing hands-on experience with troubleshooting and resolving common issues.

bastion

All scripts and commands in this lab environment must be executed exclusively via SSH through the bastion host.

lab script

The lab script is the tool used in this lab with four possible options: break, fix, grade, and clean, each acting on a specific <exercise>.

Usage:

lab <option> <exercise>

Options:

break
  • Purpose: The break command introduces a problem to the specified exercise. This will prepare your exercise with a problem that you have to solve.

  • Example: lab break exercise1

fix
  • Purpose: The fix command resolves the problem introduced by the break, essentially "restoring" the exercise to it’s working state. This is helpful if you’re stuck or want to check your solution against a working example.

  • Example: lab fix exercise1

grade
  • Purpose: The grade command verifies your solution to the exercise. It checks for correctness based on the exercise problem.

  • Example: lab grade exercise1

clean
  • Purpose: The clean command removes any changes you’ve made to the exercise, removes the resources created, and resets it to it’s original state. This is useful if you want to start the exercise from scratch or prepare it for another attempt. It’s recommended that you run after finishing each exercise.

  • Example: lab clean exercise1

Example Workflow:

  1. Start with lab break <exercise> to start the exercise.

  2. Try to resolve the problem manually.

  3. Run lab grade <exercise> to check your solution.

  4. If needed, use lab fix <exercise> to restore functionality or lab clean <exercise> to start over on step 1

  5. At the end of each exercise you have to clean the lab

Virtual machine access

All virtual machines in this lab are configured with the user account lab-user and the password redhat1 *.

* Except exercise8

Do not make any changes within the virtual machine operating system.

Guided solutions

At the end of this lab, there’s a Guided Solution for all exercises that you can use to learn how to solve the problem step by step.

  • The exercise resolution will be approached through the OpenShift Web Console and the oc client.

    • The GUI allows users to interact with resources and perform tasks more visually and is ideal for those who prefer point-and-click actions.

    • The oc client provides a command line interface, giving users more flexibility and control to execute commands and automate tasks.

  • Both methods will ensure that the problem has been solved.

TMUX (Terminal Multiplexer)

In this lab, there’s no direct way to open a second terminal. However, on bastion you can use tmux, which comes pre-installed with some user-friendly customizations to enhance your experience. To start tmux, simply type tmux in the bastion terminal.
To copy and paste within tmux, use the mouse to select the text for copying, and press Ctrl + V to paste.
tmux

What you learned section

At the end of each Guided Solution exercise, you’ll find a detailed explanation of the solution along with a review of the key concepts you learned during the activity.