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
  • Background
  • Overview
  • Step 1: Create a track
  • Step 2: Add a challenge
  • Step 3: Add a check script
  • Step 4: Deploy a track (CLI only)
  • Step 5: Play a track
  • Next steps

Was this helpful?

Edit on GitHub
  1. Getting started

Quickstart

Learn how to deploy your first Instruqt track.

PreviousStudy RoomNextManage tracks

Last updated 1 year ago

Was this helpful?

Background

Tracks are guided learning experiences. There are two main parts to a track:

  • for users to complete.

  • for users to interact with, in challenges.

Every time a learner plays a track, the following occurs:

  1. Instruqt deploys a sandbox.

  2. The first challenge is presented to the leaner.

  3. The learner solves the challenge by interacting with the sandbox, and optionally checks their work.

  4. The subsequent challenge is displayed, or the track finishes.

Overview

You will build a track that teaches learners how to create files and directories in Linux.

Step 1: Create a track

Create a track with the Instruqt Web UI or CLI:

  1. Click Create track in the upper-right corner of the Content page.

  2. Select Use template from the dropdown.

  3. Click Select on the Sandbox container template. This template has an Ubuntu container in its sandbox, and an initial challenge created. ↳ This opens a "Create track" dialogue

  4. Input a track title and slug (URL).

  5. Finally, click Create. ↳ This opens the Track dashboard page

A track slug is a unique identifier for your tracks, often used in URLs.

  1. Run the following command to create a track:

    instruqt track create
  2. Enter My First Track as the track title.

  3. When asked to select a build method, input 2 to select From a template.

  4. When asked to select a template, input 2 for the Sandbox container template.

The create command will generate a file structure similar to the following:

Track file structure
my-first-track/
    config.yml                    # sandbox configuration file
    track.yml                     # track configuration file
    01-creating-a-directory/      # first challenge directory
        assignment.md             # challenge config and assignment

Step 2: Add a challenge

A challenge has a few components:

  • A title, slug, and assignment.

  • Tabs with components that you make available to the learner. For example, a terminal.

  • Scripts that prepare the challenge, check if the learner solved the challenge, etc.

Add a second challenge to the track with the Instruqt Web UI or CLI:

  1. In the Challenges section of the Track dashboard page, click Add new.

  2. Select Assignment from the dropdown. ↳ This opens a new challenge page

  3. Enter Creating a text file and creating-file as the challenge name and URL.

  4. In the Description field, enter Learn how to create a text file.

  5. In the upper-right corner, click Save.

  6. From the top menu bar, click Tabs.

  7. Click Add new tab.

  8. Select the Terminal tab type.

  9. In the Tab name field, enter Shell. In the Select your host list, pick container.

  10. Click Save.

  11. From the top menu bar, click Assignment and enter the following markdown:

    Let's create a text file
    ========================
    
    Use the `echo` command to create the text file named "quickstart":
    
    ```
    echo "This quickstart rocks" > quickstart
    ```
    
    To complete this track, click the **Check** button.
  12. Click Save changes.

  1. Change into the directory created for the track:

    cd my-first-track
  2. Enter the following command to add the challenge:

    instruqt challenge create --title "Creating a text file"
  3. Open the 02-creating-a-text-file\assignment.md file, replace its contents with the following, then save the file.

    ---
    slug: creating-a-text-file
    type: challenge
    title: Create a text file
    teaser: Learn how to create a text file.
    notes:
    - type: text
      contents: Please wait while we set up the second challenge
    tabs:
    - title: Shell
      type: terminal
      hostname: container
    difficulty: basic
    timelimit: 600
    ---
    
    Let's create a text file
    ========================
    
    Use the `echo` command to create the text file named "quickstart":
    
    ```
    echo "This quickstart rocks" > quickstart
    ```
    
    To complete this track, click the **Check** button.

Line 1 to 15is the configuration of the challenge in YAML, while line 17 onwards is markdown for the assignment learners will see.

Step 3: Add a check script

You can expand a challenge with a script to check if a learner has solved the challenge. This way, you can support the learner if they need help, or praise then when solving a challenge.

Add a script that checks if the learner created the required text file:

  1. Click the Creating a text file challenge.

  2. Click Scripts to open the Lifecycle Scripts page.

  3. Under container, click check.

  4. Enter the following bash script to check if the learner created the text file:

    #!/bin/bash
    set -euxo pipefail
    
    echo "Checking if the text file quickstart exists."
    
    if [ -f /root/quickstart ]
    then
        echo "The text file quickstart exists"
    else
        fail-message "There is no text file named quickstart, did you create it?"
    fi
  5. Click Save.

  6. Click the track name in the upper-left to open the Track dashboard page again.

  1. Open the 02-creating-a-text-file\check-container file in your code editor, replace it's content with this bash script, then save the file.

    #!/bin/bash
    set -euxo pipefail
    
    echo "Checking if the text file quickstart exists."
    
    if [ -f /root/quickstart ]
    then
        echo "The text file quickstart exists"
    else
        fail-message "There is no text file named quickstart, did you create it?"
    fi

Step 4: Deploy a track (CLI only)

If you are using the CLI, then run the following command to upload your track to Instruqt:

  1. Run the following command to upload your track:

    instruqt track push

Changes made from the web UI are automatically deployed, so no further action is required.

Step 5: Play a track

You can now play your track. Test the track as if you are a learner:

  1. Click Play track on the Track dashboard page.

  2. Wait until your environment is created and click Start.

  3. Solve the first challenge and click Check.

  4. Click Start again and solve the second challenge.

  5. Click Check again to see if you solved the second challenge.

  6. Click Return to overview to close the track execution.

  1. Enter the following command to play the track:

    instruqt track open

    ↳ Your default browser opens the Track overview page.

  2. Click Start track.

  3. Wait until your environment is created and click Start.

  4. Solve the first challenge and click Check.

  5. Notice that you solved the first challenge.

  6. Click Start again and solve the second challenge.

  7. Click Check again to see if you solved the second challenge.

  8. Click Finish to close the track execution.

Next steps

We recommend the following articles to continue your learning journey:

To use the Instruqt CLI you must install the executable. Instructions can be found .

Check out to learn more about the files created in the CLI.

Read the for more information on the types of scripts you can use in your challenges and tracks.

Read the for more information on the types of scripts you can use in your challenges and tracks.

🚩
here
this documentation
Lifecycle Scripts documentation
Lifecycle Scripts documentation
Challenge tabs
Sandbox hosts
Cloud accounts
Lifecycle scripts
Challenges
Sandboxes
Watch this introduction to Instruqt to learn more.
Check scripts between challenges wil validate work