BonFIRE logo and link to main BonFIRE site

Table Of Contents

Previous topic

BonFIRE EaaS - Elasticity as a Service

Next topic


This Page

How To Use the BonFIRE EaaS

How to create an elastic group

In order to create an elastic group you need to configure some parameters using the contextualization of the Elasticity Engine virtual machine. Those parameter are necessary for providing some essential information to the Elasticity Engine that will be used during the execution. This is possible in two different ways: using the portal or the API.

Configuring EaaS using the API

For using the elasticity as a service you need to create an experiment with an aggregator. Before you start an elastic group is important that the aggregator is up and running. In order to create an elastic service you should prepare the image that contains the service itself. To do this you can read this documentation Datablock OCCI How-To. it is important to understand that the image that you will prepare during that process is the base image that will be used every time is necessary to create a new virtual machine to scale up. This image will be cloned every time your upscale threshold will be exceeded and a new VM will be created using that disk as a source. After you create your disk image containing the preconfigured service, you need to start configuring some properties for the EaaS. There are different kind of configuration parameters: some are necessary for the Group of VMs, other for specifying the rules.

First of all you need to specify the minimum number of virtual machines that you want will be part of your elastic group. Then you have also to put a maximum number of instances to create during the execution. Furthermore you have also to specify a name that will be assigned to the VMs part of your group:


Then you need to specify the Type of the instance that you would like to use and the disk source of your prepared image. You need to specify the locations where you want to deploy yuor VMs. Supported locations are HLRS, INRIA, and EPCC. Basically the elasticity engine will choose randomly the location where to deploy the necessary VMs :


If you need a custom instance Type you can use the following tags:


For additional context parameters the following tag should be added:


If you want you can also use the reservation on INRIA for reserving a cluster of machines and run your experiment in a specific cluster. In this case is necessary to insert the cluster_uuid and if you want you can also specify the hostname where to deploy your virtual machines created dynamically by the elasticity engine.


Configuring the trigger

Before explaining the way to configure the trigger we introduce the upscale/downscale mechanism. Think about a group of virtual machines that are serving user requests distributed among them by a load balancer with a weight based round robin algorithm. Their load, in terms of CPU or MEMORY, should be the same if the load balancer does well his job. You need only to introduce the upscale threshold and for doing this you can use a standard zabbix expression:


For example if you want that the Elasticity Engine starts another instance after the cpu average of your group overcomes the 60% you should write an expression like this:


It is higly recommended to use this item for the CPU threshold, since it will get the cpu usage of the whole system. This is the context parameter that you need to insert during the creation of the compute resource of the Elasticity Engine.


The utilized down-scaling algorithm is based on the assumption that a VM can be removed from the group, only if its removal does not bring other VMs into a trigger state. So you don’t need to specify any kind of trigger for downscaling if you introduce an upscale expression.

Getting a load balancer

If you create an elastic experiment you might want to create a load balancer in order to distribute the load among your instances. For doing this, you need to specify three parameters:


You can specify two different kind of load balancers: “HAProxy” or “kamailio”. The first attribute will allow the creation of an HAProxy instance. HAProxy is a layer 4/7 load balancer. Kamailio is a SIP load balancer. Both of them are configured for stateless services. The elasticity engine automatically will add/remove instances to the load balancer. You need to specify the PORT number where your service is reachable and the location where you want to deploy this load balancer.

Complete OCCI request

Here you can find an example of a complete OCCI request that could be used for creating an elastic group. Basically you need to create a compute resource using a standard Debian 2G image (so you have to specify the STORAGE_ID and NETWORK_ID) and then include the context variables in the request:

<compute xmlns="">
                <storage href="STORAGE_ID"/>
                <network href="NETWORK_ID"/>
        <link href="/locations/fr-inria" rel="location"/>

Configuring the EaaS using the Portal

In order to create an elastic experiment through the Portal, you need to create a new experiment and select the check box enabling Elasticity Capable Aggregator.

How to create a new elastic experiment

When you have an experiment with a running aggregator, you need to create an elastic group configuring all the parameters necessary.

How to create a new elastic group

Please note the Portal workaround for Elasticity as a Service; Elasticity as a Service will not work unless you follow these instructions.

If you want to use the reservation offered by INRIA, you can do it by clicking on continue instead of finish and adding those parameters into the context section:


After you create your experiment you should see the service endpoint in the elastic group section.

Portal workaround for Elasticity as a Service

The Portal OCCI builder misses the instance type specification for the service VMs. When configuring the EaaS, click on “Continue”, not “Finish”, and add the following line to the <context> part, as shown in the figure below:

Context fix for Portal EaaS bug

As discussed on the Configuring EaaS using the API section, you can specify any BonFIRE instance type, including custom.