A few days ago, I was prompted to publicly release a project that I’ve used internally to add a bit of Munki-awareness to my DeployStudio workflows. So, once I caught my breath at work, I added the Munki Manifest Selector project to github. Since the documentation is severely lacking, I thought I might post something a little less README-ish in hopes of helping folks along with the installation process.
But first, a few words. Munki Manifest Selector is an OS X application, but was designed specifically for use within DeployStudio. So if you double-click it, it’s going to close immediately because it didn’t find the command line arguments it needs to do its job. Also, the app was built using the 10.7 SDK and as such your DeployStudio runtime environment must be 10.7 or higher.
- Download: https://dl.dropbox.com/u/12228667/Linked%20Files/Munki%20Manifest%20Selector.dmg
- Copy the app and script into ‘Scripts’ in your DeployStudio repository
- Right click the app bundle to show its contents, then edit Contents/Info.plist and change Manifests URL to something like http://example.com/munki_repo/Manifests.plist
That’s pretty much it. To use the app within a DeployStudio workflow, you just include a ‘Generic’ script task and point it to launch-munki-manifest-selector.sh. That script will launch the app with some default options specified. You can edit this script to include some default options (defined below). The only required option is targetVolume which is used by the app to know where it should write the resulting ManagedInstalls.plist file.
Populating the Manifests Popup Menu
The content of the manifest popup menu comes from a plist that you’ll need to create, probably on your Munki sever since you’ve already got that up and running. The contents are pretty simple. Here’s an example:
<!--?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>ManifestGroups</key> <array> <string>Groups/FacultyStaff</string> </array> </dict> <plist>
In the above example, if the user selects “Groups/FacultyStaff”, the value that will be written to <targetVolume>/Library/Preferences/ManagedInstalls.plist‘s ClientIdentifier key will be “Groups/FacultyStaff/__FacultyStaffTemplate“. In my setup, I use this __*Template file as a ‘master’ file for all the machine-specific manifests within that group. This way I can control what apps are delivered to all the machines in the group (by editing the __*Template file) or for a specific machine’s manifest which has the __*Template manifest listed in its included_manifests array.
By specifying any of the capitalized arguments, you’re specifying a default value for the user interface. For example, passing –InstallAppleUpdates on the command line will tick the corresponding box when the app launches. –enableMunkiBootstrapMode is the exception here since it is not capitalized but does have an effect on the state of the UI. See the included launch-munki-manifest-selector.sh for an example of how to launch the app.
- This should not be a number of days like Munki expects, but rather a value that matches one available in the UI, such as “Hourly” (0), “Daily” (1), “Weekly” (7), “Monthly” (30)
- Example: “/Volumes/Macintosh HD”