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
環境構築を自動化したい@wakayama.rb#32 / automatival enviro...
Search
KamataRyo
April 10, 2016
Programming
0
170
環境構築を自動化したい@wakayama.rb#32 / automatival environment building @wakayama.rb#32
wakayama.rb#32で話題提供やデモンストレーションを行った、Ansible、Serverspec、Travis CIについてのスライドです。
KamataRyo
April 10, 2016
Tweet
Share
More Decks by KamataRyo
See All by KamataRyo
TileCloud の開発を支える技術
kamataryo
2
350
NPX-shell-hacking
kamataryo
0
42
frontend-shikoku#1
kamataryo
1
670
Introducing of Map Warper
kamataryo
0
1.3k
wp-rest-api-and-amazon-polly
kamataryo
0
910
how-to-deploy-from-travis-ci
kamataryo
1
740
IoT with React
kamataryo
1
270
wacker#17-wreact
kamataryo
0
130
wakayamarb#37
kamataryo
1
87
Other Decks in Programming
See All in Programming
Tuning GraphQL on Rails
pyama86
2
1.1k
CSC305 Lecture 13
javiergs
PRO
0
130
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
24
11k
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
350
CSC509 Lecture 08
javiergs
PRO
0
110
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
350
Modern Angular: Renovation for Your Applications
manfredsteyer
PRO
0
210
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.7k
qmuntal/stateless のススメ
sgash708
0
120
役立つログに取り組もう
irof
27
8.7k
僕がつくった48個のWebサービス達
yusukebe
18
17k
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
1k
Featured
See All Featured
Building Applications with DynamoDB
mza
90
6.1k
Testing 201, or: Great Expectations
jmmastey
38
7k
We Have a Design System, Now What?
morganepeng
50
7.2k
A designer walks into a library…
pauljervisheath
202
24k
It's Worth the Effort
3n
183
27k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
150
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
Bash Introduction
62gerente
608
210k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Transcript
ڥߏஙΛࣗಈԽ͍ͨ͠ Ansible, Serverspec & TravisCI — Infrastructure as Code !3VCZษڧձ!Վࢁ
πʔϧɺαʔϏεհ w "OTJCMFIUUQXXXBOTJCMFDPN w 4FSWFSTQFDIUUQTFSWFSTQFDPSH w 5SBWJT$*IUUQTUSBWJTDJPSH ͜ΕΒΛͬͯΓ͍ͨ͜ͱʢ࣮ݧதʣ τϐοΫε
αʔόߏஙͷखॱͷநԽ w खॱॻʁ ղͳυΩϡϝϯτ͕ࢁੵΈʹ w ϓϩϏδϣχϯά༻ͷγΣϧεΫϦϓτʁ ॊೈੑɺεέʔϥϏϦςΟͳͲͰ͋Γʁ
"OTJCMF w αʔόͷߏཧπʔϧ w ΤʔδΣϯτϨεͰಈ࡞ ʢϗετͰ1ZUIPO͕ಈ͚0,ʣ w ͦͷଞͷߏཧπʔϧ$IFGɺ1VQQFU w αʔόͷߏΛίʔυͱͯ͠هड़ʢ:".-ܗࣜʣ
"OTJCMFQMBZCPPLͷྫ # playbook.yml # CentOSͷྫ --- - name: playbookͷྫ hosts:
wakayamarb.org:22 remote_user: kamata become: yes tasks: - name: add a user user: name=user password=pass - name: install apache yum: name=hatted - name: enable apache service: name=httpd state=started enabled=yes
"OTJCMFͷσϞϯετϨʔγϣϯ VagrantͰ࡞ͨ͠ԾϚγϯʹରͯ͠ద༻ͯ͠Έ·͢
4FSWFSTQFD w αʔόͷߏͷςεςΟϯάϑϨʔϜϫʔΫ w 3VCZɺ34QFD͕ϕʔε
4QFDϑΝΠϧͷྫ # server_spec.rb # kamataϢʔβ͕ଘࡏ͢Δ describe user('kamata') do it {
should exist } end # ඞཁͳaptύοέʔδ͕Πϯετʔϧ͞Ε͍ͯΔ apt_packages = %w{ ufw apache2 postgresql-server } apt_packages.each do |pkg| describe package(pkg) do it { should be_installed.by('apt') } end end
4FSWFSTQFDͷσϞϯετϨʔγϣϯ wakayamarbαʔόʹରͯ͠ద༻ͯ͠Έ·͢
w $*ʢܧଓతΠϯςάϨʔγϣϯʣࢧԉαʔϏε w (JUIVCͳͲʹϗετ͞ΕͨΦʔϓϯιʔεϓϩδΣΫτ ͳΒɺແྉͰ༻ग़དྷΔ 5SBWJT$*
QVTI DMPOF UFTU ϏϧυɾςετࣗಈԽπʔϧ
5SBWJT$*ͷσϞϯετϨʔγϣϯ ςετͰ࡞ͨ͠nodeύοέʔδʹద༻ͯ͠Έ·͢
Γ͍ͨ͜ͱ ࣮ݧத ʔςετɾσϓϩΠͷࣗಈԽ
ܧଓతͳϦϑΝΫλɾςετɾϏϧυ QVTI DMPOF 4FSWFSTQFD "OTJCMF XBLBZBNBSCαʔό ϦϑΝΫλ ʔαʔόߏ$*ʹ
w 5SBWJT͔ΒXBLBZBNBSCͷΞΫηε w ଟஈ44) ϙʔτϑΥϫʔσΟϯάʁ w Ή͠Ζϗετ͕(JUIVC͔ΒQVMMͯ͘͠Δ͖ʁ w 伴ཧͷϙϦγʔʁ