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
Serverspec(をつくった自分)のそれまでとその後
mizzy
8
3.1k
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
250
Past and future of Infrastructure as Code
mizzy
0
180
Configuration Managementツールのポリシー定義用中間言語に関する考察/Considerations about an intermediate language of configuration management tools
mizzy
0
460
Infrastructure as Codeのこれまでとこれから/Infra Study Meetup #1
mizzy
29
13k
エンジニアかつ研究者としての今後のキャリアについて/My Career As An Engineer And A Researcher
mizzy
0
400
Compare OCI Runtimes
mizzy
2
1.5k
Serverspec and OSS at IEICE Society Conference 2018
mizzy
2
300
House Meetup
mizzy
7
3.2k
Other Decks in Technology
See All in Technology
IIWレポートからみるID業界で話題のMCP
fujie
0
570
菸酒生在 LINE Taiwan 的後端雙刀流
line_developers_tw
PRO
0
250
Agentic DevOps時代の生存戦略
kkamegawa
0
600
TerraformをSaaSで使うとAzureの運用がこんなに楽ちん!HCP Terraformって何?
mnakabayashi
0
190
"SaaS is Dead" は本当か!? 生成AI時代の医療 Vertical SaaS のリアル
kakehashi
PRO
3
240
生成AIをテストプロセスに活用し"よう"としている話 #jasstnano
makky_tyuyan
0
240
OAuth/OpenID Connectで実現するMCPのセキュアなアクセス管理
kuralab
5
550
AWS全冠したので振りかえってみる
tajimon
0
150
Workflows から Agents へ ~ 生成 AI アプリの成長過程とアプローチ~
belongadmin
3
170
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
50
30k
今からでも間に合う! 生成AI「RAG」再入門 / Re-introduction to RAG in Generative AI
hideakiaoyagi
1
190
(新URLに移行しました)FASTと向き合うことで見えた、大規模アジャイルの難しさと楽しさ
wooootack
0
760
Featured
See All Featured
Making Projects Easy
brettharned
116
6.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Designing Experiences People Love
moore
142
24k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
How STYLIGHT went responsive
nonsquared
100
5.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.9k
Practical Orchestrator
shlominoach
188
11k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
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