rs_vagrant_shim

Usage

Install it

gem install rs_vagrant_shim

Create a new project

rs_vagrant_shim init a_new_project
cd a_new_project

Add some stuff to the default runlist found at runlists/default/default.json

Fire up the vagrant box

bundle exec vagrant up

Create some new runlists at runlists/default/new_runlist.json

Run some of the other runlists by copying them to rs_vagrant_shim/default/dispatch

cp runlists/default/new_runlist.json rs_vagrant_shim/default/dispatch/
bundle exec vagrant provision

Or specifying a “runlist” environment variable

runlist=new_runlist bundle exec vagrant provision

Multi VMs

Create a new project with multiple VMs

rs_vagrant_shim init multi_vms --vmnames foo bar

Bundle Exec?

So, you’ll notice that your project directory contains a gemfile, and all the examples use bundle exec. This is because vagrant has a fairly poor plugin mechanism in version ~> 1.0, so we just skip it all by making sure all the necessary gems are loaded by bundler.

Features

Uses JSON files which are essentially Chef-Solo node.json files as “runlists”. As shown above you can specify a runlist to execute, or if there is a runlist file in the “dipatch” directory of a particular VM, the next ‘vagrant provision` execution will run it and delete the file in the dispatch directory.

Tag data is stored in rs_vagrant_shim/#vnname/persist.json and used to simulate the functionality of the right_link_tag resource.

The following RightScale/RightLink specific resoures are stubbed/simulated by this gem and cookbook

* right_link_tag
* remote_recipe
* server_collection

TODO

  • Document the dispatch directories and how those goodies work