VladTheEnterprising
    by Michael L. Welles
    http://rubyforge.org/projects/vladenvironment/ 

== DESCRIPTION:

A series of packages to help using Vlad to manage "enterprise"
environments, includes host OS discovery and test-based per host
variable settings, targeting of environments and sub-environments,
mysql and xen management tasks.

Currently consists of the following:

* Vlad the Translator 
* Vlad the Environmentalist
* Vlad the DBA
* Vlad the Xen Master
   
== FEATURES/PROBLEMS:
  
* Management of heterogenious enironments, dynamic discovery and
  flexible handling of remote host types.

* Support of multiple environments and subenvironments, multiple
  projects withing an environemnt

* Automation of common, time consuming, dba tasks, like installing,
  syncronizing and bringing up new mysql slave instances.

* Beginnings of automation for xen image creation and management.

== SYNOPSIS:

* The Translator

  Allows a flexiable callback system to set varabiles on a per-host
  basis.  For example, if the location of a given binary is different on
  differing target hosts, you can add dialects such that
  the path to the binary is set properly for each:

  dialect :name => :local_bin_mysql, 
	  :assert => lambda { run "if [ ! -x /usr/local/bin/mysql ]; then exit 1; fi" }, 
	  :set => { :mysql_cmd  => "/usr/local/bin/mysql" }
	  
  dialect :name => :opt_bin_mysql, 
	  :assert => lambda { run "if [ ! -x /opt/bin/mysql ]; then exit 1; fi" }, 
	  :set => { :mysql_cmd  => "/opt/bin/mysql" }
	  
  If no exception is raised for an assertion, then variable will be set
  in the context of each target host unless there is a global
  already defined for the symbol.
	
  The dialects are evaluated in the order that they're defined, with
  later values replacing those defined earlier.  The intention is to
  start with general rules that will get ovverridden with increasingly
  fine granularity.


* The Environmentalist

  Supports multiple environments and sub-environments to deploy to.
  Running with TARGET='production' will build a configuration from 
  config/enrvironment/produciton.rb as weill ruby files under the
  config/environemtn/production/ directory.

  Subenvironments may be specified.  For example, if in production
  I have more than one database group, I can specify which 
  I want to target in a given task by grouping them into seperate
  files under config/environmenn/#{target}/#{subenvironment}.rb.  

  Specifying TARGET="production:vendor_content" will set only
  what is defined in config/enviroment/production/vendor_condent.rb

  This allows running tasks like "vlad:mysql:bootstrap_new_slaves" 
  a bit more fine grained control. 

* The DBA

  Utilities for common dba tasks.  Currenltly, focused towards mysql
  slave management.  Given a subenvironment that has a :db_master
  and :new_slave roles defined, "rake vlad:mysql:bootstrap_new_slaves"
  will clean the mysql install on the new slaves, (re)install mysql 
  if necessary, grant replication priveleges to the new slave, 
  sync the slaves with a dump from the master and start replication.
  
  By default will work with ubuntu, tested as well in a hetergenious 
  environment of ubuntu and (wierd and custom) NYTimes Solaris
  servers.  See Example.txt for the custom dialect for 
  the  NYTimes Solaris setup, so that vlad could do the 
  necessary stuff on those machines while still working as expected
  on the ubuntu hosts in the subenvironment.

* The Xen Master
  
  Beginnings of a series of tasks for autmating the creation and
  management of Xen images.  Currently has the expectation that
  the master host will be running ubuntu (though this can be
  fixed by adding other dialiects), and supports the creation
  of ubuntu edgy, centos5, and centos4.4 images.  None quite
  are fire and forget yet -- but none of the problems are
  insurmountable.


== REQUIREMENTS:

 * vlad 
 * highline


== INSTALL:

* install vlad the deployer, per instructions
* sudo gem install VladTheEnterprising
* To project Rakefile:
* require 'vlad/enterprising'
* rake vlad:enterprising:setup 
* Expected files will now be under config/deploy/files

== LICENSE:

(The MIT License)

Copyright (c) 2007 FIX

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
