devops days

Download Devops days

Post on 06-May-2015




4 download

Embed Size (px)


Presentation by Yosuke Tomita and Derek Szydlowski at DevOps Days Tokyo '13


  • 1.Our love for Chef and Vagrant Derek Szydlowski & Yosuke Tomita

2. Our setup Why Chef and vagrant - Challenges Starting project Knife vs Vagrant (Solo) Best practice/code to define recipes for multiple environments Problems with Vagrant / Chef Development Flow Recap and why its good for international office. More external info sources add chef and vagrant link OUTLINE 3. Intro 4. 60 + production servers ( 120 total ) 3 + environments 50 + repos 15 + active contributors 5. Challenges 6. Manual Environments = Unstable unscalable environments CHALLENGE 1 7. Devs and Devops not in sync Chef meets Vagrant CHALLENGE 2 Ops 8. Chef / Chef-Solo: configuration management tool Chef Recipe/Cookbook: Chef configuration file AWS EC2: Virtual Machine Cloud Service VirtualBox: Virtual Machine for Local Environments Vagrant: wrapper for creating VirtualMachines, delivering chef recipes and runs Chef remotely Knife-solo: Delivers recipes and runs chef remotely. Words and Terms 9. Workflow 10. Outline 11. Development Flow 12. Code Example Lets dip into the code and see some ways to create a dev vs production server. 13. Production/QA Knife-Solo roles/api.rb run_list( "role[base]", "recipe[nginx]", "recipe[python]", "recipe[repos::api]", "recipe[monit]", "recipe[monit::nginx]", "recipe[monit::api]" ) Local Vagrant Vagrantfile config.vm.provision :chef_solo do |chef| chef.add_recipe "base::git" chef.add_recipe "nginx" chef.add_recipe "php_pack" chef.add_recipe "python" chef.add_recipe "repos::api" end Sharing recipe on local and servers 14. Changing server configuration in a template cookbooks/repos/templates/api.erb ------