Skip to content
Silvio Montanari edited this page Jul 28, 2014 · 5 revisions

This wiki is a work in progress. With time I will keep adding more and better documentation and examples.

Why nodespec?

I started using Serverspec when working on a few devops projects and I found that gem really easy to use and effective for my testing purposes. Unfortunately though, I run into some of its limitations when having to test Windows based servers. So I started contributing to that project by coding the initial support for Windows server testing, using WinRM and Powershell as the alter ego in the Unix world of ssh and shell scripting.

Another of the issues I run into with Serverspec was that its design sort of forces you to select an OS type and a backend beforehand, and I ended up having to write some hairy logic in my spec_helpers in order to run specs both on Windows and on Un*x hosts.

Moreover I found myself often needing to ssh into the target host and re-run some provisioning script in order to fix a broken test.

Eventually I decided to put these and other ideas for improvements into a separate gem, if only because the amount of changes and refactoring necessary would be too much to ask the already busy serverspec author. After all if you only need to test your servers configuration on one particular OS, and always access through ssh or winrm, you are perfectly fine with serverspec and don't really need nodespec.

Is Nodespec an alternative to Serverspec?

No, not really. Nodespec requires Serverspec to run its tests, it's built on top of it and only adds some nice extra features.

What are the main features of Nodespec?

  • Easy way to configure ssh and winrm access to your servers.
  • Support for different os types (Windows/UN*X) and backends (SSH, WinRM) during the same spec run.
  • Support for connecting/testing Vagrant boxes and Amazon EC2 instances.
  • Ability to run provisioning instructions (chef, puppet, ansible, shell) as part of the test setup.