Links

Use a sandbox preset on a track

This guide explains how to make use of a sandbox preset on a track using either the Web UI or the Instruqt CLI depending on your preference:

Before you begin

You should have already created a track using one of the guides under the Build tracks page, as well as a published sandbox preset by following the guides under the Build sandbox presets page.
Configuring a track to use a sandbox preset requires the following steps:

Step 1: Determine the sandbox preset slug

This step is only required when using the CLI, you will be prompted to select a preset when using the Web UI.
🌐 Web UI
  1. 1.
    Open your browser and go to play.instruqt.com. ↳ Instruqt shows your content.
  2. 2.
    Click Team settings > Sandbox presets. ↳ The Sandbox presets page opens.
  3. 3.
    Find your preset in the list of published presets. If a version has not been published take a look under the drafts tab.
  4. 4.
    Note the slug under the name and version of the preset, prefixed with a forward slash.

Step 2: Configure your track to make use of the preset

🌐 Web UI
💻 Instruqt CLI
  1. 1.
    Open your browser and go to play.instruqt.com. ↳ Instruqt shows your Content page.
  2. 2.
    Click the track you want to configure. ↳ Instruqt shows the corresponding Track overview page.
  3. 3.
    Under Manage Track, click Configure sandbox. ↳ Instruqt shows sandbox page for the current track.
  4. 4.
    Click Use preset. ↳ Instruqt shows a warning modal.
  5. 5.
    Click Proceed and discard edits. ↳ Instruqt shows a list of available presets.
  6. 6.
    Select the preset you want to use for the track and click Use selected preset. ↳ Instruqt shows a page with the currently selected preset.
  1. 1.
    Pull the track config to your local machine by following the guide on how to pull a track.
  2. 2.
    Move into your track directory:
    cd DIRECTORY_NAME
    ⇨ Replace DIRECTORY_NAME with your track directory.
  3. 3.
    In the track.yml file add the sandbox_preset field.
    sandbox_preset: SANDBOX_PRESET_SLUG
    ⇨ Replace SANDBOX_PRESET_SLUG with the slug that you determined in step 1.
    If you still have a config.yml and track_scripts directory they can both be removed. This config will come from the sandbox preset from now on
  4. 4.
    Push the track to Instruqt:
    instruqt track push
Changing preset may affect existing challenges' tabs and lifecycle scripts on the track as the sandbox resources and hosts may differ from the tracks previous config.