Instruqt Docs
  • 🚩Getting started
    • Overview
    • Setting up
      • Study Room
    • Quickstart
  • 🛤️Tracks
    • Manage tracks
      • Create tracks
      • Edit locally
      • Test tracks
      • Track logs
      • Track time limits
      • Track feedback
      • Developer workflow
      • Track tags
      • Track authors
      • Delete tracks
      • Custom layouts
      • Version control
      • Loading experience
    • Challenges
      • Create challenges
      • Challenge tabs
      • Challenge order
      • Skip challenges
      • Add quizzes
      • Assignment display
      • Assignment editor
    • Share tracks
      • Live Events
        • Instructor tools
      • Track invites
      • Embed tracks
      • Landing pages
  • 🏖️Sandboxes
    • Overview
    • Sandbox hosts
      • Add hosts
      • Custom VM images
      • Custom container images
      • Public images
      • Windows VMs
      • Website service
      • SSL certificates
    • Cloud accounts
      • Securing your cloud accounts
      • Cloud Client
      • AWS accounts
        • AWS Environment Variables
        • AWS Managed Policies
        • AWS IAM Policies
        • AWS SCP Policies
      • Azure subscriptions
        • Azure Environment Variables
        • Azure Roles
        • Azure Resource Providers
      • GCP projects
        • GCP Environment Variables
        • GCP IAM Permissions
    • Lifecycle scripts
      • Scripting overview
      • Track scripts
      • Challenge scripts
      • Example scripts
      • Helper scripts
    • UI Checks
    • Global Sandbox Settings
      • Hot start
      • Sandbox presets
      • Custom resources
      • Cloud services and regions
        • Allowed services and regions
    • Secrets and variables
      • Runtime variables
      • Runtime parameters
      • Secrets
  • ⚙️Settings
    • Integrations
      • Salesforce (Beta)
      • HubSpot (Beta)
      • HubSpot (Using zapier)
      • LTI
      • Version control
        • GitHub
    • Authentication
      • SSO
      • API keys
    • Platform
      • API
      • Webhooks
      • Track limits
  • 💡Reference
    • Feature overview
    • Instruqt CLI
      • Commands
      • Configuration files
      • Assets
    • Instruqt platform
      • Networking
      • Host machine types
      • Quotas and limits
      • Roles and permissions
      • Network access
      • Requirements
  • 🛟Resources
    • Content design tips
    • Advanced use cases
    • Templates
    • FAQ
      • Running Windows Client Hosts on Instruqt
      • Using Cleanup Scripts in SaaS and Cloud Environments
      • Instruqt Regional Configurations and Restrictions
      • Troubleshooting Instruqt CLI Authentication Issues
      • Copy a Track from One Organization to Another via CLI
      • Network Configuration: IP and MAC Address Control
      • Container Troubleshooting in Instruqt
Powered by GitBook
On this page
  • Overview
  • Track level files
  • Challenge level files

Was this helpful?

Edit on GitHub
  1. Reference
  2. Instruqt CLI

Configuration files

Learn about configuration files for editing locally.

PreviousCommandsNextAssets

Last updated 5 months ago

Was this helpful?

Overview

Instruqt tracks are artifacts and are made up of configuration files that contain all the properties and settings for tracks in and format. You manage these files either from Web UI or Instruqt CLI. For example, the configuration file track.yml sets track characteristics and can look something like this:

slug: mytrack
id: baekpuxv2m5g
type: track
title: MyTrack
teaser: Get started quickly with just one container-based sandbox host.
description: Get started quickly with a container-based sandbox host. Choose a container
  when you need a fast, lightweight Linux system.
icon: https://cdn.instruqt.com/assets/templates/ubuntu.png
tags: []
owner: myteam
developers:
- developer@content.com
maintenance: true
show_timer: true
skipping_enabled: true

You probably recognize tracks details like title and teaser as you set them from Web UI. But you can also set these properties by manipulating the track.yml file from your code editor and push your changes with Instruqt CLI to the Instruqt platform.

YAML files use spaces for indentation. Use 2 or 4 spaces for indentation, but no tabs.

If you created a track with Instruqt CLI or pulled a track to your machine, you will find the configuration files inside the track directory and subdirectories:

# Example directory layout with track configuration files
.
├── 01-first-challenge          # First challenge
|   ├── assignment.md           # Challenge assignment and configuration
│   ├── check-host01            # Challenge lifecycle scripts
│   └── solve-host01
├── 02-second-challenge         # Second challenge
|   ├── assignment.md
│   ├── setup-host01
│   ├── check-host01
│   ├── solve-host01
│   └── cleanup-host01
├── track_scripts               # Track lifecycle scripts
│   ├── setup-host01
│   └── cleanup-host01
├── config.yml                  # Sandbox configuration
└── track.yml                   # Track configuration

Track level files

Generally speaking, there are four file types at a track level:

The config.yml file contains the sandbox definition of a track.

version: "3"
# container definitions
containers:
- name: <hostname>
  image: <container_image>
  shell: <shell_type>
  memory: <memory_mb>
  
# website host definitions
virtualbrowsers:
- name: <hostname>
  url: <website_urls>

# virtual machine definitions
virtualmachines:
- name: <hostname>
  image: <gcp_project>/<image_name>
  shell: <shell_type>
  machine_type: <machine_size>

# cloud account definitions
gcp_projects:
- name: <project_name>
  services:
  - <service_name>.googleapis.com
  roles: 
  - roles/<role_name>
aws_accounts:
- name: <account_name>
  managed_policies:
  - arn:aws:iam::aws:policy/<policy_name>
azure_subscriptions:
- name: <subcription_name>
  roles:
  - <role_name>
  
# sandbox secrets
secrets:
- name: <secret>

The track.yml file contains the track metadata and settings.

slug: <track_slug>
id: <track_id>
title: <track_title>
teaser: <track_teaser>
description: <track_description>
icon: <path_to_icon>
tags: [<tag>,<tag>]
owner: <instruqt_team_name>
developers:
- <developer_email>
idle_timeout: <value_in_seconds>
timelimit: <value_in_seconds>
extend_ttl: <value_in_seconds>
lab_config:
  sidebar_enabled: <boolean>
  feedback_recap_enabled: <boolean>
  feedback_tab_enabled: <boolean>
  loadingMessages: <boolean>
  theme:
    name: <modern-dark_or_original>
  default_layout: <AssignmentRight_or_AssignmentLeft_or_AssignmentBottom>
  default_layout_sidebar_size: <value_between_25_100>
  override_challenge_layout: <boolean>

The setup-<hostname> file is the script that runs after a track stops.

Example script
#!/bin/bash
set -euxo pipefail

# Wait for the Instruqt host bootstrap to finish
until [ -f /opt/instruqt/bootstrap/host-bootstrap-completed ]
do
    sleep 1
done

...more commands...

Instruqt scripts can be written in any language, including PowerShell and Python.

The cleanup-<hostname> file is the script that runs once a host is provisioned.

Example script
#!/bin/bash
set -euxo pipefail

curl -X POST https://my-api.com/delete/resource/X

Instruqt scripts can be written in any language, including PowerShell and Python.

File name
Description

config.yml

Contains the sandbox definition in YAML.

track.yml

Contains the track definition in YAML.

setup-host

Contains a script for setting up the track.

cleanup-host

Contains a script for cleaning up the track.

Challenge level files

File name
Description

assignment.md

Contains challenge definition in YAML, learner assignment in markdown.

setup-host

Script for setting up the challenge.

check-host

Script for checking if the learner solved the challenge.

solve-host

Script for automatically solving a challenge when a learner skips.

cleanup-host

Script for cleaning up the challenge.

To learn how to use these files, read the docs.

For more information on Track scripts, .

For more information on challenge scripts,

💡
Infrastructure-as-Code
YAML
Markdown
Edit locally
read these docs
read these docs.