How to install SaltStack on FreeBSD
SaltStack is one of the many system and configuration management solutions which is available for FreeBSD. It is used at SoCruel.NU for both implementation and management! The basics of SaltStack on FreeBSD are discussed in this blog post.
Requirements
The following requirements have to be in place to be able to implement what is described in this post:
- an up to date FreeBSD version 11.x
- a connection to the internet with access to a public caching name server or
- a connection to a local caching name server which has access to a public root or caching name server
- a basic understanding of what SaltStack is and how it works. For more on these please read SaltStack Get Started
Where to find the software
The SaltStack software is in the FreeBSD Ports tree:
This software covers both the SaltStack client (called the minion) and the SaltStack master server.
Installation
To install SaltStack run:
# pkg install py27-salt
The configuration decides if this installation becomes a Salt master or a Salt minion or both.
What did we install?
The Saltstack software installation also installs some other packages. See the Makefile in SaltStack in FreeBSD Ports for more details.
If we look at the filesystem and do a find on salt we find:
# find / -name salt /usr/local/etc/salt /usr/local/lib/python2.7/site-packages/salt /usr/local/bin/salt /var/log/salt /var/cache/salt /var/run/salt
What does this all mean?
/usr/local/etc/saltis the directory for the Salt configuration/usr/local/lib/python2.7/site-packages/saltis the directory which stores Salt runners, modules and states./usr/local/bin/saltis the main Salt binary file/var/log/saltis the Salt log directory/var/cache/saltis the Salt cache directory/var/run/saltis the Salt socket directory
Besides /usr/local/bin/salt some other Salt executables are installed in the /usr/local/bin directory:
# cd /usr/local/bin # ls -l salt* 4K -rwxr-xr-x 1 root wheel 387 Mar 25 03:18 salt 4K -rwxr-xr-x 1 root wheel 395 Mar 25 03:18 salt-api 4K -rwxr-xr-x 1 root wheel 397 Mar 25 03:18 salt-call 4K -rwxr-xr-x 1 root wheel 399 Mar 25 03:18 salt-cloud 4K -rwxr-xr-x 1 root wheel 393 Mar 25 03:18 salt-cp 4K -rwxr-xr-x 1 root wheel 395 Mar 25 03:18 salt-key 4K -rwxr-xr-x 1 root wheel 401 Mar 25 03:18 salt-master 4K -rwxr-xr-x 1 root wheel 401 Mar 25 03:18 salt-minion 4K -rwxr-xr-x 1 root wheel 971 Mar 25 03:17 salt-proxy 4K -rwxr-xr-x 1 root wheel 395 Mar 25 03:18 salt-run 4K -rwxr-xr-x 1 root wheel 395 Mar 25 03:18 salt-ssh 4K -rwxr-xr-x 1 root wheel 401 Mar 25 03:18 salt-syndic 4K -rwxr-xr-x 1 root wheel 399 Mar 25 03:18 salt-unity
More to come
These are just the basics of Salt on FreeBSD. More posts on the subject Salt will follow! Until next time.
Resources
Some (other) resources about this subject: