Skip to content

Write your own

Make a directory next to trylab. The directory name is the lab name: letters, digits, and hyphens. The name default stays reserved for the shared disk.

Write config.yaml with a title and a description. Write index.md as the lesson. Tag commands the learner should run as shell, so the page gives them a Run button.

Open it:

sudo ./trylab your-lab

That is a whole lab when the shared disk already has what the lesson needs.

Add a piece only when the lesson needs it.

  • setup.sh installs software while the disk is built. The first open says that disk is missing and asks Build it now?. Press Enter to build it.
  • Files under data/ land in /root/data/ on the machine. They are copied during that same build.
  • snapshot: true saves the machine after login, so the next open resumes it. The first open writes that save. Use it when a program should already be running.
  • A services entry adds a link to a port on the machine.

The examples in the pack are short on purpose. A lab you publish should teach its subject. The files around the lesson stay as small as the subject allows.