Last active
February 4, 2016 00:44
-
-
Save raphink/5337833 to your computer and use it in GitHub Desktop.
Distributed serverspec tests using MCollective instead of SSH.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +-------------------------------------+ +-------------------------------------+ | |
| | Client | | Server | | |
| |-------------------------------------| |-------------------------------------| | |
| | | | | | |
| | mco spec | | Serverspec | | |
| | + | | ^ | | |
| | | | | | | | |
| | v | | + | | |
| | MCollective::Application | | RSpec::Core::Runner#run | | |
| | | | | ^ | | |
| | + | | | | | |
| | | | | + | | |
| | +-------------------------------------------> MCollective::RPC::Agent | | |
| | | | | | |
| | | | | | |
| | | | | | |
| +-------------------------------------+ +-------------------------------------+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| +-------------------------------------+ +-------------------------------------+ | |
| | Client | | Server | | |
| |-------------------------------------| |-------------------------------------| | |
| | | | | | |
| | rspec | | | | |
| | + | | | | |
| | | | | | | |
| | v | | | | |
| | Serverspec | | | | |
| | + | | | | |
| | | (check_action, *args) | | | | |
| | v | | | | |
| | Serverspec::Backend::MCollective | | | | |
| | + | | | | |
| | | (check_action, *args) | | Serverspec::Backend::Puppet | | |
| | v | | or | | |
| | MCollective::RPC#rpcclient | | Serverspec::Backend::Exec | | |
| | | | | ^ | | |
| | + | | | (check_action, *args) | | |
| | | | | + | | |
| | +-------------------------------------------> MCollective::RPC::Agent | | |
| | action, *args | | | | |
| | | | | | |
| | | | | | |
| +-------------------------------------+ +-------------------------------------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Required to implement
local_tests:MCollective::RPC::Agentthat launches rspec (similar to https://github.com/camptocamp/puppet-spec/blob/master/lib/puppet/indirector/catalog/rest_spec.rb#L31)Pros:
puppet-specand through MCollective. MCollective only triggers them.Cons:
Required to implement
passed_commands:Serverspec::Backend::MCollectiveServerspec backend, passingcheck_*methods toMCollective::RPC#rpcclientMCollective::RPC::Agenttaking actions sent byServerspec::Backend::MCollectiveand sending them to a local Serverspec backend (Exec, Puppet, etc) and returning the status throughMCollective::RPC.Pros:
Cons: