Created
February 20, 2013 20:22
-
-
Save akaihola/4999231 to your computer and use it in GitHub Desktop.
Salt minion bootstrap script for pristine Debian/Ubuntu virtual hosts
This file contains hidden or 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 | |
# Salt minion bootstrap script for freshly installed Debian/Ubuntu | |
# virtual servers | |
# | |
# Let's assume you have a newly created Debian/Ubuntu VPS with no | |
# network interface running. To bootstrap Salt, copy this file into | |
# your home directory on the [SALT MASTER] and do the following on the | |
# VPS: | |
# | |
# $ sudo ip addr add [VPS IP ADDRESS]/[NETMASK] dev eth0 | |
# $ sudo ip route add default via [GATEWAY IP ADDRESS] | |
# $ ssh [SALT MASTER] cat salt-bootstrap.sh | sudo bash | |
# | |
# On [SALT MASTER], do the following: | |
# | |
# # salt-key -L | |
# # salt-key -a <VPS NAME> | |
# # salt <VPS NAME> state.highstate | |
set -e | |
apt-get update | |
apt-get install -y python-{jinja2,m2crypto,crypto,yaml,zmq,virtualenv} msgpack-python | |
virtualenv --distribute --system-site-packages --prompt "(salt)" /opt/salt/venv | |
USE_SETUPTOOLS=1 /opt/salt/venv/bin/pip install salt | |
mkdir -p /etc/salt | |
echo "master: 10.10.10.100" >/etc/salt/minion | |
/opt/salt/venv/bin/salt-minion -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment