Running a masterless salt-minion lets you use salt's configuration management for a single machine. It is also useful for testing out state trees before deploying to a production setup.
The only real difference in using a standalone minion is that instead of issuing commands with salt, we use the salt-call command, like this:
salt-call --local state.highstate
First we need to install the salt minion. The salt-bootstrap script makes this incredibly easy for any OS with a Bourne shell. You can use it like this:
wget -O - http://bootstrap.saltstack.org | sudo sh
Or see the salt-bootstrap documentation for other one liners. Additionally, if you are using Vagrant to test out salt, the salty-vagrant tool will provision the VM for you.
Now we build an example state tree. This is where the configuration is defined. For more in depth directions, see the tutorial.
1. Create the top.sls file
# /srv/salt/top.sls
base:
'*':
- webserver
2. Create our webserver state tree
# /srv/salt/webserver.sls
apache: # ID declaration
pkg: # state declaration
- installed # function declaration
The only thing left is to provision our minion using the highstate command. Salt-call also gives us an easy way to give us verbose output:
salt-call --local state.highstate -l debug
The --local flag tells the salt-minion to look for the state tree in the local file system. Normally the minion copies the state tree from the master and executes it from there.
That's it, good luck!