Serverspec: The Definitive Guide written by Gosuke Miyashita, the developer of Serverspec

Serverspec: The Definitive Guide from O’Reilly Japan

北市真
3 min readJan 17, 2015

Gosuke Miyashita’s Serverspec: The Definitive Guide was published by O’Reilly Japan. The author Miyashita a.k.a. mizzy and @gosukenator is the very developer of Serverspec, so, this book is literally “definitive.”

The book Serverspec focuses the software Serverspec’s backgrounds such as secret of birth, design principles, development attitude and so on as well as overview and advanced usage. Especially it is important that the book describes what Serverspec does and does not and expectations for users and contributors to and not to do. After reading, we can say Serverspec is “opinionated” as often said for Ruby on Rails. If you intend to extend or send pull requests to Serverspec, you should read it.

I hope this book will be translated to English.

Note that chapter titles below is translated by me and not official.

Foreword by Naoya Ito reveals the fact that Serverspec is more than just testing tool for server status. It introduced, he says, agility of software development into infrastructure world.

Chapter 1: Introduction of Serverspec describes Serverspec’s background of development, goal and so on. It is explicitly written what Serverspec does not. For instance, you may agree that you should not add all the features what you want to Serverspec after reading this chapter. Serverspec has its own role and you should not implement features out of scope. There are other tools which should be responsible for them.

And it also says Serverspec’s ultimate goals is to accelerate continuous improvement of system beyond just server testing tool. It’s essential for Serverspec.

Chapter 2: Serverspec for Primer and Chapter 3: Real Utilization of Serverspec show overview and advanced usage of Serverspec. By reading these chapters, I became able to clearly distinguish what features should be done by extending Serverspec itself from what should be done by writing code in Rakefile or spec_helper.rb.

Chapter 4: Detail of Serverspec describes internal structure, way to extend Serverspec including adding OSes and resource types, debugging and how to test Serverspec itself when patching. Things which affect decision making on writing code to extend Serverspec but not be apparent by just reading Serverspec code are written. Things to keep in mind when you contribute to Serverspec are also in this chapter. In short, you should read this chapter if you intend to extend Serverspec.

Chapter 5: Cooperation with Other Tools lists tools such as Vagrant, Guard, editors, monitoring tools, CI tools and so on with code to cooperate with Serverspec. Relationship between Serverspec and each tool and which does be responsible for given operation are very clear because what Serverspec does not is apparent.

Chapter 6: Troubleshooting and Debugging introduces frequent troubles when using Serverspec and general ways to troubleshoot.

Chapter 7: Future of Serverspec says that Serverspec is sophisticated enough now and not intended to be changed drastically in the future. But Specinfra, which Serverspec is based on, continues to be developed actively now.

Additionally said “If Serverspec becomes unnecessary, it’s nice.” according to Serverspec’s ultimate goal as previously noted. I like that attitude.

Appendix A: Resource Type Reference lists description and usage of resource types.

Appendix B: Changes of Serverspec/Specinfra v2 describes changes from v1 to v2.

Appendix C: Example Usage of Specinfra other than Serverspec describes how to use Specinfra as base of your tool and introduces Itamae as an example in the wild.

Appendix D: Testing on Windows describes about testing on Windows machines.

Appendix E: Helpful Books and Magazines for Serverspec lists books and magazine articles helpful when using Serverspec, including both articles written in Japanese and English.

As a conclusion, you should read the book if you intend to extend or send pull requests to Serverspec.

In addition, it is very helpful when you are interested in or working with server configurations even if you don’t use Serverspec.

--

--