Hacker News new | ask | show | jobs
Show HN: Goss – A serverspec-like tool written in go (github.com)
5 points by aelsabbahy 3894 days ago
2 comments

This is my first go program, wanted to learn the language. Any feedback on code and/or tool would be greatly appreciated.

The tool is intended to be a simple take on server validation. The idea is to be able to quickly define a system manifest and validate a system against it.

Differences from serverspec:

* 10-30x faster depending on test suite (tests are run in parallel)

* Can derive server state and generate a manifest from a running server

* goss is meant to be simple, albeit less flexible

* Uses JSON instead of DSL

* Manifests are static - no variables, conditionals, etc. If you need this, you should dynamically generate the JSON manifest.

* Being in Go, it's a self contained binary, no need for ruby

* Supports a much smaller set of OSes/test types

For more complicated workflows, the tool can be chained with other commands, ex:

curl http://url/to/static/or/dynamic/goss.json | goss validate

It's a very nice tool. I was actually thinking to create an Ansible-like in Go, as a side-project, and I thinkg goss's approach can be useful for it.
The concept of resource/system_resource was borrowed from projects like puppet, chef. ansible, specinfra, etc.

There's probably an opportunity to make this more generic by adding setter methods to the system_resources and extracting them out to their own repo. At that point it can be a shared library leveraged by goss and CM tools.. similar to how specinfra is used by serverspec and itamae.

This blog post explains the difference between goss and serverspec better than I did:

http://www.unixdaemon.net/tools/testing-with-goss.html