Design

The core of Arsenal’s functionality consists of gathering data for input, through Scout objects, to send to Arsenal’s caching Strategy objects, which produce directives, which in turn are currently fulfilled by Scout objects.

Therefore, Scouts deal with the outside world, while Strategies provide introspection on data provided by Scouts to direct image caching on nodes in some meaningful way. The Scout and Strategy objects used by arsenal-director can be changed through configuration options.

Arsenal’s design philosophy can be summed up as: “Provide a way to do something, but make it easy to change or swap out.”

Scout

The responsibility of Scouts are to gather data from various outside sources, like Ironic, Nova, and Glance, convert that data to a form suitable for Strategy object consumption, as well as issue directives to endpoints, such as Ironic.

All of Arsenal’s Scout objects are derived from an abstract base class called Scout, which is defined in scout.py.

Tip

If you are thinking about defining your own Scout object, reading scout.py is a good place to start.

A couple of pre-made Scouts are currently included in Arsenal.

DevStack Scout

This Scout is designed to be used with the DevStack project, which provides a relatively easy way to setup an Openstack-based environment on a single machine, typically for testing purposes.

The DevStack Scout will communicate with Ironic, Nova, and Glance services, and filter for baremetal nodes. See Ironic documentation on how to configure virtual baremetal nodes for use with DevStack.

For more information see, devstack_scout.py.

OnMetal Scout

The OnMetal Scout is designed to work with Rackspace’s OnMetal product. While this specific Scout will probably not be directly useful to anyone outside of Rackspace, it can still be instructive to view a fully functional, concrete implementation of a Scout.

For more information, see onmetal_scout.py.

Strategy

A Strategy’s role lies in consuming data provided by Scouts, and then emitting directives to manage imaging caching on nodes.

Currently, two directives are supported. The first is CacheNode. CacheNode instructs the endpoint to cache a specific image onto a specific node. The second is EjectNode, which instructs the endpoint to do whatever is necessary to put a previously cached node back into an uncached state.

Tip

If you are thinking about defining your own Strategy object, reading strategy/base.py is a good place to start.

SimpleProportionalStrategy

Currently, SimpleProportionalStrategy is the only Strategy shipping with Arsenal.

This object implements a fairly straight-forward strategy: For each available flavor of node, use a constant proportion of available nodes for caching.

Image selection and node selection are currently completely random.

See the [simple_proportional_strategy] Section for information on how to configure this Strategy.