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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Gosuke Miyashita
April 16, 2014
Technology
3.9k
12
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Serverspec: The Simplest Server Testing Tool Ever
Gosuke Miyashita
April 16, 2014
More Decks by Gosuke Miyashita
See All by Gosuke Miyashita
なぜインフラコードのモジュール化は難しいのか - アプリケーションコードとの本質的な違いから考える
mizzy
72
37k
Serverspec(をつくった自分)のそれまでとその後
mizzy
9
3.4k
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
320
Past and future of Infrastructure as Code
mizzy
0
380
Configuration Managementツールのポリシー定義用中間言語に関する考察/Considerations about an intermediate language of configuration management tools
mizzy
0
540
Infrastructure as Codeのこれまでとこれから/Infra Study Meetup #1
mizzy
28
13k
エンジニアかつ研究者としての今後のキャリアについて/My Career As An Engineer And A Researcher
mizzy
0
470
Compare OCI Runtimes
mizzy
2
1.7k
Serverspec and OSS at IEICE Society Conference 2018
mizzy
2
390
Other Decks in Technology
See All in Technology
案件に一番詳しいAIを Amazon Bedrock AgentCore で作る ― 知見が知見を生むチームへ / Compounding Knowledge with AgentCore
yusukeshimizu
1
160
Digitization部 紹介資料
sansan33
PRO
2
7.7k
20260817_生成AIの動向と中学校・高等学校での活用を考える_v1.00_公開用
doradora09
PRO
0
130
20分でわかるセキュアAPI
nwiizo
2
320
MIXIで活躍できるエンジニアを 若手社員目線で考えてみる
mixi_engineers
PRO
0
110
現場回帰したデータエンジニアが考える AI 時代のキャリア開発 / Career Development in the Age of AI Perspectives from a Hands-on Data Engineer
medley
0
280
強化学習「理論」入門
enakai00
3
3.6k
カートの信頼性を担保するWireMockを使ったe2eテスト
ykagano
0
610
AIに狂うスタートアップが、あえて「人との協働」に全振りした新卒エンジニア研修 / New Graduate Engineer Training at a Startup Accelerating AI Adoption
ohnoeight
0
160
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
20k
Android skills に学ぶ
kokiko
0
130
Master Dataグループ紹介資料
sansan33
PRO
1
4.8k
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Writing Fast Ruby
sferik
630
63k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
300
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
Rails Girls Zürich Keynote
gr2m
96
14k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.1k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
290
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
420
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
The Cult of Friendly URLs
andyhume
79
7k
Prompt Engineering for Job Search
mfonobong
0
410
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