Vagrant と Chef でつくるはてなブックマークの開発環境
by
aereal
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
Vagrant ͱ Chef Ͱͭ͘Δ ͯͳϒοΫϚʔΫͷ! ։ൃڥ id:aereal
Slide 2
Slide 2 text
ΞδΣϯμ •ͯͳϒοΫϚʔΫ։ൃڥͷ͜Ε·Ͱ •Vagrant + Chef ʹΑΔ࣮ࡍͷӡ༻ͱ՝
Slide 3
Slide 3 text
ࠓ͠ͳ͍ •Vagrant ͱ? •Chef ͱ? •(Carton ͱ?)
Slide 4
Slide 4 text
aereal aereal aereal.org
Slide 5
Slide 5 text
• αʔόαΠυ (Perl) • ΫϥΠΞϯταΠυ (JavaScript) ! ! • αʔόαΠυ (Perl) • ϒϥβ֦ு (JavaScript) • ։ൃج൫ͷඋ • Jenkins, Plack, etc.
Slide 6
Slide 6 text
ͯͳϒοΫϚʔΫ • αʔϏε։࢝ (20052݄ʙ) • ϦχϡʔΞϧ (200811݄)
Slide 7
Slide 7 text
ͯͳϒοΫϚʔΫ (2) • Ridge (ࣗࣾWAF) • DBIx::MoCo (ࣗࣾO/R mapper) • mod_perl2 • nginx + Apache
Slide 8
Slide 8 text
ͯͳϒοΫϚʔΫ (3) • >= 30000 commits • >= 7000 files • >= 50 contributors 20082݄ʙ
Slide 9
Slide 9 text
ͯͳϒοΫϚʔΫ! ։ൃڥͷ͜Ε·Ͱ
Slide 10
Slide 10 text
ෳࡶͳґଘؔ
Slide 11
Slide 11 text
→ґଘͷղܾ
Slide 12
Slide 12 text
ߏཧ
Slide 13
Slide 13 text
ຊ൪ •Chef •RPM ։ൃ •cpanm •Homebrew •apt •yum
Slide 14
Slide 14 text
OS
Slide 15
Slide 15 text
ຊ൪ •CentOS ։ൃ •OS X •Windows •Linux (Debian)
Slide 16
Slide 16 text
ͱΓ͋͑ͣ cpanm --installdeps .
Slide 17
Slide 17 text
ͳΜ͔ࣦഊ͢Δ
Slide 18
Slide 18 text
cpanm --installdeps .
Slide 19
Slide 19 text
ͳΜ͔ࣦഊ͢Δ
Slide 20
Slide 20 text
cpanm \ --installdeps .
Slide 21
Slide 21 text
ͳΜ͔ࣦഊ͢Δ
Slide 22
Slide 22 text
͏ͩ
Slide 23
Slide 23 text
ͳΜͱ͔͢Δ
Slide 24
Slide 24 text
A. จॻΛ͢
Slide 25
Slide 25 text
• ίʔυίϛοτʹ දΕͳ͍ͷ • ܦҢ • จ຺ ! ! • ʮ݁ہͲ͏͢Ε͍͍ ͔ʯԕ͍ • Ϟνϕʔγϣϯͷফඅ • Ϟνϕʔγϣϯ༗ ݶ • ʮͱʹ͔͘ؤுΔʯ
Slide 26
Slide 26 text
A. ϓϩάϥϚϒϧͳ ηοτΞοϓํ๏
Slide 27
Slide 27 text
• ୯७࡞ۀͷੵΈॏͶ • ΦϓγϣϯҾͷ ࢼߦࡨޡͱ͔ • ϩά͕Δ • յΕͨΒ͙͢ʹΘ͔Δ ! • ෳࡶ͞Λ࣋ͪࠐΉ • ֶशίετ • ϝϯςφϯείετ
Slide 28
Slide 28 text
http://vagrantup.com/
Slide 29
Slide 29 text
•VM Λ্ཱͪ͛Δ •(Ҏલʹ͍ͬͯͨ) •ϋʔυΣΞਐԽ͕ͨ͠……
Slide 30
Slide 30 text
http://www.opscode.com/chef/
Slide 31
Slide 31 text
୮ਫ਼͜Ίͯ࡞ͬͨ VM Πϝʔδ
Slide 32
Slide 32 text
୮ਫ਼͜Ίͯ࡞ͬͨ VM Πϝʔδ R.I.P.
Slide 33
Slide 33 text
Vagrant! ʢόουʣϊϋ
Slide 34
Slide 34 text
•NFS ͰήετͱϦϙδτϦΛڞ༗͢Δ •Virtualbox ͷ shared folder ͍ •࠷େ20ഒ͍…… • http://docs-v1.vagrantup.com/v1/docs/nfs.html
Slide 35
Slide 35 text
•perl-build Ͱ Perl 5.8.8 ΛೖΕΔ •tokuhirom/perl-build •CPAN Ϟδϡʔϧ Cookbook ʹهड़ •όʔδϣϯΛࢦఆͯ͠Πϯετʔϧ͢Δ LWRP •ผʹ Carton ԽਐΊ͍ͯΔ
Slide 36
Slide 36 text
• ./bin/server • vagrant up • vagrant ssh-config --host vagrant > .ssh_config • ssh "cd /repos; perl server.up $@"
Slide 37
Slide 37 text
•VM Λ্ཱͪ͛ͯ •ssh_config Λͭͬͯ͘ •SSH Ͱήετ OS ্ͰεΫϦϓτΛ࣮ߦ •Proclet
Slide 38
Slide 38 text
͙͢ʹ։ൃ͍ͨ͠!!!
Slide 39
Slide 39 text
•provisioning ·Ͱࡁ·ͤͨ box ΛΔ •ࣾϑΝΠϧαʔό •FTP ΞΫηεՄ
Slide 40
Slide 40 text
՝
Slide 41
Slide 41 text
•ೋॏཧͳͷͦͷ·· •→ຊ൪ʹద༻͞ΕΔChefϨγϐͱ࿈ܞ •ϝϯς͍ͯ͠Δͷ͚ࣗͩ •→ݟΛΊ͍͖͍ͯͨ
Slide 42
Slide 42 text
ͳʹͱ͋Ε
Slide 43
Slide 43 text
Vagrant + Chef ࠷ߴ!
Slide 44
Slide 44 text
Vagrant + Chef ࠷ߴ?
Slide 45
Slide 45 text
NOT ۜͷؙ
Slide 46
Slide 46 text
Why use?
Slide 47
Slide 47 text
•όʔδϣϯ੍͕ڧ͍ •CPAN Ϟδϡʔϧ •ϛυϧΣΞ •৽ͨʹ։ൃʹࢀՃ͢Δਓ͕Ұఆ͍Δ •Πϯλʔϯ •ҟಈ
Slide 48
Slide 48 text
Θͣʹ͢Ήͷ͕ཧ
Slide 49
Slide 49 text
•Carton •plenv / perlbrew •(Chef Solo)
Slide 50
Slide 50 text
ෳࡶ͞ͷঈΛ͔Δ
Slide 51
Slide 51 text
Fin.