A sandbox host is a container or a virtual machine, and you can add multiple hosts to a sandbox. Learn more about:
Choosing between a container and a virtual machine (VM)
Provisioning a sandbox host
Customizing provisioning to add your own software packages and resources
Instruqt supports using containers and VMs as sandbox hosts. Containers start faster, which means your learners start playing the track sooner. However, containers have a few restrictions, due to how containers work. Reasons to choose a virtual machine over a container include:
You need access to the Docker daemon to build and run container images
You require more than 8GB of system memory
If you want to install long-running system services (a database or a web server) you can choose both a container and a virtual machine. However, since most base container images do not have a process manager, the experience is better on a virtual machine.
Before a learner can access the sandbox environment, Instruqt provisions all sandbox hosts. During provisioning, Instruqt starts the host and runs your setup scripts. You can install your own software packages and configuration on a sandbox host in two ways:
Using host-specific track setup scripts while the learner is waiting for the track to load
By creating custom container images or Compute Engine machine images.
To make sure you can make the most of both options, I want to walk you through the container and VM provisioning process first.
Container provisioning process
To provision a container, Instruqt performs these steps:
Pull the image from a container registry (Docker Hub, gcr.io, or any other container registry)
Start the container image to create a container
Run the host-specific track setup script on the container (optional)
Add the host to the sandbox
To provision a VM, Instruqt performs these steps:
Start a virtual machine using a machine image stored in Compute Engine storage (on Google Cloud).
Run the host-specific track setup script on the virtual machine (optional)
Add the host to the sandbox
Track setup scripts run while the user is waiting for the track to load, and they are executed sequential on all sandbox host.
Before creating your custom Docker image, make sure that the image you need is not already available on the Docker hub. To get started on building your own Docker image, head over to the Docker documentation.
When you intend on using your own Docker container images, make sure you either make them public or host them in a private Google Cloud Container Registry and grant access to the Instruqt service accounts. You can do so by granting the role
roles/storage.objectViewer on the backing storage to the following Instruqt service accounts:
You can use most public Compute Engine images. Popular images include:
As part of our templates, we maintain two Compute Engine images:
If you want to use your own virtual machine images you need to host them publicly, or grant Instruqt access. Grant the role
roles/compute.imageUser to the Instruqt service account:
If you need more guidance, read the Google Cloud documentation on sharing custom compute images between organizations.