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

Vagrant + chef

B4afc7d853d7f1cb6a253d3c7183c05a?s=47 Naoya Ito
February 22, 2013

Vagrant + chef

B4afc7d853d7f1cb6a253d3c7183c05a?s=128

Naoya Ito

February 22, 2013
Tweet

More Decks by Naoya Ito

Other Decks in Technology

Transcript

  1. WBHSBOU DIFG !OBPZB@JUP

  2. DIFG

  3. ʮ໘നͦ͏ʯ

  4. ࢼݧ؀ڥ 

  5. ̏෼ͰΠφϑ cf:  h&ps://speakerdeck.com/mirakui/quan-­‐zi-­‐dong-­‐parameta:yuningusan

  6. WBHSBOU

  7. None
  8. None
  9. WBHSBOUͷಋೖ  7JSVUBM#PYΛࣄલʹ͍Ε͓ͯ͜͏  $  gem  install  vagrant   $

     vagrant  box  add  centos  http:// developer.nrel.gov/downloads/vagrant-­‐boxes/ CentOS-­‐6.3-­‐x86_64-­‐v2013101.box    
  10. $  vagrant  init  centos   $  vagrant  up  

  11. None
  12. ಥવͷࢼݧ؀ڥ

  13. $  vagrant  ssh   $  vagrant  halt   $  vagrant

     reload  
  14. SNrSG ͯ͠΋҆৺

  15. $  vagrant  gem  install  sahara  

  16. $  vagrant  sandbox  on   $  vagrant  sandbox  rollback  

    $  vagrant  sandbox  commit  
  17. LOJGFTPMP

  18. ϩʔΧϧ͔ΒDIFG TPMPୟ͍͍͍ͯͷ͸ খֶੜ·Ͱ

  19. None
  20. None
  21. None
  22. #  Vagrantfile   Vagrant::Config.run  do  |config|      config.vm.box  =

     "base"      config.vm.network  :hostonly,  "192.168.50.10"   #  ~/.ssh/config   Host  10.0.2.*      IdentityFile  ~/.vagrant.d/insecure_private_key      User  vagrant  
  23. $  gem  install  knife-­‐solo  

  24. $  knife  solo  init  chef-­‐solo   $  cd  chef-­‐solo  

    $  knife  cookbook  create  setup  –o  site-­‐ cookbooks  
  25. $  knife  solo  prepare  192.168.50.10   $  knife  solo  cook

     192.168.50.10  
  26. None
  27. #  Why  Run   $  knife  solo  cook  <host>  -­‐W

        #  Since  knife-­‐solo  0.3.0   $  knife  solo  cook  <host>  -­‐o  your::recipe  
  28. • WBHSBOUͱDIFGͷ࿈ܞ • #FSLTIFMG

  29. άάϨΧ SZ

  30. vagrant  naoya ݕࡧ

  31. ͱΓ͋͑ͣूதઢ

  32. ͝੩ௌ͋Γ͕ͱ͏͟͝ ͍·ͨ͠