Skip to main content

mrg-iot exp

The exp group owns the whole experiment lifecycle. Its verbs pair up: create/delete, deploy/undeploy, and setup/teardown for both halves at once.

mrg-iot exp --help showing its subcommands

The lifecycle​

An experiment moves through four states, which exp status reports:

created → realized → materialized → deployed

StepResourceCommand that does just this step
Create the experiment and its network modelexperimentexp create
Allocate the hardwarerealizationexp rz create
Bring the hardware onlinematerializationexp mtz create
Create a container to connect throughXDCexp xdc create
Attach the XDC to the materializationXDCexp xdc attach

deployed is the state you can send commands in. exp deploy runs steps 2–5, exp setup runs all five, and exp undeploy / exp teardown reverse them.

Naming the experiment​

The exp verbs take the experiment name as a positional NAME or as --name/-n; every other group takes --experiment/-e. Either way it defaults to your username.

--devices is greedy, so give NAME before it: exp create myexp -d d1 d2, not exp create -d d1 d2 myexp.

Defaults​

ArgumentDefault
--project, -pYour only project. Required when you have several.
NAME / --name, -nYour username.
--devices, -dNo default. Required by exp create, exp setup, and exp rz create.
--xdc, -x<experiment>xdc
--realization, -rrealiot
--duration, -dur / --xdc-duration, -xdur1w (minimum 4d)
--network, -netmrg-iot-net
--description, -descExperiment created with mrg-iot by <username>
Naming and duration rules

Names you choose (experiment, realization, XDC, network) must match ^[a-z][a-z0-9]*$: a lowercase letter first, then lowercase letters and digits only, max 32 characters. Device names like s-echodot-1 are exempt.

Durations must be at least 4 days: 1w, 4d, 1w2d3h, and 1 week are accepted. Descriptions may contain letters, digits, spaces, commas, periods, and hyphens, up to 256 characters.

Expiry notices go out 3 days before an XDC expires and 1 day before a realization expires.

Commands​

CommandWhat it does
exp listList experiments.
exp statusCreated, realized, materialized, or deployed.
exp createCreate an experiment and its model; nothing allocated.
exp setupCreate and deploy in one command.
exp deployAllocate a created experiment.
exp undeployRelease the hardware, keep the experiment.
exp teardownUndeploy and delete the experiment.
exp deleteDelete the experiment record only.
exp realization(rz) The hardware an experiment is placed on.
exp materialization(mtz) A realization brought online.
exp xdcThe container a session connects through.

Back to the full walkthrough: Using mrg-iot.