Monday, July 9, 2012

Deploying Salt, part 1

I've been meaning to deploy puppet or chef or something similar for some time. You know how things get, work gets busy, long commutes eat your soul and you don't have the head space to tinker much when you get home. Although on the last few week ends I have managed to get some quality time working on the ute (read mobile HAM radio platform).

So yesterday after getting that feeling that I've had enough ssh'ing to every server to install a package, I decided that it was indeed time to automate that kind of thing.

I first heard about salt at Linux.Conf.Au in Ballarat this year. A podcast was recommended to me about it. I have had at least two separate attempts to install it at home and one at work. As Salt and its dependencies are not in the Debian repo, it was install from source time. Well yesterday I twigged to the reason why the builds failed. You don't install the dependencies from the repos, you use the release tarballs. One of the dependencies relies of cython in the development repo and completely fails to build.

So here is the simplest install for Salt on Debian/Squeeze (note custom install destination);

apt-get install python-yaml cython python-m2crypto python-pycryptopp python2.6-dev
apt-get install libssl-dev swig python-sip-dev python-sip cableswig
cd /usr/src/

wget http://download.zeromq.org/zeromq-2.2.0.tar.gz
tar -xzvf zeromq-2.2.0.tar.gz
cd zeromq-2.2.0/
./configure --prefix=/usr/local/zeromq
make
make install
cd ..

wget https://github.com/zeromq/pyzmq/downloads/pyzmq-2.2.0.tar.gz
tar -xzvf pyzmq-2.2.0.tar.gz
cd pyzmq-2.2.0/
python setup.py configure --zmq=/usr/local/zeromq/
python setup.py build
python setup.py install
cd ..

wget http://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.tar.gz
tar -xzvf pycrypto-2.6.tar.gz
cd pycrypto-2.6/
./configure --prefix=/usr/local/pycrypto/
python setup.py build
python setup.py install
cd ..

wget https://github.com/thatch45/salt/tarball/master
mv master salt.tar.gz
tar -xzvf salt.tar.gz
cd thatch45-salt-*/
python setup.py build
python setup.py install
cd ..

There may be more dependencies I have inadvertantly installed for other projects, so as always YMMV there. I have started to configure salt, however that will require its own post...

No comments:

Post a Comment