Created
March 4, 2012 06:58
-
-
Save dcolish/1971075 to your computer and use it in GitHub Desktop.
Bootstrap a development minion
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
#!/bin/bash | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Use this with something like | |
# Vagrant::Config.run do |config| | |
# config.vm.box = "lucid32" | |
# config.vm.forward_port 22, 2223 | |
# config.vm.forward_port 80, 8080 | |
# config.vm.provision :shell do |shell| | |
# shell.path = "provision.sh" | |
# shell.args = "https://github.com/dcolish/salt.git /vagrant/conf/minion-local.yml" | |
# end | |
# end | |
#sanity check for networking | |
ping -c 1 us.archive.ubuntu.com | |
apt-get update | |
apt-get -y install git-core python-software-properties | |
add-apt-repository ppa:saltstack/salt | |
apt-get update | |
apt-get -y install python-virtualenv libzmq-dev\ | |
python-pyzmq python-crypto python-m2crypto\ | |
msgpack-python python-yaml python-jinja2 | |
cat > /tmp/setup.sh <<EOF | |
#!/bin/bash | |
virtualenv "\${HOME}"/ENV | |
git clone $1 "\${HOME}"/salt | |
. "\${HOME}"/ENV/bin/activate | |
cd "\${HOME}"/salt | |
python setup.py develop -N | |
mkdir -p /tmp/var/{log,cache}/salt | |
mkdir -p /tmp/etc/salt/pki | |
"\${HOME}"/ENV/bin/salt-minion -c $2-d | |
EOF | |
chown vagrant /tmp/setup.sh | |
chmod +x /tmp/setup.sh | |
sudo -u vagrant -H /tmp/setup.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment