{"id":15406912,"url":"https://github.com/raphink/mspectator","last_synced_at":"2025-04-18T03:15:46.378Z","repository":{"id":7983912,"uuid":"9388219","full_name":"raphink/mspectator","owner":"raphink","description":"Use RSpec and MCollective to test your fleet","archived":false,"fork":false,"pushed_at":"2020-05-24T20:58:19.000Z","size":26,"stargazers_count":20,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T06:21:38.548Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["raphink"]}},"created_at":"2013-04-12T06:43:11.000Z","updated_at":"2021-11-20T16:22:17.000Z","dependencies_parsed_at":"2022-08-21T01:20:19.241Z","dependency_job_id":null,"html_url":"https://github.com/raphink/mspectator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphink%2Fmspectator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphink%2Fmspectator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphink%2Fmspectator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphink%2Fmspectator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphink","download_url":"https://codeload.github.com/raphink/mspectator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249343590,"owners_count":21254514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T16:26:15.030Z","updated_at":"2025-04-18T03:15:46.339Z","avatar_url":"https://github.com/raphink.png","language":"Ruby","funding_links":["https://github.com/sponsors/raphink"],"categories":[],"sub_categories":[],"readme":"mspectator\n==========\n\n[![Gem Version](https://img.shields.io/gem/v/mspectator.svg)](https://rubygems.org/gems/mspectator)\n[![Gem Downloads](https://img.shields.io/gem/dt/mspectator.svg)](https://rubygems.org/gems/mspectator)\n[![Gemnasium](https://img.shields.io/gemnasium/raphink/mspectator.svg)](https://gemnasium.com/raphink/mspectator)\n\nUse RSpec and MCollective to test your fleet\n\n# Goal\n\nThis project provides a way to test your fleet of servers using RSpec and MCollective.\n\nIt is similar to the [serverspec](http://serverspec.org) project, but it uses MCollective instead of SSH as a network facility, and it allows to test more than a host at a time.\n\n# Installing\n\n## Client side\n\nOn the client side (where you run `rspec`), you need `mspectator` itself:\n\n    gem install mspectator\n\nYou also need to have an MCollective client set up, as well as RSpec.\n\n\n## Server side\n\nOn the server side (the hosts you are testing), you need:\n\n* An MCollective node with the [`spec` agent](https://github.com/camptocamp/puppet-spec/tree/master/files/mcollective/agent);\n* [`serverspec`](http://serverspec.org);\n\n\n# Example\n\nThe matchers allow to test hosts based on filters, using classes and facts. Below is an example:\n\n    require 'mspectator'\n    \n    describe \"apache::server\" do\n      it { should find_nodes(10).or_less.with_agent('spec') }\n      it { should have_certificate.signed }\n      it { should pass_puppet_spec }\n\n      context \"when on Debian\", :facts =\u003e [:operatingsystem =\u003e \"Debian\"] do\n        it { should find_nodes(5).or_more }\n        it { should have_service('apache2').with(\n          :ensure =\u003e 'running',\n          :enable =\u003e 'true'\n          )\n        }\n        it { should have_package('apache2') }\n        it { should have_user('www-data') }\n      end\n    end\n\n# Architecture\n\n## Network architecture and libraries\n\nThe general architecture of the solution is the following:\n\n     +-------------------------------------+           +-------------------------------------+\n     |      Client                         |           |        Server                       |\n     |-------------------------------------|           |-------------------------------------|\n     |                                     |           |                                     |\n     |     rspec                           |           |                                     |\n     |       +                             |           |                                     |\n     |       | (check_action, *args)       |           |                                     |\n     |       v                             |           |                                     |\n     |  MCollective::RPC#rpcclient         |           |         Specinfra::Backend::Exec    |\n     |       |                             |           |           ^                         |\n     |       +                             |           |           | (check_action, *args)   |\n     |       |                             |           |           +                         |\n     |       +-------------------------------------------\u003e  MCollective::RPC::Agent          |\n     |                action, *args        |           |                                     |\n     |                                     |           |                                     |\n     +-------------------------------------+           +-------------------------------------+\n\n\nThe components required for this architecture are:\n\n* [RSpec](http://rspec.info), on the client side;\n* The [serverspec](http://serverspec.org) backends and matchers, on the server side;\n* The [spec MCollective agent](https://github.com/camptocamp/puppet-spec/tree/master/files/mcollective/agent) on the server side;\n* A series of matchers on the client side to describe the hosts being tested.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphink%2Fmspectator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphink%2Fmspectator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphink%2Fmspectator/lists"}