-
Notifications
You must be signed in to change notification settings - Fork 9
General hints on components
This page contains general hints regarding components (i.e., Docker containers) that are created by the Hobbit platform during the benchmarking of a system.
During the creation of docker containers, environment variables can be defined. The following variables are defined by the platform controller:
-
HOBBIT_SESSION_ID
defines the session id of the current benchmark run the created component is a part of. -
HOBBIT_RABBIT_HOST
the name of the RabbitMQ host which is used by the platform. -
HOBBIT_CONTAINER_NAME
the name of the container. Additionally, other environment variables can be added by the component that requested the container creation.
The platform controller offers the creation of containers. Using this API, a component can request the creation of additional components, e.g., a benchmark controller can request the creation of benchmark related components or a benchmarked system can request the creation of additional containers needed by the system.
For the communication with the platform controller, the [command queue](Command Queue) is used. Requesting the creation of a container is done by sending the Commands.DOCKER_CONTAINER_START
id (=0x0C
) on the command queue, followed by a UTF-8
encoded String containing the following JSON data:
{
"image": "image-to-run",
"type": "system|benchmark",
"parent":"parent-container-name",
"environmentVariables": [
"key1=value1",
"key2=value2"
]
}
Where image-to-run
is the complete name of the image that should be run (including the repository URL), type
contains the information whether it belongs to the benchmark or the benchmarked system and parent-container-name
is the name of the container that sends the request (i.e., the value of the HOBBIT_CONTAINER_NAME
environment variable). With the environmentVariables
array, the creating container can submit additional information, e.g., parameters, to the newly created container.
TODO Response is missing!
The Hobbit platform organizes the containers as a tree. The container that requests the creation of another container serves as parent of this newly created container. Note that a parent container should always make sure that its chield containers terminate before the parent terminates. If a parent terminates and its children are still running, the platform will force them to stop.
All created components are part of the same network. In this network, the container name serves as the host name of the container.
TODO
{
"containerId": "container-to-stop"
}
TODO