Building your first track

Use this step by step tutorial to create your very own "Hello World" track.

Step 01: Create new track

  1. Open our track template​

  2. Open the web interface in your browser (play.instruqt.com).

  3. Go to your team page, if you have multiple teams, go to the one where you want to create your track.

  4. Press the "Create new track" button.

  5. Follow the steps in the wizard using the information from the track template you just downloaded.

  6. Make sure to use your own unique title and slug.

  7. Hit the "Finish" button once you're done.

Step 02: Install the CLI

  1. Extract the package

  2. Run the CLI

  3. Authenticate following these steps:

Step 03: Pull your track

  1. Pull track into the current directory using the CLI

  2. Inspect the files that were downloaded to get a feel of the structure

instruqt track pull --slug <organization-slug>/<track-slug>

Where track-slug is ultimate-introduction-to-python as configured in step 1.

Step 04: Adding another tab through the CLI

  1. Open up the track.yml in your code editor

  2. Look for the tab definition of the first challenge

  3. Add a second tab

- title: Editor
type: code
hostname: python
path: /root

Step 05: Prepare the environment

  1. Create a setup script that creates a file within the user’s environment

  2. Name the script <challenge-slug>/setup-python

#!/bin/bash
​
cat <<EOF >/root/hello.py
print("<replace me>")
EOF

Step 06: Check the user's work

  1. Create a check script that validates the user’s solution

  2. Name the script [challenge-slug]/check-python

#!/bin/bash
​
if ! grep "Hello Python" /root/hello.py; then
fail-message "Uh oh, looks like you didn't print 'Hello Python'" || exit 1
fi

Step 07: Push your work to platform

  1. Save your edited files

  2. Push your work back to platform (make sure to run this command from your track's directory)

instruqt track push

This will update the track on our platform and will automatically trigger a build.

Step 08: Testing your work

Test your track by running the following command:

instruqt track test

Expect an error.

Step 09: Solve the error

  1. View logs

  2. Debug your code

  3. Solve the problem

  4. Push new version

  5. Test again

  6. Push final version once tests are passing

instruqt track logs

Step 10: Publish your track πŸŽ‰

  1. Go to your track on the web interface

  2. Use the controls in the sidebar to publish your track

  3. Use the controls in the sidebar to set it to private (optional)

What's next?

Now that you created your very first hello world track, you may want to dip your toes into more advanced topics. Check out:

​