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
3.9k
12
Share
Serverspec: The Simplest Server Testing Tool Ever
Gosuke Miyashita
April 16, 2014
More Decks by Gosuke Miyashita
See All by Gosuke Miyashita
なぜインフラコードのモジュール化は難しいのか - アプリケーションコードとの本質的な違いから考える
mizzy
71
34k
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
290
Past and future of Infrastructure as Code
mizzy
0
360
Configuration Managementツールのポリシー定義用中間言語に関する考察/Considerations about an intermediate language of configuration management tools
mizzy
0
510
Infrastructure as Codeのこれまでとこれから/Infra Study Meetup #1
mizzy
28
13k
エンジニアかつ研究者としての今後のキャリアについて/My Career As An Engineer And A Researcher
mizzy
0
450
Compare OCI Runtimes
mizzy
2
1.6k
Serverspec and OSS at IEICE Society Conference 2018
mizzy
2
350
Other Decks in Technology
See All in Technology
Azure Static Web Apps の自動ビルドがタイムアウトしやすくなった状況に対応した件/global-azure2026
thara0402
0
220
自分のハンドルは自分で握れ! ― 自分のケイパビリティを増やし、メンバーのケイパビリティ獲得を支援する ― / Take the wheel yourself
takaking22
1
320
🀄️ on swiftc
giginet
PRO
0
350
数案件を同時に進行するためのコンテキスト整理術
sutetotanuki
2
240
NOSTR, réseau social et espace de liberté décentralisé
rlifchitz
0
180
最近の技術系の話題で気になったもの色々(IoT系以外も) / IoTLT 花見予定会(たぶんBBQ) @都立潮風公園バーベキュー広場
you
PRO
1
160
60分で学ぶ最新Webフロントエンド
mizdra
PRO
33
16k
AIペネトレーションテスト・ セキュリティ検証「AgenticSec」ご紹介資料
laysakura
0
2.2k
今年60歳のおっさんCBになる
kentapapa
2
390
AIエージェントを構築して感じた、AI時代のCDKとの向き合い方
smt7174
1
230
非エンジニア職からZOZOへ 〜登壇がキャリアに与えた影響〜
penpeen
0
440
AgentCore RuntimeからS3 Filesをマウントしてみる
har1101
4
440
Featured
See All Featured
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
53k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
240
Git: the NoSQL Database
bkeepers
PRO
432
67k
Google's AI Overviews - The New Search
badams
0
960
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.3k
Six Lessons from altMBA
skipperchong
29
4.2k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
250
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
How to Talk to Developers About Accessibility
jct
2
170
What's in a price? How to price your products and services
michaelherold
247
13k
A designer walks into a library…
pauljervisheath
211
24k
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