right_env

INTRODUCTION

As RightScale systems evolve, developers are faced with having to maintain a quickly growing list of applications. Each application requires different tools for development and for deployment. Tools may include different versions of ruby, rubygems, bundler etc. Being able to setup an environment appropriately for each application is becoming increasingly complex and switching from one application to another for development in particular is quickly becoming close to impossible.

RightEnv aims at addressing some of these difficulties by providing a uniform and consistent mechanism for applications developed at RightScale to declaratively specify the tools they depend on in various systems (development, test, staging, production) and platforms (linux, darwin and windows). RightEnv uses a DSL close to Chef recipes for defining an application configuration. Each application must be equipped with a definition that must reside at the top level directory of the application and must be named “<application>.re” (where “<application>” should be subsituted with the name of the application. Configuring the system to run the application then merely consists of running the “script/bootstrap_environment” script provided in the “script” directory (“script/bootstrap_environment.bat” on windows).

Internally RightEnv relies on ‘configurators’ to configure the machine appropriately. There is one configurator per tool that needs configuration. Each configurator is dynamically instantiated by RightEnv as it reads the application configuration file. This makes for an extensible system where new configurator may be added to configure new tools that new applications may rely on. For a list of available configurators run “script/configurator –list”.

REQUIREMENTS

Running

  • Linux and MAc OS X

  • ruby >= 1.8.6

  • curl

  • tar

  • Windows

  • ruby >= 1.8.6

  • Win32API gem

Unit testing

Install the following gems for testing:

  • rspec >= 2.0

  • flexmock

Then the build can be tested with

rake spec