BonFIRE logo and link to main BonFIRE site

Table Of Contents

Previous topic

Resource Usage API v1.0

Next topic

Tutorials and Experiment Scenarios

This Page

Creating Experiments

To do an experiment in BonFIRE and be able to use the three different types of resources (compute, storage and network), it is necessary to create an experiment first. Any resources will be added to an experiment instance, with the exception of persistent and shared storage resources, and any VM images that are saved.

Each of the resource pages linked to above describe with examples how to deploy and manage the different resources in an experiment. There are also several tutorials available, but first let’s see how to create an experiment container.

An experiment is defined by a name, a description and a walltime. The walltime is the duration of the experiment, after which all the experiment resources (compute, storage and network) created within the experiment are destroyed. The walltime is defined in seconds for all client tools except for the Portal, which expects a value in minutes (it then calculates the value in seconds when it creates the OCCI message to send to the BonFIRE API).

The subsections below illustrate how to create an experiment with the different client tools available in BonFIRE!


Assuming that you have logged onto the BonFIRE Portal at, this is how you create an experiment.

  1. press the button for Experiments in the top left corner:
  1. press the button Add Experiment:
  1. enter information for the experiment, and press Continue:

4. review the details of the experiment data in OCCI format, and click the button Finish to submit it:


You should then be forwarded to another screen where you can add resources to your experiment.

Experiment Descriptor

There are several options for creating an experiment with the experiment descriptors.

1: As a Managed Experiment via the BonFIRE Portal.

2: On the command line with a JSON descriptor.

3: On the command line with an OVF descriptor.

It does not make sense to just create an experiment with an experiment descriptor, as the purpose is to define the complete initial deployment. Therefore, please refer to the pages above for more information with code examples.


Assuming that you have installed and set up cURL to post OCCI HTTP messages to the BonFIRE API, this is how you create an experiment.

$ curl -k -i -u BONFIRE_USER \
  -H 'Content-Type: application/vnd.bonfire+xml' -X POST -d \
  '<?xml version="1.0" encoding="UTF-8"?>
  <experiment xmlns="">
    <name>My First Experiment using cURL</name>
    <description>Experiment description</description>

Command Line Tool

Assuming you have installed and set up the command-line tools, you can use the bfexperiment tool to query and manipulate existing experiments as well as to create new ones. Its usage is as follows:

# bfexperiment create <name> [-D <description>] [-W <walltime>] [-G <group> ...]

The following positional argument must be specified when creating experiments:

  • <name> - The name for this experiment.

The following options are applicable when creating experiments:

  • -D <description>, --description <description> - description of the experiment. Empty by default.
  • -W <walltime>, --walltime <walltime> - lifetime of the experiment in seconds. Defaults to one day.
  • -G <group>, --group <group> - A user group this experiment will be accessible by. This option can be specified multiple times.

For example:

# bfexperiment create "My First Experiment using CMD Tool" -D "Experiment description" -W 3600


Assuming you have installed and configured Restfully, you first need to start the interactive Restfully shell (replace LOGIN and PASSWORD with your BonFIRE credentials, see the Restfully FAQ for an alternative way of passing parameters):

$ restfully -u LOGIN -p PASSWORD -r ApplicationVndBonfireXml

You should get back a prompt like the following:

Restfully/0.8.1 - The root resource is available in the 'root' variable.
ruby-1.8.7-p249 >

You now have access to the root of the BonFIRE API, which you need to use to issue Restfully commands to BonFIRE. To create an experiment, type the following:

root.experiments.submit(:name => "My First Experiment using Restfully", :description => "Experiment description", :walltime => 3600)

To create experiments and resources in Restfully it may be quicker to do this in a Ruby script. For more information about how to do this, please click here.