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
360
NPX-shell-hacking
kamataryo
0
44
frontend-shikoku#1
kamataryo
1
680
Introducing of Map Warper
kamataryo
0
1.3k
wp-rest-api-and-amazon-polly
kamataryo
0
930
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
88
Other Decks in Programming
See All in Programming
Kaigi on Railsに初参加したら、その日にLT登壇が決定した件について
tama50505
0
100
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
340
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
140
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
480
Recoilを剥がしている話
kirik
5
6.8k
Beyond ORM
77web
7
970
情報漏洩させないための設計
kubotak
3
340
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
Exploring: Partial and Independent Composables
blackbracken
0
100
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
850
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
780
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Git: the NoSQL Database
bkeepers
PRO
427
64k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Mobile First: as difficult as doing things right
swwweet
222
9k
Building Adaptive Systems
keathley
38
2.3k
KATA
mclloyd
29
14k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
What's in a price? How to price your products and services
michaelherold
243
12k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
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 伴ཧͷϙϦγʔʁ