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

Automating development with Vagrant and Salt

De3b431e5956bcda51bbb9697399806e?s=47 tektalks
November 17, 2013

Automating development with Vagrant and Salt

#DevOpsDays India 2013 : Automating development with Vagrant and SaltStack



November 17, 2013


  1. 1 milestone42 milestone42 Copyright © 2013. Sumanth Vepa. Automating Development

    with Vagrant and Salt
  2. 2 milestone42 Copyright © 2013. Sumanth Vepa This work is

    licensed under the Creative Commons Attribution-Share-Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by- sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
  3. 3 milestone42 milestone42 3 Setup a development environment • Quickly

    • Reproducibly, • and, in a Controlled way. What is Vagrant? Why Use Vagrant? • Isolate dependencies • Reproducible environment • Disposable – test and discard and recreate quickly • Versionable – keep your environment versioned • Shareable http://www.vagrantup.com/
  4. 4 milestone42 Using Vagrant $ mkdir vagrant-test; cd vagrant-test $

    vagrant init precise32 http://files.vagrantup.com/precise32.box $ vagrant up $ vagrant ssh On the host vagrant@precise32:~$ ls /vagrant Vagrantfile On the guest $ ls ./vagrant-test Vagrantfile On the host
  5. 5 milestone42 Configuring the environment – simplistic Vagrantfile bootstrap.sh

  6. 6 milestone42 milestone42 6 (Very) Brief overview of Salt •

    Distributed configuration management • Rapid deployment across large numbers of hosts. • Uses Python as the implementation language. Salt master Salt minion Salt minion Salt minion
  7. 7 milestone42 $ vagrant plugin install vagrant-salt On the host:

    One additional package Configuring the environment with Salt $ cd test-vagrant $ mkdir –p ./salt/roots $ touch salt/minion $ touch salt/roots/apache.sls $ touch salt/roots/top.sls Create the salt configuration Vagrantfile
  8. 8 milestone42 Additions to the Vagrantfile for Salt ./salt/minion ./salt/roots/top.sls

    ./salt/roots/apache Configuring the environment with Salt
  9. 9 milestone42 milestone42 9 More information Vagrant: http://vagrantup.com Salt: http://www.saltstack.com/

    Salt+Vagrant: nygaard.quora.com/Using-Vagrant-and-Salt-stack-together milestone42.com Consulting and software services for development operations and automation.