Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Serverspec: The Simplest Server Testing Tool Ever
Search
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
76
41k
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
340
Past and future of Infrastructure as Code
mizzy
0
410
Configuration Managementツールのポリシー定義用中間言語に関する考察/Considerations about an intermediate language of configuration management tools
mizzy
0
550
Infrastructure as Codeのこれまでとこれから/Infra Study Meetup #1
mizzy
28
13k
エンジニアかつ研究者としての今後のキャリアについて/My Career As An Engineer And A Researcher
mizzy
0
480
Compare OCI Runtimes
mizzy
2
1.8k
Serverspec and OSS at IEICE Society Conference 2018
mizzy
2
420
Other Decks in Technology
See All in Technology
レガシーコードに対する loop engineering的なAI開発プロセス導入について
kubell_hr
0
280
[General] 개발자로 해외 기업에서 일하기
skydoves
1
310
Metadata - Section 3 : Dublin Core Standard · DC
mohab1
0
120
基本から分かる!AWSセキュリティ運用の考え方と任せ方
cmusudakeisuke
1
460
ライフワーク「猫でもわかるDirectConnect」
kentapapa
0
290
Context Ontology Accelerator 入門 (業務データの意味を、AI エージェントに渡す)
inariku
PRO
3
560
自律的なチームを作るためにTechPMがやらないこと
ny7760
1
530
Kiro Crew 入門 (手を離しても進む仕事) | 目指せ Kiro マスター 11
inariku
PRO
4
590
複雑な業務システムを高速でつくるため、チーム全員をつくれる人へ
ayakurabuchi
0
140
Content Mapper APIの応用例~CSS Modules、言語ファイル~
uhyo
2
620
Active Directory と Entra ID のむむむな関係
murachiakira
PRO
3
1.7k
Copilot Coworkで「みのるん式」やってみた
minorun365
PRO
2
1.6k
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Statistics for Hackers
jakevdp
799
230k
The Cult of Friendly URLs
andyhume
79
7.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Docker and Python
trallard
47
4.3k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
360
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
420
The untapped power of vector embeddings
frankvandijk
2
2k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
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