Building an On-Demand Exercise (ODX)
This tutorial shows you how to create an on-demand exercise using a group of Crucible applications. You'll start from a clean, default Crucible stack and build a working on-demand exercise delivered through Moodle. You'll use Caster, Player, Steamfitter, and Alloy to define infrastructure, scenarios, and participant interaction, and then connect the exercise to Moodle for delivery using the Crucible Plugin for Moodle.
Assumptions
This tutorial assumes the following:
- You have a deployed Crucible platform
- The Crucible platform contains Caster, Player, and Alloy
- You have installed the Crucible plugin in Moodle
- vCenter or Proxmox capacity sized for ODX behavior
- You have the
AdministratororContent Developerrole in the Crucible apps
As you work through this tutorial, you may want to learn more about the Crucible applications or features. If so, refer to the Related Resources section below for additional detail and reference information.
Step 1: Creating the Player View Template
Create the Player View that participants will use during the exercise. Alloy clones this view for each event. For additional detail, see the Player documentation, Manage Views.
- Log into Player.
- In the upper-right corner, select your username, then Administration.
- From the left navigation, select Views.
- Click the + icon to add a new view.
- Enter a Name and Description, set the Status to Active or Inactive, and check Template.
- Select Applications to add applications to the view, using either existing templates or a blank starting point.
- Select Teams to add teams and assign roles and permissions.
- (Optional) Select Files to upload files to the view.
Step 2: Creating the Caster Project and Directory
Create a Caster project and directory to store the Terraform infrastructure-as-code for the exercise topology. For additional detail, see the Caster User Guide.
- Log into Caster.
- Click the + icon to create a new Project, then Save.
- From the left navigation, select Add Directory to add a directory containing your Terraform configuration (modules and variables).
- Make sure that the Terraform configuration is ready to run
planandapply.
vCenter with cluster licensing
Do not enable Dynamic Host. Point Terraform at the vCenter cluster and allow vCenter to manage host placement.
vCenter without cluster licensing
Enable Dynamic Host in Alloy so Caster selects a host at launch. When Alloy creates a workspace, Caster sets DynamicHost=true, chooses the least-loaded host among those assigned to the exercise, and writes a generated_host_values.auto.tfvars with vsphere_host_name and vsphere_datastore. Regardless of licensing model, when the event ends, the system deletes the workspace and releases the host usage.
Step 3: Creating a Steamfitter Scenario Template
(Optional) Create a Scenario Template to run tasks and injects during the event. For additional detail, see the Steamfitter documentation, Scenario Templates.
- Log into Steamfitter.
- Select Scenario Templates, then click Add Scenario Template.
- Enter a Name, Description, and set the Duration Hours.
- Click Save.
- Select the new Scenario Template and, next to Tasks:, click + to add a task to help define your scenario. Complete the same task information as you would if you were creating a new task.
Info
For additional details on tasks, see Tasks in the Steamfitter Guide.
Step 4: Creating the Alloy Event Template
Alloy ties the exercise components together and provides participants with a centralized location to engage in the exercise. For additional detail, see the Alloy documentation, Deploy an Event/Exercise.
- Log into Alloy.
- In the upper-right corner, select your username, then Administration.
- In the left navigation, select Event Templates, then click Add New Event Template.
- Next to the New Event Template, click the Edit icon to set a Name, Event Template Description, and Duration Hours.
- From the dropdown menus (or by pasting IDs), select the following:
- Player View Template
- Caster Directory
- Steamfitter Scenario Template
- Click Save to apply your changes.
Step 5: Launching and Validating
From the Alloy home page (you may have to exit the Alloy Administration screen):
- Click Open next to the Event Template.
- In the Event screen, click Launch.
Observe the lifecycle. During launch, Alloy does the following:
- Clones the Player View.
- Applies the Caster workspace to vCenter.
- Starts the Steamfitter scenario.
- Makes the Player apps visible to teams and participants.
In Player, you can now interact with the apps you assigned to the View.
Step 6: Exposing the Exercise in Moodle
To make Crucible labs or exercises available in Moodle, you have to use the Crucible Moodle Plugin. The plugin adds Crucible as an activity type in Moodle and provides the connection between Moodle and a deployed Crucible environment.
You can get the Crucible Moodle plugin from its official GitHub repository: Crucible Plugin for Moodle
The Crucible Moodle plugin allows instructors and learners to launch, access, and stop Crucible exercises from within a Moodle course, without Moodle running the lab itself. Moodle manages access and courses, while Crucible runs the exercise.
Assuming that you:
- Run a working Moodle site.
- Run a deployed and operational Crucible stack.
- Configured authentication for Moodle and Crucible.
- Created a Crucible exercise.
The next steps are to:
- Download the Crucible Moodle plugin from its GitHub repository.
- Install the Crucible Moodle plugin on your Moodle site.
- Configure the plugin so Moodle knows how to reach the Crucible environment.
- Add a Crucible activity to a Moodle course.
- Point that activity at an existing Crucible exercise.
- Launch the exercise from the Moodle course (in an iframe) or in a new tab/window.