Chef cookbook for Margarine
This cookbook is used to deploy margarine on a system or set of systems. This cookbook expects to you to override a number of it’s settings a may not work “out of the box”.
The following platforms are tested:
Other platforms may or may not work as intended or desired but probably not.
The following cookbooks are dependencies and required for this cookbook to
function:
The following attributes affect the behaviour of the deployment of margarine.
The commonly changed attributes are listed first followed by less commonly
modified attributes.
node['margarine']['components']
- Sets which componentns components to install/enable on a specific node. Defaults to both blend
and spread
.node['margarine']['service']['provider']
- Sets the service mechanism usednode['margarine']['service']['hostname']
- Sets the hostname to bind thenode['margarine']['service']['port']
- Sets the port to bind the servicenode['margarine']['service']['proxy']
- Sets the proxy service to host theThe following describe the install methods available for margarine:['margarine']['install']['method']
- Currently only pip
is supported
['margarine']['install']['commit']
- branch, ref or tag to pull. defaults to master
*['margarine']['install']['repository']
- git repo location
The service attributes have a bit of overlap and the following attributes apply
to the datastore, email, token_store and queue sections. Thus the following
attributes should have SERVICE replaced with one of the aforementioned sections
(i.e. node['margarine']['datastore']['type']
instead ofnode['margarine'][SERVICE]['type']
.
node['margarine'][SERVICE]['type']
- Sets the type of service used for thenode['margarine'][SERVICE]['username']
- Sets the username for the service.node['margarine'][SERVICE]['password']
- Sets the password for the service.node['margarine'][SERVICE]['hostname']
- Sets the hostname to connect tonode['margarine'][SERVICE]['port']
- Sets the port to connect to for the
service.
node['margarine']['datastore']['database']
- Sets the database to use for
margarine’s metadata.
node['margarine']['email']['from']
- Sets the FROM address for outgoingThe last three common attributes set deployment specific information:
node['margarine']['urls']['tinge']
- Sets the URL that tinge (the frontendnode['margarine']['urls']['blend']
- Sets the URL endpoint that blend (thenode['margarine']['security']['uuid']
- Sets the opaque value used in theMore attributes are available but not generally necessary for normal operation.
These attributes are defined in the attributes directory and should be reviewed
for any functionality that might be desirable if the above does not fill a
particular need.
This section outlines how to use the basic recipes in your environment. The
recipes you find in the cookbook not listed here are functional but not
recommended for direct usage.
Includes the necessary recipes to install, configure and start the the specific service.
The margarine::tinge
, margarine::blend
, and margarine::spread
recipes are
the bread of margarine deployments. The simplest use of margarine is to
configure the appropriate attributes from the above and add one of the
aforementioned component cookbooks to node or role run_lists.
These recipes include the three basic components of cconfiguration management:
Creates the margarine user/group. Will also include the the install type recipe which is currently install_pip
.
Includes required recipes to set up margarine directly from git via python_pip
. Installs margarine from node['margarine']['install']['repository']
Sets up the configuration files and required directories for margarine. The
following configuration files are created:
configure_logging
)The logging configuration has been updated to read from the node attributes and
will merge with the defaults appropriately (or be overwritten appropriately as
well).
Sets up the various services based on the node['margarine']['components']
array. The init files are dropped in (/etc/init
or /etc/init.d/
respectively) for the components of margarine installed on the node. This will also start the service(s).
Use the recipes and attributes described above to configure margarine for a
particular environment.
Often, the only attributes requiring modification are the hostname attributes
for the various services and the url attributes.
A great example of configuring this cookbook for a particular environment can
be found in margarine itself under the chef directory and the associated
Vagrantfile.