Create a track from a template
Speed up track building.
This guide explains how to create a template-based track through Web UI and Instruqt CLI.
Templates are track skeletons based on commonly used sandbox types. Using templates speeds up your track building. Because after creating from a template, you only have to complete the track. But first, you decide which template best suits your needs.

Before you begin

Did you check the Build tracks page? This page sets you off for creating tracks.

Create track

Step 1: Decide which template you need

Use the following table to decide which template best suits your needs:
Need/situation
Template
Content
I need a sandboxed AWS account in my Instruqt track
AWS Cloud Account
  • Link an AWS cloud account to your sandbox
  • Use the cloud client Docker container
  • Use the AWS CLI and UI from our learn environment
  • Limit usage of the cloud account using IAM and SCP policies
I need a container-based sandbox host
Sandbox container
Lightweight Linux system
I need a virtual machine with more computing power and memory. Or I want to run Docker containers.
Sandbox virtual machine
  • Provision virtual machine sandbox host using a predefined Compute Engine image
  • Use the Docker daemon on the sandbox host to build and run container images
  • Add check and solve scripts
  • Add simple assets (a Dockerfile) to the sandbox host
I need a pre-installed helm chart.
Helm chart
  • A virtual machine with a kubernetes cluster
  • Helm already installed on the machine
  • NGINX ingress controller pre-installed on the kubernetes cluster
I need a single node Kubernetes cluster
Kubernetes
  • Provision a single node k3s cluster on a virtual machine
  • Deploy a webserver (NGINX) on Kubernetes
  • Use a service tab to expose the web server through the Instruqt UI
I need a Kubernetes cluster on multiple sandbox hosts
Multi-node Kubernetes cluster
  • Provision a multi-node k3s cluster
  • Use a predefined Instruqt image with k3s
  • Pass parameters to a sandbox host using environment variables
  • Use the track setup script to block loading the track until all services are up
I need a VS Code editor
VSCode & TypeScript
  • Add IDE code editor features to an Instruqt track
  • Use a code server container to serve a VSCode IDE
  • Run a unit test suite in a check script

Step 2: Create a track from a template

This guide will choose the Kubernetes template. If you choose another template, replace your choice where appropriate.
Pick the Web UI or the Instruqt CLI route depending on your preference:
🌐 Web UI
πŸ’» Instruqt CLI
  1. 1.
    Open your browser and go to play.instruqt.com. ↳ Instruqt shows your content.
  2. 2.
    Click Create track on the Content page. ↳ The Start creating content page opens.
  3. 3.
    Click Create from template to open the Instruqt templates page.
  4. 4.
    Select the template of your choice. ↳ The Track info pop-up opens.
  5. 5.
    In the Track title field, enter your title.
  6. 6.
    In the Track slug field, modify the slug if you want to.
  7. 7.
    Click Create. ↳ Instruqt creates the track and shows the Track overview page of the newly created track.
  1. 1.
    Type the following command to create a track:
    1
    instruqt track create
    Copied!
  2. 2.
    Enter the track title:
    1
    ==> Track title: KubernetesTrack
    Copied!
  3. 3.
    Enter option 2 to select From a template:
    1
    ==> Start with an empty track or use a template:
    2
    ​
    3
    [1] From scratch
    4
    For full flexibility, start with an empty track
    5
    [2] From a template
    6
    To get started quickly, start from one of our templates
    7
    ​
    8
    Please select your method: 2
    Copied!
  4. 4.
    Enter the number of the template you want to use:
    1
    ==> Choose a template:
    2
    ​
    3
    [1] AWS Cloud Account
    4
    Learn how to build tracks with an AWS account
    5
    [2] Sandbox container
    6
    Get started quickly with just one container-based sandbox host.
    7
    [3] Sandbox virtual machine
    8
    Use a virtual machine (VM) as a sandbox host
    9
    [4] Helm chart
    10
    Learn how to install helm charts with Instruqt.
    11
    [5] Kubernetes
    12
    Learn how to build Kubernetes-based tracks with this template
    13
    [6] Multi-node Kubernetes cluster
    14
    Setup a Kubernetes cluster on multiple sandbox hosts
    15
    [7] VSCode & TypeScript
    16
    Edit and test TypeScript applications in VSCode
    17
    ​
    18
    Please select your template: 5
    Copied!
    ​
    ↳ Instruqt CLI creates the track and returns this output:
    1
    Using the template: Kubernetes
    2
    ​
    3
    ==> Creating new track files:
    4
    kubernetestrack
    5
    β”œβ”€β”€ 01-deploying-nginx
    6
    β”‚ β”œβ”€β”€ assignment.md
    7
    β”‚ β”œβ”€β”€ check-kubernetes-vm
    8
    β”‚ └── solve-kubernetes-vm
    9
    β”œβ”€β”€ 02-exposing-nginx
    10
    β”‚ β”œβ”€β”€ assignment.md
    11
    β”‚ β”œβ”€β”€ check-kubernetes-vm
    12
    β”‚ β”œβ”€β”€ setup-kubernetes-vm
    13
    β”‚ └── solve-kubernetes-vm
    14
    β”œβ”€β”€ 03-showing-the-service
    15
    β”‚ └── assignment.md
    16
    β”œβ”€β”€ 04-kubernetes-dashboard
    17
    β”‚ β”œβ”€β”€ assignment.md
    18
    β”‚ └── setup-kubernetes-vm
    19
    β”œβ”€β”€ track_scripts
    20
    β”‚ └── setup-kubernetes-vm
    21
    β”œβ”€β”€ config.yml
    22
    └── track.yml
    23
    OK
    24
    ==> More templates are available at https://play.instruqt.com/templates
    25
    ​
    26
    ==> To play your track, change into the track directory and push it to Instruqt:
    27
    cd kubernetestrack
    28
    instruqt track push
    Copied!
  5. 5.
    Deploy the track to the Instruqt platform:
    1
    instruqt track push
    Copied!
  6. 6.
    Open your browser and go to play.instruqt.com/creator-studio. ↳ Instruqt now shows the created track in your content.

Background: Created track directory and configuration files

Your output depends on the template you have chosen. The same applies to the created directories and files. But you will have these components anyway:
  • A main directory with the track name. In this case kubernetestrack
  • The configuration files config.yml and track.yml inside the main directory
  • A subdirectory whose name starts with 01. In this case: 01-deploying-nginx
  • The configuration files assignment.md, check-..., and solve-... inside the 01 subdirectory
1
kubernetestrack
2
β”œβ”€β”€ 01-deploying-nginx
3
β”‚ β”œβ”€β”€ assignment.md
4
β”‚ β”œβ”€β”€ check-kubernetes-vm
5
β”‚ └── solve-kubernetes-vm
6
β”œβ”€β”€ 02-exposing-nginx
7
β”‚ β”œβ”€β”€ assignment.md
8
β”‚ β”œβ”€β”€ check-kubernetes-vm
9
β”‚ β”œβ”€β”€ setup-kubernetes-vm
10
β”‚ └── solve-kubernetes-vm
11
β”œβ”€β”€ 03-showing-the-service
12
β”‚ └── assignment.md
13
β”œβ”€β”€ 04-kubernetes-dashboard
14
β”‚ β”œβ”€β”€ assignment.md
15
β”‚ └── setup-kubernetes-vm
16
β”œβ”€β”€ track_scripts
17
β”‚ └── setup-kubernetes-vm
18
β”œβ”€β”€ config.yml
19
└── track.yml
Copied!
​
The topic configuration files explains the created files in detail. But the following table is already a short overview:
File
Purpose
Content
Remark
config.yml
Sets the characteristics for the sandbox
YAML
​
track.yml
Sets the characteristics for the track
YAML
​
assingment.md
Sets the characteristics for a challenge
Markdown
Created for every challenge in your track
check-...
Checks if the learner solved a challenge
Scripting language
The full name depends on your setting
solve-...
Solves a challenge automatically if the learner skips a challenge
Scripting language
The full name depends on your setting
Well done! Now you can play your track to see if everything works as expected.