DevOps, A brief introduction to Vagrant & Ansible

1,348 views
1,091 views

Published on

An introduction to the notion of Code As Infrastructure through the discovery of Vagrant (for managing VM) & Ansible (as a provisionner).

Published in: Software
0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,348
On SlideShare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
42
Comments
0
Likes
10
Embeds 0
No embeds

No notes for slide
  • If its broken something, you repair once the others members can just update the env
  • We use Capistrano, so you finally we have to use Ruby
  • DevOps, A brief introduction to Vagrant & Ansible

    1. 1. DevOps Vagrant & Ansible
    2. 2. Why ?
    3. 3. Code As Infrastructure
    4. 4. Because luck has no place
    5. 5. WHY ?
    6. 6. Installing development environment – no worries
    7. 7. Prevent your computer from being ruined
    8. 8. Team efficiency
    9. 9. Remove the pain of software deployment
    10. 10. Prevents inadvertent errors
    11. 11. Avoids annoying tasks
    12. 12. It works on my machine !
    13. 13. Certification program • Compile your application code. Getting the latest version of any recent code changes from other developers is purely optional and not a requirement for certification. • Launch the application or website that has just been compiled. • Cause one code path in the code you're checking in to be executed. The preferred way to do this is with ad-hoc manual testing of the simplest possible case for the feature in question. Omit this step if the code change was less than five lines, or if, in the developer's professional opinion, the code change could not possibly result in an error. • Check the code changes into your version control system. http://blog.codinghorror.com/the-works-on-my-machine-certification-program/
    14. 14. HOW ?
    15. 15. Know State & Consistency State A Provisioning State B
    16. 16. Idempotence & Repeatability State B Provisioning State B
    17. 17. Now you should say
    18. 18. Meet the tools a very opinionated presentation
    19. 19. The VM manager Vagrant
    20. 20. The provisioning tool • It configures the machine (installs stuff, push config files, etc.) – Puppet – Chef – Ansible – Salt – … ?
    21. 21. The deployment tool • It pushes the project on the server (& configures it, runs migration, clears caches, …) – Capistrano (and it can deploy non ruby applications) – Two ways informations transferts (DB sync, logs…)
    22. 22. Summary VMmanagement Vagrant Systemconfiguration Ansible Applicationdeployment Capistrano
    23. 23. Where is Docker ?
    24. 24. Well…Pre-provisionedVM Docker Applicationdeployment Capistrano
    25. 25. Why we don’t use docker ?
    26. 26. • Because you need a specific cloud provider… And we deploy our apps in the customer datacenter on various systems. • But maybe, one day…
    27. 27. So why Ansible and not puppet/chef/… ?
    28. 28. • Simple (its just Yaml) • Agent less • Runs on every dev machine (python + openssh, yeah that means you don’t need ruby) • Push based • Made in Durham
    29. 29. How it works ?
    30. 30. Vagrant • A Vagrant File contains : – Provider – Sharing folder instruction – Networking configuration (port forwarding) – (optionnal) Provisionner
    31. 31. Ansible • Hosts • Variables • Roles
    32. 32. Playbook.yml
    33. 33. Rôles
    34. 34. Rôles (again)
    35. 35. Tasks
    36. 36. Templates
    37. 37. Handlers
    38. 38. Files • It’s just for copy/paste !
    39. 39. Vagrant + ansible skeleton • https://github.com/Ibsciss/vagrant-ansible-php
    40. 40. Where do I put all of this stuff ? in its own branch
    41. 41. Does & Don’ts It’s also opinionated
    42. 42. • Don’t: Make snowflake VM : you become dependant of the VM management tool • Do: Separate provisioning • Don’t: Use Vagrant default SSH key in production ! • Don’t: Separate dev & ops • Don’t: Try to eliminate admin sys (you need hero) • Do: Use same environment for Dev/test/prod
    43. 43. Let’s deploy !
    44. 44. Questions ?
    45. 45. Thank you !

    ×