ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
milestone42

Automating Development with
Vagrant and Salt
1

milestone42
Copyright ? 2013. Sumanth Vepa.
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/bysa/3.0/ or send a letter to Creative Commons,
171 Second Street, Suite 300, San Francisco,
California, 94105, USA.

2

milestone42
What is Vagrant?

Why Use Vagrant?

http://www.vagrantup.com/

? Isolate dependencies

Setup a development environment
? Quickly
? Reproducibly,
? and, in a Controlled way.

? Reproducible environment
? Disposable ¨C test and
discard and recreate
quickly
? Versionable ¨C keep your
environment versioned
? Shareable

3

milestone42
Using Vagrant
On the host
$ mkdir vagrant-test; cd vagrant-test
$ vagrant init precise32 http://files.vagrantup.com/precise32.box
$ vagrant up
$ vagrant ssh

On the guest
vagrant@precise32:~$ ls /vagrant
Vagrantfile

4

On the host
$ ls ./vagrant-test
Vagrantfile

milestone42
Configuring the environment ¨C simplistic

Vagrantfile

bootstrap.sh

5

milestone42
(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

6

Salt
minion

Salt
minion

milestone42
Configuring the environment with Salt
On the host: One additional package
$ vagrant plugin install vagrant-salt

Create the salt configuration
$ cd test-vagrant
$ mkdir ¨Cp ./salt/roots
$ touch salt/minion
$ touch salt/roots/apache.sls
$ touch salt/roots/top.sls

Vagrantfile

7

milestone42
Configuring the environment with Salt
Additions to the Vagrantfile for Salt

./salt/minion

8

./salt/roots/top.sls

./salt/roots/apache

milestone42
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.
9

milestone42

More Related Content

Automating Development Operations with Vagrant and Salt (the 5min intro)

  • 1. milestone42 Automating Development with Vagrant and Salt 1 milestone42 Copyright ? 2013. Sumanth Vepa.
  • 2. 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/bysa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. 2 milestone42
  • 3. What is Vagrant? Why Use Vagrant? http://www.vagrantup.com/ ? Isolate dependencies Setup a development environment ? Quickly ? Reproducibly, ? and, in a Controlled way. ? Reproducible environment ? Disposable ¨C test and discard and recreate quickly ? Versionable ¨C keep your environment versioned ? Shareable 3 milestone42
  • 4. Using Vagrant On the host $ mkdir vagrant-test; cd vagrant-test $ vagrant init precise32 http://files.vagrantup.com/precise32.box $ vagrant up $ vagrant ssh On the guest vagrant@precise32:~$ ls /vagrant Vagrantfile 4 On the host $ ls ./vagrant-test Vagrantfile milestone42
  • 5. Configuring the environment ¨C simplistic Vagrantfile bootstrap.sh 5 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 6 Salt minion Salt minion milestone42
  • 7. Configuring the environment with Salt On the host: One additional package $ vagrant plugin install vagrant-salt Create the salt configuration $ cd test-vagrant $ mkdir ¨Cp ./salt/roots $ touch salt/minion $ touch salt/roots/apache.sls $ touch salt/roots/top.sls Vagrantfile 7 milestone42
  • 8. Configuring the environment with Salt Additions to the Vagrantfile for Salt ./salt/minion 8 ./salt/roots/top.sls ./salt/roots/apache 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. 9 milestone42