Skip to main content

Building an experiment

The editor is one page: the experiment name, a toolbar, the topology canvas, and a details panel when a node or link is selected. The site header is hidden here. ← Back returns to the dashboard.

An experiment with three nodes, two links, and the node details panel

In this example, client is selected. The blue outline is the selection. router still has the default image, and server is set to ubuntu. The status pill on the right says Saved.

Name​

The name is the text field at the top left. A new experiment starts with a generated name such as exp_ followed by digits. You can change it. The name can be at most 101 characters, and the remaining count is shown beside the field.

Click the name and edit it, then save. That name is the name stored in DEW. When you deploy, DEW creates the SPHERE experiment under a different name: it adds a dew prefix, makes the name lowercase, and removes characters SPHERE does not allow, including dashes. campus-lan in DEW becomes dewcampuslan in the SPHERE portal. The SPHERE name is at most 63 characters.

A status pill shows Unsaved, Saving…, or Saved.

Toolbar​

ControlWhat it does
FileSave, upload, export, version history, and delete. See Files and versions.
Deploy to SPHEREStarts a deployment. The experiment must be saved first.
ScenarioOpens the scenario, constraints, and bindings.
HelpLinks to the documentation and the contact page.

The File menu after the experiment has been saved

Until the first save, File only contains Save. After that, it contains the items in the picture. Upload, Export DEW JSON, Download NS File, Download MergeTB File, Version History, and Delete are described in Files and versions.

Drawing the topology​

Add Node and Add LAN arm a placement mode. The button stays highlighted, the hint tells you to click the canvas, and the next click places the item at that spot. Press Esc to cancel. Placing a node does not open its details. Click the node afterward to edit it.

Nodes are server icons. LANs are black circles labeled LAN. New nodes are named node1, node2, and so on. New LANs are named lan1, lan2, and so on.

A link is one connection between two endpoints, drawn as a line. Use it when exactly two nodes should be wired together. A LAN is a shared network, like an Ethernet switch, that several nodes join. Draw the LAN, then draw a link from each node to that circle. Every node attached to the same LAN can reach the others on that network. A link has an address at each end. A link into a LAN has one address, the node's address on that LAN.

Hold Space and drag from one node or LAN to another to add a link. A dashed line follows the pointer. Dropping on the same item, or on a pair that is already linked, does nothing.

A node name must be a hostname: lowercase letters, digits, and dashes, and it cannot start or end with a dash.

Selecting, moving, and deleting​

  • Click a node to select it and open Node details.
  • Click a link to select it and open Link details. Clicking a LAN does not open a panel.
  • Drag a node or LAN to move it. A short tap does not move it.
  • Right-click a node, LAN, or link and choose Delete.
  • Select a node or link and press Delete or Backspace. Deleting a node also removes its links. This does not apply while you are typing in a field.
  • Select a link and drag either blue dot onto another node to reconnect that end. Dropping it on empty canvas, on the same node, or onto a pair that is already linked leaves the link as it is.

Renaming a node​

Click the node name under the icon, wait about half a second, and click the name again. Type the new name and press Enter. Escape cancels. A fast double-click does not start a rename.

You can also change Name in the details panel. The new name is applied when you leave the field. Names that are not valid hostnames are rejected and the old name stays.

Save at the top of Node details writes the current topology, including the hardware fields, immediately.

Node details​

FieldWhat it sets
SPHERE imageThe image for the node. Default (bullseye) is used when you leave this empty. The list is the images SPHERE offers.
Number of nodesHow many machines this icon represents. A count of 2 or more is expanded in the MergeTB model to name-1, name-2, and so on, and each copy is connected the same way.
Bare metalRequest a bare-metal machine. Extra disk is turned off for bare metal.
CPU coresMinimum CPU cores. Leave it empty for no CPU constraint.
MemoryMinimum memory, in MB, GB, or TB.
Extra diskExtra disk, in MB, GB, or TB. Disabled for bare metal.
Group tagsComma-separated tags, such as worker, server.
Properties JSONExtra node properties as a JSON object, such as {"key": "value"}.

A link between two nodes has an IP address for each end, a capacity in Mbps, and a latency in milliseconds. A link to a LAN has one IP address, for the node on that LAN, plus capacity and latency.

Link details for the connection from client to router

The selected link is blue, and each end has a dot. Drag a dot onto another node to reconnect that end. The panel shows the address, capacity, and latency for the selected link.

Leave a field empty when you do not want that constraint.

Scenario​

A scenario is the ordered work the nodes do after the experiment is running: which node runs which command, and which events make the next node wait. The designer stores that text with the experiment. DEW explains how to write a scenario and how dewctl runs it on the materialized nodes.

Scenario opens a side panel with three parts. The picture shows all three next to the canvas.

The scenario panel beside the topology

  • Scenario is the ordered behavior, one task per line: [when <event>][wait <time>] actor action [emit <event>]. Leaving the box asks DEW for suggestions, which appear as chips you can insert.
  • Constraints is the text form of the topology. The canvas writes this text. You can edit it and choose Apply constraints to redraw the graph from it.
  • Bindings are the values DEW still needs for the scenario, such as a command for an action. If the scenario does not need any, the panel says so.

The scenario is saved with the experiment. For running those steps on materialized nodes, use dewctl.

Deploy to SPHERE​

  1. Save the experiment. Deploy stays disabled until it has been saved.
  2. Choose Deploy to SPHERE.
  3. Pick one of your SPHERE projects.
  4. If that project already has the SPHERE experiment, the one whose name starts with dew, DEW asks whether to push a new revision. Confirm to continue, or cancel to pick another project or rename the experiment in DEW.
  5. Watch the steps:
    1. Validating and submitting to SPHERE
    2. Deployment accepted
    3. Provisioning resources
    4. Setting up the XDC
    5. Opening Jupyter
  6. When the run finishes, the dialog links to Jupyter on the XDC.

Deployment progress, with provisioning still running

Completed steps have a check. The current step is marked and repeated in the note at the bottom. Cancel is available until the run finishes.

Cancel deployment stops the run and asks SPHERE to clean up resources that were already created. A failed step shows the error from SPHERE and which step it happened on.

Deployment can take several minutes while nodes are imaged and the XDC is attached. Leave the dialog open. It keeps checking until the run finishes, fails, or you cancel it.