Skip to content

Instantly share code, notes, and snippets.

@dstokes
Created July 1, 2014 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dstokes/4887b2a631c2cc93a33c to your computer and use it in GitHub Desktop.
Save dstokes/4887b2a631c2cc93a33c to your computer and use it in GitHub Desktop.
Salt Development Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
$bootstrap = <<SCRIPT
#!/usr/bin/env bash
apt-get update
apt-get install -y git build-essential python-pip python-dev python-m2crypto
# isntall dependencies
pip install pyzmq PyYAML pycrypto msgpack-python jinja2 psutil
pip install -e /srv/salt
pip install -r /srv/salt/dev_requirements_python27.txt
pip install git+https://github.com/saltstack/salt-testing.git#egg=SaltTesting
# configure master and minion
mkdir -p /etc/salt
cp /srv/salt/conf/{master,minion} /etc/salt
SCRIPT
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "base"
# sync salt development host directory
config.vm.synced_folder "/path/to/salt", "/srv/salt"
# provision
config.vm.provision "shell", inline: $bootstrap
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment