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:
Configuring a track to use a sandbox preset requires the following steps:
This step is only required when using the CLI, you will be prompted to select a preset when using the Web UI.
🌐 Web UI
- 2.Click Team settings > Sandbox presets. ↳ The Sandbox presets page opens.
- 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.Note the slug under the name and version of the preset, prefixed with a forward slash.
🌐 Web UI
💻 Instruqt CLI
- 2.Click the track you want to configure. ↳ Instruqt shows the corresponding Track overview page.
- 3.Under Manage Track, click Configure sandbox. ↳ Instruqt shows sandbox page for the current track.
- 4.Click Use preset. ↳ Instruqt shows a warning modal.
- 5.Click Proceed and discard edits. ↳ Instruqt shows a list of available presets.
- 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.
- 2.Move into your track directory:cd DIRECTORY_NAME⇨ Replace
DIRECTORY_NAMEwith your track directory.
- 3.In the
track.ymlfile add the
sandbox_presetfield.sandbox_preset: SANDBOX_PRESET_SLUG⇨ Replace
SANDBOX_PRESET_SLUGwith the slug that you determined in step 1.If you still have a
track_scriptsdirectory they can both be removed. This config will come from the sandbox preset from now on
- 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.