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

͸ͯͳϒοΫϚʔΫ • αʔϏε։࢝ (2005೥2݄ʙ) • ϦχϡʔΞϧ (2008೥11݄)

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 2008೥2݄ʙ

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.