what is rouster? the missing piece in the puppet testing ecosystemrspec gets you a long way, but compiling a catalog and applying it are distinct operations – adding rouster to your testing infrastructure allows you to test the application portion of this equation what is vagrant?An abstraction layer for managing VMs – virtualbox and VMWare
Recorded link: examples/demo.rbLook at code (quickly)Walk through code in debugger need to predetermine breakpointsRun test/puppet/test_roles.rb Look at code (longer)Run code is it verbose enough?
Vagrant+Rouster at salesforce.com
Vagrant + Rouster
Senior Member of the Technical Staff,
• most recently as a tester in quality
assurance for a Windows based antimalware solution
• started as a traditional quality engineer in a
Data Center Automation group, moved towards
developer and systems engineer, riding the DevOps
# the value for the 'name' attribute should be a name in `vagrant status`
app = Rouster.new(:name => 'app')
# equivalent to `vagrant up app`
# STD(OUT|ERR) of this is available in app.get_output()
Where did we start?
• Team composition
• 6 engineers – 3 system engineers, 2 QE and 1 developer
• Very little Ruby experience, mostly Perl and Shell
• Pro Puppet, Puppet 2.7 Cookbook, Puppet Types and Providers
• Puppet Intro and Puppet Developers (now Advanced) classes
• RSpec, rspec-puppet
Where have we been?
• get out of perforce and into git
• local git-commit hooks
• RSpec, rspec-puppet
• Vagrantfile: 39 lines
• piab -> „Puppet in a box‟
• Supports base images for roles in SFDC stack
Where are we now?
• Jenkins – relatively small installation
• RSpec, rspec-puppet– for catalog validation of
manifests, some unit testing
• test-unit – for unit tests of custom functions
• Test::More – for unit/functional tests of ENC
• built mock racadm for type/provider testing
• Vagrantfile: 237 lines
• Supports base images for ~every host in production
Where are we now?(pt. 2)
• Salesforce::piab – for functional validation of catalogs –
the precursor to Rouster
• Perl abstraction layer to Vagrant machines, shelled out to
vagrant faces, created a new pseudo-TTY connection for each
• Relies on external project, deltas, to power the
• Supports a subset of is_* tests
• To accomplish isolation, large portions of code in role_*.t is
duplicated for each test
Where are wegoing?
• Porting existing Salesforce::piab tests
• Resolve issues and TODOs in codebase
• Moving from all Vagrant VMs to include physical
• For “real” validation
• For devices in the stack we can‟t
emulate in Vagrant
Where is Rouster going?
• SFDC is going all RHEL, most of our time will be
devoted to supporting that OS
• Object model – no more shelling out
• Passthrough implementation
• What does the community need?
Want to help?
• do our tests work in your environment? how can we make them
• how does Rouster work with providers other than VirtualBox?
• Support for
• other system configuration tools – Chef? Ansible?
• other operating systems
• TODO hunting – at last count, more than 30
• New tests/convenience methods
• Most importantly, need an awesome logo
Questions for the audience
• How are you accomplishing test isolation?
• How are you handling credential management?
• How are you testing code against non-server puppet
• How are you handling negative testing?