LEROY

Cross-platform automated software deployment language

Leroy is a software deployment engine designed to allow software and build/release engineers to describe the deployment of an application in plural environments with a singular workflow in xml, which is intended to be versioned in your repository as code, in the service of continuous integration and continuous deployment.

DOWNLOAD

leroy overview

Leroy is a fast, lean threaded tool that is written for multiple platforms in C++. It consists of two major components; the agent and the controller. The agents are run on any system you wish to perform tasks on. They do not listen on a port; instead, they reach out to the controller and wait for it to come online. The controller contains all the configuration and artifacts needed to perform a deployment to all environments and is launched on demand. Leroy provides the complete picture for continuous integration and continuous deployment, which is a requirement for agile software development. Best of all, Leroy is free to use for commercial and non-commercial use under the creative commons license.

When there is work to be done, the controller is started and accepts connections from the agents. When all the agents needed in a given environment check in with the controller, the controller issues workflow steps to the agents and receives output from the agents. This all operates in a multi-threaded fashion with synchronization controls to maximize flexibility and minimize how long deployments take.

One of the design goals of Leroy was to provide a simplified programming language to describe the deployment of an application to all environments, end-to-end in a easy to read and well-known format.

how can i use leroy?

  • As an application deployment automation framework.
  • As a library for an existing application that you want to have auto-update
    capability.
  • As an automation tool for unix/linux/windows or mac system
    administrators.
  • As an extension in your existing build tool to provide automated
    deployment capabilities.
  • As a configuration management tool.
  • As an automated database deployment tool.
  • There are many other uses to Leroy, please Tell us how you are using it
  • VIEW MORE

Leroy allows you to add the feature of deployment automation in ANY build system. Build systems include (but are not limited to):

  • Jenkins http://jenkins-ci.org/
  • Team City http://www.jetbrains.com/teamcity/
  • Bamboo https://www.atlassian.com/software/bamboo
  • Apache Continuum http://continuum.apache.org/
  • More…

To initiate a deployment, one simply executes the controller executable as:
c:\Leroy> controller.exe --workflow Initialize --environment dev
or from your favorite *nix:
$/home/leroy> ./controller --workflow Initialize --environment dev

The controller will come online and wait for all agents in the dev environment to connect. Once the controller sees all the agents have reported in, the deployment begins. The controller will return 0 to the shell if the deployment is successful, and non-zero if it is not, allowing any build system to easily detect if the deployment has completed or failed.

controller structure

  • agents.xml: An XML file describing the agents the controller is aware of.
  • environments.xml: An XML file describing the environments (grouping of agents) the controller can run workflows against.
  • controller.xml: An XML file that configures the controller. Its bind address, port, known hostname, etc.
  • postprocess.xml: An XML file defining available postProcess scripts.
  • commands/: A folder of files (typically scripts) that can be transmitted to agents for execution.
  • artifacts/: A folder containing the files that may be sent to agents.
  • workflows/: A folder containing XML files that describe different workflows that the controller may run.
  • properties/: A folder containing XML files defining properties on various levels
  • global.xml – Controller-global properties
  • agent/.xml – Agent properties
  • environment/.xml – Environment properties
  • agents/: A folder containing folders of agent binary packages for each platform
    • Win64
    • Linux-i686
    • Linux-x86_64
    • Darwin-x86_64
  • installed_agents/: A folder containing folders of prepared agents and keys that have been generated by the controller, ready for installation on the target host.
  • controller.exe: The main controller executable.
  • .so / .dll / .dylib: Libraries used by the controller.
  • controller.crt / controller.key / dh512.pem: Files used by the controller for SSL – certificate, private key, Diffie-Hellman parameters.

controller usage

						

Usage: controller.exe [--config ] [--addagent |--extractagent |--extractagent-all|--ssh-install  | {--add-*-property =}]
Program Options:
  --help                                This message
  --addagent                            Add a new agent to the system.
  --extractagent arg                    Re-generate an agent .zip installation
                                        package.
  --extractagent-all                    Re-generate .zip installation package
                                        for all agents.
  --ssh-install arg                     SSH install an already generated agent.
  --workflow arg                        The workflow to run
  --environment arg                     The environment to operate on.
  --environment-file arg 
  (=environments.xml)					The file(s) where environments are
                                        defined.
  --config arg                          An optional configuration file.
                                        Default: controller.xml
  --add-global-property arg             Add controller-global property. Can be
                                        used 0 or more times. Argument format
                                        is KEY=VAL

articles