Created
May 24, 2016 04:41
-
-
Save blaketmiller/31bfb713fadddab126f71af1ac3e47c5 to your computer and use it in GitHub Desktop.
Install SaltStack
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
PY_VER=2.7.11 | |
# make some directories | |
mkdir -p $HOME/usr $HOME/src $HOME/srv/salt $HOME/etc/salt/minion.d $HOME/etc/salt/master.d | |
# download requirements | |
curl https://www.python.org/ftp/python/$PY_VER/Python-$PY_VER.tgz -o $HOME/src/Python-$PY_VER.tgz | |
curl https://bootstrap.pypa.io/get-pip.py -o $HOME/src/get-pip.py | |
# extract tarball | |
tar zxf $HOME/src/Python-$PY_VER.tgz -C $HOME/src | |
# install python | |
cd $HOME/src/Python-$PY_VER | |
./configure --prefix=$HOME/usr | |
make | |
make install | |
cd - | |
# add locally installed software to search path | |
PATH=$HOME/usr/bin:$PATH | |
echo "PATH=$HOME/usr/bin:$PATH" >> $HOME/.bash_profile | |
source $HOME/.bash_profile | |
# install pip | |
python $HOME/src/get-pip.py | |
# install salt prereqs | |
pip install pyzmq pyyaml pycrypto msgpack-python jinja2 psutil | |
pip install gitpython | |
pip install requests backports.ssl-match-hostname six singledispatch certifi backports-abc tornado futures | |
# install salt | |
pip install --global-option="--salt-root-dir=$HOME" salt | |
# configure salt for non-root | |
echo -e "user: $(whoami)\nroot_dir: $HOME" > $HOME/etc/salt/master | |
echo -e "user: $(whoami)\nroot_dir: $HOME\nmaster: localhost" > $HOME/etc/salt/minion | |
# cleanup | |
rm -rf $HOME/src | |
# start daemons | |
salt-master -d | |
salt-minion -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment