Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Serverspec: The Simplest Server Testing Tool Ever
Search
Gosuke Miyashita
April 16, 2014
Technology
12
3.8k
Serverspec: The Simplest Server Testing Tool Ever
Gosuke Miyashita
April 16, 2014
Tweet
Share
More Decks by Gosuke Miyashita
See All by Gosuke Miyashita
なぜインフラコードのモジュール化は難しいのか - アプリケーションコードとの本質的な違いから考える
mizzy
71
30k
Serverspec(をつくった自分)のそれまでとその後
mizzy
9
3.3k
A method for separating policy definition and behavior control by an intermediate language to achieve optimal server configuration management according to the situation
mizzy
3
280
Past and future of Infrastructure as Code
mizzy
0
340
Configuration Managementツールのポリシー定義用中間言語に関する考察/Considerations about an intermediate language of configuration management tools
mizzy
0
500
Infrastructure as Codeのこれまでとこれから/Infra Study Meetup #1
mizzy
28
13k
エンジニアかつ研究者としての今後のキャリアについて/My Career As An Engineer And A Researcher
mizzy
0
430
Compare OCI Runtimes
mizzy
2
1.6k
Serverspec and OSS at IEICE Society Conference 2018
mizzy
2
340
Other Decks in Technology
See All in Technology
純粋なイミュータブルモデルを設計してからイベントソーシングと組み合わせるDeciderの実践方法の紹介 /Introducing Decider Pattern with Event Sourcing
tomohisa
1
1.2k
チームで安全にClaude Codeを利用するためのプラクティス / team-claude-code-practices
tomoki10
7
3.4k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
The Engineer with a Three-Year Cycle
e99h2121
0
150
20260114_データ横丁 新年LT大会:2026年の抱負
taromatsui_cccmkhd
0
310
たかがボタン、されどボタン ~button要素から深ぼるボタンUIの定義について~ / BuriKaigi 2026
yamanoku
1
290
Qiita Bash アドカレ LT #1
okaru
0
190
AI に「学ばせ、調べさせ、作らせる」。Auth0 開発を加速させる7つの実践的アプローチ
scova0731
0
320
WebDriver BiDi 2025年のふりかえり
yotahada3
1
300
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
2
940
ALB「証明書上限問題」からの脱却
nishiokashinji
0
220
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
40
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Color Theory Basics | Prateek | Gurzu
gurzu
0
180
Designing Powerful Visuals for Engaging Learning
tmiket
0
200
Everyday Curiosity
cassininazir
0
120
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.5k
Transcript
Serverspec The Simplest Server Testing Tool Ever #ChefConf 2014 Gosuke
Miyashita
Let me introduce myself
ٶԼ ߶ี Miyashita, Gosuke twitter.com/gosukenator github.com/mizzy
Freelance software engineer
None
None
Chef in Japan
None
What is serverspec ?
None
“RSpec tests for your servers configured by Puppet, Chef or
anything else.”
None
None
None
cgroup/command/cron/ default_gateway/file/group/host/ iis_app_pool/iis_website/interface/ ipfilter/ipnat/iptables/kernel_module/ linux_kernel_parameter/lxc/ mail_alias/package/php_config/port/ process/routing_table/selinux/service/ user/windows_feature/ windows_registry_key/yum_repo/zfs
See: serverspec.org/ resource_types.html
RedHat/CentOS/SuSE Debian/Ubuntu Arch/Gentoo/Plamo AIX/Solaris/SmartOS FreeBSD/Mac OS X MS Windows
How to work ?
Run commands, simply via local/SSH/WinRM
Detect OS automatically and Run suitable command
None
None
Change local/SSH/ WinRM by including appropriate helper
OS Detection Helper #BDLFOE Helper
What is SpecInfra ?
SpecInfra is a command execution framework separated from serverspec
SpecInfra serverspec DSL by RSpec Call specinfra API API …
OS Abstraction Layer (OS Helper) Commands for Linux Commands for Debian Commands for Solaris Commands forWindows Backend Abstraction Layer (Backend Helper)
? Why I separated into serverspec and specinfra
I’ve created a very simple configuration management tool as a
proof of concept
serverspec/configspec
None
None
You can create Another type of serverspec with SpecInfra easily
But higher abstraction brings more complexity …
Why I started this project ?
I’m heavy Puppet user since 2007
My old puppet manifests are not fully modularized
I’ve decided to refactor my puppet manifests
Refactoring needs test code
But there are no testing tools meet my needs
So I made my own testing tool
Philosophy "
Simpleness
Easy to use
Support Ruby 1.8.7 (Because for supporting RHEL/CentOS)
No need other than Ruby
Even Ruby is not needed with SSH
Independent from any configuration management tools
I love the UNIX philosophy, KISS principle
Advanced Topics "
How to Customize ?
serverspec.org/advanced_tips.html github.com/serverspec/examples
Combination with other tools
Serverspec is simple and agnostic
Test Kitchen
busser-serverspec
See: kitchen.ci/docs/ getting-started/ writing-server-test
Vagrant
vagrant-serverspec
None
See: github.com/ jvoorhis/vagrant- serverspec
Caution "
None
Integration test of serverspec itself
serverspec/serverspec- integration-test
Wercker + DigitalOcean
# 1. Pull code 2. Create machines 3. Run Chef
and tests 4. Get result
None
Now only support CentOS 6 and a few serverspec test
code
So now I’m working on increasing OS and test code