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

the future of development environment

lielran
February 17, 2014

the future of development environment

vagrant - the future of development environment

lielran

February 17, 2014
Tweet

More Decks by lielran

Other Decks in Technology

Transcript

  1. env OS versions environment OS version devs VM’s CentOS release

    6.5 (Final) beta61 CentOS release 5.10 (Final) Production(dlxapi61) CentOS release 5.9 (Final) DB61(prod) CentOS release 6.4 (Final) DB01(failover) CentOS release 6.5 (Final)
  2. what do you expect from your dev env? • port-forwarding

    • folder linking (sync folders) • cross platform • one-click-setup and easy install process • share with others devs • automatic update • version controlled
  3. Vagrant- “a person without a settled home or regular work

    who wanders from place to place and lives by begging.”
  4. what is Vagrant ? • a way of managing virtual

    machines • create a lightweight,reproducible and portable env. • run different OS • define VM in code • stands on the shoulders of giants
  5. how ? • providers • cross platform • configuration (as

    code) • boxes • provisioning • networking • multi-machine • synced folders • ….
  6. base box minimal packaged version of the OS with some

    specific configuration. (e.g. a few tools which allow it to communicate with Vagrant)
  7. separate environment for each project • each project configs save

    in a Vagrantfile • Vagrantfile written in Ruby • one Vagrantfile for the entire project • can be saved into SCM(easy sharing) (new devs can be onboarded with two command line “git clone x” && “vagrant up”)
  8. vagrant init vagrant up vagrant halt vagrant status vagrant suspend

    vagrant resume vagrant provision vagrant ssh vagrant destroy self service
  9. mimic the prod environment • support multiple machines (in the

    same Vagrantfile) • each machine can have different base-box
  10. workflow - 1 • Vagrant(file) per for entire project(repository) •

    using minimalistic base box • provisioning everything(puppet/chef/ansible/bash)
  11. workflow - 1 pro: • simple management. cons: • out

    of date easily with Ops. • slow
  12. workflow - 2 • Vagrant(file) per for entire project(repository) •

    another VagrantFile that runs full stack provisioning from minimalistic base image • package and upload the golden image box
  13. workflow - 2 pros: • simple management.(from dev perspective) •

    faster cons: • create the golden image is more complex task