A 5-minute introduction to using Vagrant and Salt together. As a Python developer, I find Salt much more friendly to my way of development.
The ideas here are based on Christian Nygaard's blog post on Quora. http://cnygaard.quora.com/Using-Vagrant-and-Salt-stack-together
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 – test and
discard and recreate
quickly
• Versionable – 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
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 –p ./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