Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ikyu_lt_#1

kentana20
August 10, 2014

 ikyu_lt_#1

社内LT#1 Chef+Vagrant の話

kentana20

August 10, 2014
Tweet

More Decks by kentana20

Other Decks in Technology

Transcript

  1. C H E F ͷ ͸ ͳ ͠ @ K

    E N TA N A 2 0
  2. ࣗ ݾ ঺ հ • ాதɹ݈հʢͨͳ͔ɹ͚Μ͚͢ʣ • גࣜձࣾҰٳ • ͣͬͱҰٳ.comͰαʔϏε։ൃ

    • ࠷ۙ͸ۀ຿վળͱ͔ • Twitter : @kentana20 / Facebook : kentana20 • blog : http://kentana20.hatenablog.com/
  3. W H AT I S C H E F ?

    https://accounts-flickr.yahoo.com/photos/damski/5961847891/sizes/l/in/photolist-a5Q2ET-9eNMYW-hBEz3x-mVq37o-fdKi5L-bznaeo-aSZiZD-9e8th2-agUBS2-bzjBTN-dtD2wC-82UkmS-d9VLwH-e8kbXd-e7L5Cv-nfqTRs-gNVDPm-cNB3bN-br71eJ-9iErXy-ae11xR-o7US71-8Uehvd-fNgLao- bnjK3b-9f18ju-8j6uex-dVxJJe-bqXbPQ-anei9B-aFMeV4-9bgE4R-auJrqM-gU6JEH/
  4. W H AT I S C H E F ?

    ɾChef - OpsCodeࣾͷOSS - αʔόͷߏ੒؅ཧπʔϧ - ߏ੒ͷهड़͸RubyͰ
  5. ߏ ੒ ؅ ཧ ʁ • αʔόηοτΞοϓʙಋೖ·Ͱͷ࡞ۀ • ֤छϛυϧ΢ΣΞΠϯετʔϧ •

    Apache, MySQL, Fluentd, Ruby, Bundler …etc • ϛυϧ΢ΣΞઃఆ • httpd.conf, my.cnf, td-agent.conf, rb-env, gem … • ΞϓϦέʔγϣϯઃఆ • `bundle exec rails s`
  6. C H E F Ͱ Ͱ ͖ Δ ͜ ͱ

    • αʔόʹରͯ͠ͷૢ࡞ΛRubyίʔυͰهड़ • Cookbooks • Recipeͷάϧʔϓʢ͍͍ͩͨϛυϧ΢ΣΞ୯Ґʣ • Recipe • ϛυϧ΢ΣΞͷઃఆʢαʔόɺΫϥΠΞϯτɺଞʣ
  7. B E F O R E C H E F

    • αʔόͷߏ੒؅ཧ͸खॱॻ • खॱॻϝϯς͞Εͳ͍ • αʔό૿ઃɾఫڈ࣌ͷಋೖ࡞ۀ͸Πϯϑϥ৬ਓܳ • αʔό૿ઃɺAPߏ੒มߋ࣌ͷτϥϒϧଟ͠ • Viva ҉໧஌
  8. A F T E R C H E F •

    αʔόͷߏ੒؅ཧ͸ίʔυ • ߏ੒ͷίʔυ΋GitHubͰPullRequest • αʔό૿ઃ࣌ͷಋೖ࡞ۀ͸ChefͰίϚϯυҰൃ • αʔό૿ઃɺAPߏ੒มߋ࣌ͷτϥϒϧݮ • ҉໧஌๾໓
  9. C H E F Λ ޠ Δ ্ Ͱ ܽ

    ͔ ͤ ͳ ͍ ΋ ͷ VA G R A N T
  10. W H AT I S VA G R A N

    T ? ɾVagrant - Hashi Corpࣾ - Ծ૝؀ڥͷࣗಈߏஙπʔϧ - ϓϩάϥϚϒϧʹ؀ڥઃఆ - ༷ʑͳVM΍IaaSʹରԠ
  11. VA G R A N T Ͱ Ͱ ͖ Δ

    ͜ ͱ • VMىಈ࣌ͷઃఆʢVagrantfileʣ • ωοτϫʔΫͷઃఆ • VMͷ؅ཧର৅ઃఆ • ىಈ࣌ʹ࣮ࢪ͢Δ಺༰ • VMͷૢ࡞ • ىಈ(up)ɾऴྃ(halt)ɾ࠶ىಈ(reload), ഁյ(destroy)
  12. C H E F + VA G R A N

    T Ͱ Ͱ ͖ Δ ͜ ͱ • VagrantΛ࢖ͬͯԾ૝؀ڥΛηοτΞοϓ • Ծ૝؀ڥΛChefΛ࢖ͬͯߏ੒؅ཧ ! • Ծ૝؀ڥΛखಈͰ৮Βͣʹ؀ڥߏங͕Մೳ
  13. ͱ Γ ͋ ͑ͣɺ σ Ϟ • VagrantͰVMىಈ • Կ΋ೖͬͯͳ͍…

    • Vagrant+ChefͰGitΛΠϯετʔϧ • ىಈ࣌ʹGit͕ೖͬͯΔʂ
  14. ͍ · ΍ ͬͯ Δ ͜ ͱ • Vagrant+ChefͰRails؀ڥΛߏங •

    Git, Ruby, Rails, Redis ΛΠϯετʔϧ • `git clone && bundle exec rails` Ͱαʔόىಈ • Vagrant-AWSϓϥάΠϯ • EC2ΠϯελϯεΛࣗಈߏங
  15. End