Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Install SaltStack
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