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

Automate your development environment - PTJUG

João Nelas
October 24, 2013

Automate your development environment - PTJUG

With Chef and Vagrant.

Checkout the demo video at https://vimeo.com/77776149

João Nelas

October 24, 2013
Tweet

Other Decks in Programming

Transcript

  1. automate your dev environment
    chef + vagrant

    View Slide

  2. Me

    View Slide

  3. • CTO at Cult of Bits
    • 10+ years of professional Java
    development
    Me

    View Slide

  4. What are we
    going to talk
    about?

    View Slide

  5. What?
    Stop installing things
    by hand

    View Slide

  6. Why?

    View Slide

  7. Why?
    Because it’s
    Boring

    View Slide

  8. Why?
    Because you will make
    mistakes

    View Slide

  9. Why?
    Ultimately, because
    it’s something that
    your computer can do
    better and cheaper.

    View Slide

  10. Chef

    View Slide

  11. Chef
    Chef is an automation platform that
    transforms infrastructure into code.
    source: http://www.opscode.com/chef/

    View Slide

  12. Chef variants

    View Slide

  13. Chef variants
    Chef Server

    View Slide

  14. Chef variants
    Chef Server
    Use it to manage
    many computers

    View Slide

  15. Chef variants
    Chef Solo
    chef-solo is an open source version of
    the chef-client that allows using
    cookbooks with nodes without
    requiring access to a server.

    View Slide

  16. (some)
    Chef
    concepts

    View Slide

  17. Chef concepts
    Node
    A node is any physical, virtual, or cloud
    machine that is configured to be
    maintained by a chef-client.

    View Slide

  18. Chef concepts
    Role
    A role is a way to define certain patterns
    and processes that exist across nodes in
    an organization as belonging to a single
    job function.

    View Slide

  19. Chef concepts
    Cookbook
    A cookbook is the fundamental unit of
    configuration and policy distribution.
    Each cookbook defines a scenario, such
    as everything needed to install and
    configure MySQL, and then it contains all
    of the components that are required to
    support that scenario

    View Slide

  20. What else are
    we going to
    talk about?

    View Slide

  21. What?
    Get rid of the
    “it works on my
    machine”
    issues

    View Slide

  22. Why?

    View Slide

  23. Why?
    Because it’s a
    waste of time

    View Slide

  24. Why?
    Because it reflects
    poorly on you

    View Slide

  25. Vagrant

    View Slide

  26. Vagrant
    Vagrant is a tool for building complete
    development environments. Vagrant
    lowers development environment setup
    time, increases development/production
    parity, and makes the "works on my
    machine" excuse a relic of the past.
    source: http://www.vagrantup.com/

    View Slide

  27. Vagrant
    concepts

    View Slide

  28. Vagrant concepts
    Providers
    Enable Vagrant to work with different
    backends: VirtualBox (the default),
    VMware Fusion (paid), AWS, Rackspace,
    Digital Ocean, etc…

    View Slide

  29. Vagrant concepts
    Boxes
    Boxes are the skeleton from which
    Vagrant machines are constructed. They
    are portable files which can be used by
    others on any platform that runs Vagrant
    to bring up a working environment.
    !
    Boxes are provider specific.

    View Slide

  30. Vagrant concepts
    Vagrantfile
    The primary function of the Vagrantfile is
    to describe the type of machine required
    for a project, and how to configure and
    provision these machines.
    !
    Commit them to version control.

    View Slide

  31. DEMO
    TIME
    available at: https://vimeo.com/77776149

    View Slide

  32. References

    View Slide

  33. The Chef Homepage
    http://www.opscode.com/chef/
    The Vagrant Homepage
    http://www.vagrantup.com/
    A big list of available Vagrant boxes
    http://www.vagrantbox.es/
    References

    View Slide

  34. Thank you!
    @jnelas
    [email protected]

    View Slide