Let's say that you're teaching a class on how to build websites using (the notoriously unknown and hypothetical) https://how-to-build-websites.com. When the class begins, and the students join, you may want each of their labs to spin up running a browser that's pointing at their users' accounts at https://how-to-build-websites.com, using the URL https://how-to-build-websites.com?user=STUDENT_EMAIL_HERE.

Strigo provides a way for you to inject the student's email directly to the lab's provisioning script (using userdata).

To accommodate the aforementioned example, you could configure your lab to run the following script on a Linux Desktop, which will in turn run Chrome in Kiosk Mode an display the URL shown above.

You can inject different types of context to accommodate different needs, depending on how you want your student's labs to be configured.

Variable Format

We try to be as unintrusive as possible when using variables in scripts, and so we use a specifically compiled variable interpolation format: {{ .STRIGO_VAR_NAME }}.

  • The prefix must be {{ .STRIGO_
  • The suffix must be }}

Note the space after the {{ and before the }}.

Variable Reference:

  • STRIGO_EVENT_ID => The unique identifier of the event.
  • STRIGO_EVENT_NAME => The name of the event as you've defined it.
  • STRIGO_CLASS_ID => The unique identifier of the class.
  • STRIGO_CLASS_NAME => The name of the class as you've defined it.
  • STRIGO_USER_ID => The unique identifier of the user.
  • STRIGO_USER_EMAIL => The email of the currently logged in user.
  • STRIGO_ORG_ID => The unique identifier of your organization.
  • STRIGO_ORG_NAME => The name of your training organization.
  • STRIGO_PARTNER_ID => The unique identifier of your training partner.
  • STRIGO_PARTNER_NAME => The name of your training partner.
  • STRIGO_WORKSPACE_ID => The unique identifier of the current workspace.
  • STRIGO_WORKSPACE_FLAVOR => The type of the current workspace (Can be ondemand or event).
  • STRIGO_RESOURCE_NAME => The name of the lab resource you defined in the class templates.
  • STRIGO_EVENT_HOST_EMAIL => The email of the current host of the event.

Note: STRIGO_PARTNER_ID, STRIGO_PARTNER_NAME and STRIGO_EVENT_HOST_EMAIL are only relevant for ILT (they will be undefined in on-demand).

In addition, the following variables are exposed in each lab for every lab in the class:

  • STRIGO_RESOURCE_#_ID => The unique identifier for the lab resource.
  • STRIGO_RESOURCE_#_NAME => The name of the lab resource.
  • STRIGO_RESOURCE_#_DNS => The Strigo Dynamic DNS address for the lab resource.

# is the number of the lab, as per the order of the resources in the class template. So, for example, if you have two labs, the first one named My Nice Lab, and the other named My Other Nice Lab, you'll be able to do something like the following in each lab:

export STRIGO_RESOURCE_0_ID={{ .STRIGO_RESOURCE_0_ID }}
export STRIGO_RESOURCE_0_NAME={{ .STRIGO_RESOURCE_0_NAME }}
export STRIGO_RESOURCE_0_DNS={{ .STRIGO_RESOURCE_0_DNS }}
export STRIGO_RESOURCE_1_ID={{ .STRIGO_RESOURCE_1_ID }}
export STRIGO_RESOURCE_1_NAME={{ .STRIGO_RESOURCE_1_NAME }}
export STRIGO_RESOURCE_1_DNS={{ .STRIGO_RESOURCE_1_DNS }}

Security and Privacy

It is important to emphasize:

  • Strigo does not inject any context beyond what's explicitly specified in the script, thus making data exposure very explicit.
  • Additionally, the interpolation is done server-side, before reaching the lab, and so no information is sent to the users' browsers.

Example deployment script:

Below is an example for a script (specifically for Linux, but can be modified for a Windows script just as well) with the exhaustive list of variables you can use:

#!/bin/bash

cat <<EOF > /tmp/strigo_vars
export STRIGO_EVENT_ID="{{ .STRIGO_EVENT_ID }}"
export STRIGO_EVENT_NAME="{{ .STRIGO_EVENT_NAME }}"
export STRIGO_CLASS_ID="{{ .STRIGO_CLASS_ID }}"
export STRIGO_CLASS_NAME="{{ .STRIGO_CLASS_NAME }}"
export STRIGO_USER_ID="{{ .STRIGO_USER_ID }}"
export STRIGO_USER_EMAIL="{{ .STRIGO_USER_EMAIL }}"
export STRIGO_USER_NAME="{{ .STRIGO_USER_NAME }}"
export STRIGO_ORG_ID="{{ .STRIGO_ORG_ID }}"
export STRIGO_ORG_NAME="{{ .STRIGO_ORG_NAME }}"
export STRIGO_PARTNER_ID="{{ .STRIGO_PARTNER_ID }}"
export STRIGO_PARTNER_NAME="{{ .STRIGO_PARTNER_NAME }}"
export STRIGO_WORKSPACE_ID="{{ .STRIGO_WORKSPACE_ID }}"
export STRIGO_WORKSPACE_FLAVOR="{{ .STRIGO_WORKSPACE_FLAVOR }}"
export STRIGO_RESOURCE_NAME="{{ .STRIGO_RESOURCE_NAME }}"
export STRIGO_EVENT_HOST_EMAIL="{{ .STRIGO_EVENT_HOST_EMAIL }}"
export STRIGO_RESOURCE_0_ID={{ .STRIGO_RESOURCE_0_ID }}
export STRIGO_RESOURCE_0_NAME={{ .STRIGO_RESOURCE_0_NAME }}
export STRIGO_RESOURCE_0_DNS={{ .STRIGO_RESOURCE_0_DNS }}
export STRIGO_RESOURCE_1_ID={{ .STRIGO_RESOURCE_1_ID }}
export STRIGO_RESOURCE_1_NAME={{ .STRIGO_RESOURCE_1_NAME }}
export STRIGO_RESOURCE_1_DNS={{ .STRIGO_RESOURCE_1_DNS }}
EOF

Did this answer your question?