# 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

## 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:

  * listing scenarios in a scenario release

  * spawning components for a scenario "run"

  * processing notification templates

## 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(),
    releases: [
      my_scenarios: [
        include_erts: false,
        strip_beams: false,
        steps: [:assemble, :tar]

defp deps do
    {:runbox, "1.0.0", hex: :altworx_runbox}

It is also necessary to configure the `:runbox` application for the release, so
runbox knows which one is the "scenario" app. In the `config/config.exs`:

import Config

config :runbox, :scenario_app, :my_scenarios

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