Skip to content
Graham Gilbert edited this page Jun 15, 2020 · 14 revisions

Getting Started with Sal

The simplest way to get started with a demonstration setup is to use Docker and Docker for Mac. You only need to follow the first part of the getting started guide to get to a point where you can use Sal. Note: For a production setup, it is recommended that you do not use macOS as your host OS or run Postgres in Docker. The following should be used for demonstration purposes only. The maintainers suggest whatever Linux you are happiest with for the host OS and running an external database, either hosted such as RDS or run on your own infrastructure.

Starting Sal

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

First we need to set up the database:

$ 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:latest

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:latest

You will now be able to log into your brand new Sal installation with the username of admin and the password of pass. Sal will now be available at localhost.

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.
NOTE: If you are using version 4.x.x of Sal server, you need to use at least version 3.x.x of the Sal scripts in order for your client to properly send data to the server.

Additional checkin modules may be added to include data from your configuration management tool or other data source. Check out the salopensource organization for some of these.

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.

Clone this wiki locally