Created
July 11, 2014 00:18
-
-
Save ryan-lane/94c7d96b5586d661f30f to your computer and use it in GitHub Desktop.
Salt development Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$script = <<SCRIPT | |
# Install salt dependencies | |
sudo apt-get -y update | |
sudo apt-get install -y build-essential libssl-dev python-dev python-m2crypto \ | |
python-pip python-virtualenv python-zmq swig virtualenvwrapper git-core python-apt | |
if [ ! -d /srv/salt/venv ] | |
then | |
sudo mkdir -p /srv/salt/venv | |
fi | |
sudo chown vagrant /srv/salt/venv | |
virtualenv --system-site-packages /srv/salt/venv | |
if [ "$?" != "0" ] | |
then | |
echo "Failed to create the venv" | |
exit 1 | |
fi | |
. /srv/salt/venv/bin/activate | |
pip install -U e git+https://github.com/saltstack/salt@develop#egg=salt | |
deactivate | |
if [ ! -L /usr/local/bin/salt-call ] | |
then | |
sudo ln -s /srv/ops/venv/bin/salt-call /usr/local/bin/salt-call | |
fi | |
SCRIPT | |
Vagrant.configure("2") do |config| | |
config.vm.provider :virtualbox do |vb| | |
vb.cpus = 2 | |
vb.memory = 1024 | |
end | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.provision :shell, :privileged => false, :inline => $script | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment