You might see the following lab activity types in this course:
A guided exercise is a hands-on practice exercise that follows a presentation section. It walks you through a procedure to perform, step by step.
A quiz is typically used when checking knowledge-based learning, or when a hands-on activity is impractical for some other reason.
An end-of-chapter lab is a gradable hands-on activity to help you to check your learning. You work through a set of high-level steps, based on the guided exercises in that chapter, but the steps do not walk you through every command. A solution is provided with a step-by-step walk-through.
A comprehensive review lab is used at the end of the course. It is also a gradable hands-on activity, and might cover content from the entire course. You work through a specification of what to do in the activity, without receiving the specific steps to do so. Again, a solution is provided with a step-by-step walk-through that meets the specification.
To prepare your lab environment at the start of each hands-on activity, run the lab start command with a specified activity name from the activity's instructions.
Likewise, at the end of each hands-on activity, run the lab finish command with that same activity name to clean up after the activity.
Each hands-on activity has a unique name within a course.
The syntax for running an exercise script is as follows:
[student@workstation ~]$ lab action exerciseThe action is a choice of start, grade, or finish.
All exercises support start and finish.
Only end-of-chapter labs and comprehensive review labs support grade.
The start action verifies the required resources to begin an exercise.
It might include configuring settings, creating resources, confirming prerequisite services, and verifying necessary outcomes from previous exercises.
You can perform an exercise at any time, even without performing preceding exercises.
For gradable activities, the grade action directs the lab command to evaluate your work, and shows a list of grading criteria with a PASS or FAIL status for each.
To achieve a PASS status for all criteria, fix the failures and rerun the grade action.
The finish action cleans up resources that were configured during the exercise.
You can perform an exercise as many times as you want.
The lab command supports tab completion.
For example, to list all exercises that you can start, enter lab start and then press the Tab key twice.
The DO180 course uses a Python-based lab script that configures the directory structure for each guided exercise and lab activity.
The workspace directory for this course is /home/student/DO180.
The lab script copies the necessary files for each course activity to the workspace directory.
For example, the lab start updates-rollout command does the following tasks:
Creates an updates-rollout directory in the workspace: /home/student/DO180/labs/updates-rollout workspace.
Copies the files for the activity to the /home/student/DO180/labs/updates-rollout directory.
If an error occurs while running the lab command, then you might want to review the following files:
/tmp/log/labs: This directory contains log files.
The lab script creates a unique log file for each activity.
For example, the log file for the lab start updates-rollout command is /tmp/log/labs/updates-rollout.
/home/student/.grading/config.yaml: This file contains the course-specific configuration.
Do not modify this file.
The lab start commands usually verify whether the Red Hat OpenShift Container Platform (RHOCP) cluster is ready and reachable.
If you run the lab start command right after creating the classroom environment, then you might get errors when the command verifies the cluster API or the credentials.
These errors occur because the RHOCP cluster might take up to 15 minutes to become available.
A convenient solution is to run the lab finish command to clean up the scenario, wait a few minutes, and then rerun the lab start command.
In this course, the lab start scripts normally create a specific RHOCP project for each exercise.
The lab finish scripts remove the exercise-specific RHOCP project.
If you are retrying an exercise, then you might need to wait before running the lab start command again.
The project removal process might take up to 10 minutes to be fully effective.