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

Chef + Vagrantで作るこれからの開発環境

Chef + Vagrantで作るこれからの開発環境

9b69fbdeb0713def44a8731091ce5885?s=128

Yusuke Ando

June 01, 2013
Tweet

Transcript

  1. QIQDPO@LBOTBJ!ZBOEP $IFG 7BHSBOUͰ࡞Δ ͜Ε͔Βͷ։ൃ؀ڥͱΫϥ΢υ photo by buck82

  2. ZBOEP $BOEZ$BOFQIQ ʮ࠙਌ձϐβൃ஫ΞϓϦʯ

  3. 4UBSPOVT

  4. 1)1ରԠ1BB4 $IFGͰ"84Λࣗಈߏங ࣌ؒ༗ਓ؂ࢹ 44)TVEPՄೳ͔ͭαϙʔτ༗

  5. ։ൃ؀ڥ ୭Ͱ΋ඞཁʹͳΔ ଟ࠼ ͗͢Δ ؀ڥ 9".1 .".1 7JSUVBM#PY TZTUFN1)1 ࣮؀ڥͱ͸Կ͔͕ҧ͏

    શ͘ҧ͏
  6. ൃੜ͢Δ໰୊ Զͷ؀ڥͰ͚ͩΤϥʔ ຊ൪Ͱ͸ಈ͔ͳ͍ ηοτΞοϓ͕େม ΍ΉΛ͑ͣɺຊ൪Ͱ։ൃ

  7. ͋·Γʹ΋ແ࢒

  8. ͦ͜Ͱ7BHSBOU

  9. 7BHSBOU ։ൃ؀ڥߏஙπʔϧ 7BHSBOUͱ7JSUVBM#PYͷηοτΞοϓ ఆٛϑΝΠϧΛςΩετͰهड़ WBHSBOUVQͰ։ൃ؀ڥ͕ىಈ

  10. WBHSBOUVQ Vagrantfile VirtualBox Chef Solo Cookbook ಡΈࠐΈ ىಈ ࣗಈઃఆ ಡΈࠐΈ

    ΩοΫ
  11. ͍͢͝ ϑΝΠϧ͚ͩͰಉ͡؀ڥΛ࠶ݱ ςΩετͳͷͰࠩ෼؅ཧͰ͖Δ ޷͖ͳ*%&ͰΰϦΰϦฤूͰ͖Δ $IFGͷDPPLCPPLΛຊ൪ʹྲྀ༻Ͱ͖Δ ௒ศར͔ͭɺຊ෺ͷ؀ڥ͕࢖͑Δ

  12. Πϯετʔϧ gemͰͷΠϯετʔϧ͸ඇਪ঑ʹ

  13. WBHSBOUCPY ։ൃ؀ڥͷϕʔεʹ͢ΔΠϝʔδ IUUQXXXWBHSBOUCPYFT ຊ൪ͱಉ͡04΍ΞʔΩςΫνϟΛ WBHSBOUCPYBEE\UJUMF^\VSM^

  14. WBHSBOUJOJU 7BHSBOUpMFΛੜ੒ ϓϩδΣΫτ഑ԼͳͲ͕ྑ͍ IPNFʹ௚઀࡞Βͳ͍΄͏͕ྑ͍ http://bit.ly/php-vagrant

  15. Vagrant.configure("2") do |config| config.vm.box = "base" config.vm.box_url = "http://dom.com/ a.box"

    end
  16. WBHSBOUVQ 7BHSBOUpMFΛݩʹϚγϯΛىಈ WBHSBOUTTIͰTTIͰϩάΠϯՄೳ JEQBTTͷ؅ཧ͸ෆཁʂ ͜ͷ··ͩͱૉͷΠϝʔδ

  17. DPOpHWNQSPWJTJPO ىಈͨ͠Ϛγϯ΁ͷߏஙઃఆ $IFG1VQQFU$'&OHJOF4IFMMΛ࢖͏ ΫοΫϒοΫ΁ͷύεΛهड़

  18. config.vm.provision :chef_solo do |chef| chef.cookbooks_path = "../my-recipes/cookbooks" chef.add_recipe "mysql" end

  19. $IFG େྲྀߦͷߏஙπʔϧ ϨγϐΛهड़ͯ͠ߏங ωοτ্ʹ৘ใ͕ଟ͍

  20. package “nginx” template “/etc/nginx/nginx.conf” do source “nginx.conf.erb” end service “nginx”

    do action :start end SFDJQF Πϯετʔϧ ઃఆϑΝΠϧίϐʔ αʔϏε։࢝
  21. ΫοΫϒοΫ͸ҭͭ ඞཁͳهड़Λগͮͭ͠஝ੵ ಉ͡ઃఆΛίϚϯυҰൃͰ൓ө ΫοΫϒοΫΛຊ൪΁ྲྀ༻

  22. DPOpHWNTZODFE@GPMEFS 1$ଆͷϑΥϧμΛ7.ʹϚ΢ϯτ υΩϡϝϯτϧʔτʹιʔεΛʂ *%&Ͱฤूͨ͠಺༰͕ଈ࣌൓ө GUQɺTDQ΍HJU͕ແͯ͘΋େৎ෉

  23. ͦͷଞ DPOpHWNOFUXPSL /"5ઃఆͳͲͷࣗಈԽ WCDVTUPNJ[F ϝϞϦׂΓ౰ͯͳͲ ϓϥάΠϯ ଞͷԾ૝Խ΍Ϋϥ΢υΛར༻Մೳ

  24. ཧ૝ܗ Vagrantfile Cookbook Ϋϥ΢υ ։ൃ؀ڥ ຊ൪؀ڥ $PPLCPPLͰ։ൃ؀ڥͱຊ൪؀ڥΛಉظ

  25. Node Node GitHub engineyard.com Node &OHJOF:BSEͷ৔߹ DIFGTPMP Cookbook BQQMZ &OHJOF:BSE͕࣮૷ͨ͠Ϩγϐ

    Λ8FCͷૢ࡞Ͱඞཁͳ࣌ʹ൓ө ΧελϜϨγϐ
  26. GitHub ։ൃऀͷPC &OHJOF:BSE-PDBM Cookbook &OHJOF:BSE-PDBM Ϋϥ΢υ্ͱಉҰͷϨγϐͰϩʔΧϧʹ ։ൃ؀ڥΛ࡞Δπʔϧ VM DIFGTPMP BQQMZ

    7BHSBOU Node DIFGTPMP BQQMZ
  27. ࣭໰ʁ