2. Setting Up

2.1. Infrastructure Requirements

2.1.1. The Bus

Release Engine requires an AMQP service allowing messages to pass between components. The current, verified to work, AMQP service used with Release Engine is RabbitMQ, an Erlang-based open source messaging service. For more information on setting up a RabbitMQ server please read the project’s server documentation.

For security best practices, each component that transmits on the bus should have it’s own username and password combination. By enforcing component username/passwords access can be restricted to just what a component needs. This also allows quick deactivation of a component in the event something goes terribly wrong or a service is compromised.

2.1.1.1. Setup Steps

Note

Provision or utilize an existing server to install RabbitMQ or similar AMQP compliant service. For the rest of this article we will assume that you are running the service on RabbitMQ.

  • Install RabbitMQ Server
  • Open ports 5672 (AMQP) and 15672 (management)
  • Enable RabbitMQ management via the Management Plugin
  • Start RabbitMQ
  • Create an exchange called “re” using topics
  • Create a user for RE-REST (the rest interface into Release Engine)
  • Create a user for RE-CORE (the state machine)
  • Create a queue for RE-CORE
  • Bind the RE-CORE queue to the re exchange with job.create
  • Create a user for each component your instance will support
  • Create a queue for each component your instance will support
  • Bind the queue for each additional component (not including RE-REST and RE-CORE which are mandatory and separate from any additional components) to the re exchange with connectors that describe the step or plugin that your instance will support.

Todo

List binding instructions for queues

2.1.1.2. Test Setup

Todo

How to verify it’s ready.

2.1.2. The Datastore

Release engine utilizes MongoDB for storing playbooks and other persistent data. Authentication must be turned on and it’s highly recommended to create a username/password for every component that requires access to the data store.

2.1.2.1. Setup Steps

Note

Provision or utilize an existing server to install MongoDB or similar service like Amazon DynamoDB for the NoSQL service. For the rest of this article we will assume that you are running a local MongoDB service.

  • Provision or choose a server to utilize for the datastore
  • Install MongoDB on the server
  • Open port 27017
  • Update MongoDB for authentication (see the documentation)
  • Start MongoDB
  • Create a database called “re”
  • Create a user for RE-CORE on database “re”
  • Create a user for RE-REST on database “re”
  • Import the initial data for the database via MongoDB Command Line Tools or one of the many MongoDB UI Tools.

Todo

Provide a link to the initial database import

2.1.2.2. Test Setup

Todo

How to verify it’s ready.

2.2. Core Component Requirements

There are two components you must have no matter what workers you choose to support. These components are: RE-REST and RE-CORE.

2.2.1. RE-REST

RE-REST is the REST endpoint for interacting with the Release Engine. This is the only interaction point by design. RE-REST is a Flask based application and requires a few libraries before it will work properly.

2.2.1.1. Setup Steps

2.2.1.2. Test Setup

Todo

How to verify it’s ready.

2.2.2. RE-CORE

The core is essentially a finite state machine (FSM) hooked into a message bus and a database.

The core oversees the execution of all release steps for any given project. The core is separate from the actual execution of each release step. Execution is delegated to the worker components.

2.2.2.1. Setup Steps

2.2.2.2. Test Setup

Todo

How to verify it’s ready.