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
44
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
CSC509 Lecture 09
javiergs
PRO
0
140
カンファレンスの「アレ」Webでなんとかしませんか? / Conference “thing” Why don't you do something about it on the Web?
dero1to
1
110
Better Code Design in PHP
afilina
PRO
0
130
Modular Monolith Monorepo ~シンプルさを保ちながらmonorepoのメリットを最大化する~
yuisakamoto
2
170
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
Amazon Qを使ってIaCを触ろう!
maruto
0
420
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
200
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
240
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
Click-free releases & the making of a CLI app
oheyadam
2
120
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Designing for humans not robots
tammielis
250
25k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Scaling GitHub
holman
458
140k
4 Signs Your Business is Dying
shpigford
180
21k
Code Reviewing Like a Champion
maltzj
520
39k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Making Projects Easy
brettharned
115
5.9k
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 伴ཧͷϙϦγʔʁ