Skip to content
Graham Gilbert edited this page Dec 12, 2015 · 11 revisions

Getting Started with Sal

Sal is a highly customizable and extensible reporting solution for Munki. The simplest way to get started with a demonstration setup is to use Docker and the Docker Toolbox. You only need to follow the first part of the getting started guide to get to a point where you can use Sal.

Starting Sal

In the below commands, replace USERNAME with your username / home directory.

First we need to set up the database:

$ docker pull grahamgilbert/postgres
$ docker run -d --name="postgres-sal" \
  -v /Users/USERNAME/sal/db:/var/lib/postgresql/data \
  -e DB_NAME=sal \
  -e DB_USER=admin \
  -e DB_PASS=password \
  --restart="always" \
  grahamgilbert/postgres

And now we need to set up Sal itself:

$ docker run -d --name="sal" \
  -p 80:8000 \
  --link postgres-sal:db \
  -v /Users/USERNAME/sal/plugins:/home/docker/sal/plugins \
  -e ADMIN_PASS=pass \
  -e DB_NAME=sal \
  -e DB_USER=admin \
  -e DB_PASS=password \
  --restart="always" \
  macadmins/sal:2.3.1.1

You will now be able to log into your brand new Sal installation with the username of admin and the password of pass. If you need to get the IP address of your Docker virtual machine, run the following in your terminal:

$ docker-machine ip

Client Configuration

Business Units and Machine Groups

Sal has the concept of Business Units - these are a way of dividing your Macs at a high level - they might be departments or faculties if you are a school, or offices if you are a business.

Sal also has Machine Groups. These are nested under Business Units and they contain machines, which makes the hierarchy of Sal the following:

Business Unit -> Machine Group -> Machine

Go ahead and make a Business Unit and a Machine Group underneath it. You'll see a key when you go to the Machine Group page. It is this key that allows a Mac to identify itself to be part of a Machine Group.

Client setup

At a minimum, you need to install the latest version of the Sal Scripts. It is also highly recommended, but not required that you install either the standalone Facter, or the new (much faster) all in one package (choose the directory that matches your OS version) that contains both Puppet and Facter. Facter is an open source tool from Puppet Labs that provides lots of information (facts) about your fleet - you do not have to use Puppet to make use of it.

You also need to tell your client both where your server is, and which Machine Group it is part of (via it's key):

$ defaults write /Library/Preferences/com.github.salopensource.sal ServerURL http://sal.somewhere.com``

$ defaults write /Library/Preferences/com.github.salopensource.sal key yourreallyreallyreallyreallylongkey

That's it!

You're all done - you can run Munki and you should see your client's info pouring in.

Note on using the all in one Puppet Agent package without Puppet

If you do not use Puppet and choose to install the new all in one package, you will most likely want to delete the launchdaemons that it installs (a postinstall script in Munki would be ideal):

rm /Library/LaunchDaemons/com.puppetlabs.mcollective.plist
rm /Library/LaunchDaemons/com.puppetlabs.puppet.plist
rm /Library/LaunchDaemons/com.puppetlabs.pxp-agent.plist
Clone this wiki locally