Runbox

Runbox is a runtime environment for Altworx scenarios. It is also a requirement for building the scenarios into a deployable artifact.

Note: This library makes sense only for usage with Altworx.

Details

The runbox app runs on the Altworx node and is responsible for starting nodes with scenarios. The scenario nodes run the runbox app as well, so runbox serves for communication between those two. Scenario nodes can are used for:

Usage in scenarios repository

Configure the scenarios release and include :runbox as a dependency in the mix.exs in the scenario repository:

def project do
  [
    app: :my_scenarios,
    version: "1.0.0",
    deps: deps()
  ]
end

defp deps do
  [
    {:runbox, "~> 1.2", hex: :altworx_runbox}
  ]
end

Note that currently there is a limitation that scenario module names must start with Scenario..

Building scenarios

To build an Altworx scenario release for production usage, configure docker on the build machine. Then run:

mix altworx.scenario_release

Configuration

When using runbox as a dependency, runbox requires that the environment variable :scenario_config_dir under the :runbox app is set. This is done automatically when running scenarios in Altworx. However, it might be required to set this variable in the test environment. You can just set it to a dummy value, like this (config/test.exs):

import Config

config :runbox, scenario_config_dir: "/non-existing/does/not/matter"