Hi folks,
Thought I would share one of the ways I am using Munki.
Rather than any initial image based deployment I am deploying with Munki directly on-top of a raw 10.6 - either as reinstalled or as delivered by Apple. If an install can be made to work with InstaDMG it can also be made to work by installing the packages directly with Munki.
The process is summarised thus:
- install munki, munki configuration & bootstrapping packages on the target machine in an offline mode (so we can modify the computer before it insists on running the setup wizard)
- touch /Users/Shared/.com.googlecode.munki.checkandinstallatstartup on the target volume
- reboot and wait for the 3 reboots or so for munki to install applications & Apple updates.
- once complete the computer is in the same state as all other managed machines.
In detail:
* new computer, prior to booting, placed into target disk mode and connected to a suitable Mac to install the bootstrapping packages.
* packages installed on the target (all can be bundled into a single .mpkg):
- createUser.pkg installs a central admin account
- clearReg.pkg prevents the welcome wizard running on first boot of the target
- FirstBoot.pkg
installs a script to set the timezone on first boot of the target & anything else that needs to be done immediately on first boot.
- munkiSettings.pkg installs:
/Library/Preferences/ManagedInstalls.plist
/Library/Managed Installs/certs (both client & server.pem)
touches: /Users/Shared/.com.googlecode.munki.checkandinstallatstartup
- munki.pkg the standard munki package (however with the reboot required flag removed)
* eject the target & reboot it
* munki runs and installs the latest applications
* munki reboots the computer (currently ensure you have a reboot required package in the list of installs, I currently install a payload and script free package called 'Reboot')
* munki runs and installs the first round of Apple updates (perhaps a combo updater)
* munki reboots
* munki runs and installs a second round of Apple updates (latest Java, iTunes, etc)
* may reboot
* The computer is finished when idle at the login screen for more than 20 seconds.
* All is installed by Munki & Munki will now keep the computer updated as well.
Rationale:
* we have a relatively small fleet, < 200 Macs. This method is a little slower than imaging methods in absolute time, however requires no additional time spent by the computer support person deploying the computer (automatic). It leverages the work already required to keep a computer up to date, thus there is no additional work required to maintain an initial deployment technique.
* this method is unfussed that Apple has released new hardware not yet supported by the previous 10.x.x updater. It just installs our stuff on-top of Apple's stuff and ensures it is all up-to-date.
Utility packages:
createUser.pkg (offline creation of a user account 10.4/10.5/10.6 - contained password is stored in one-way hash format)
clearReg.pkg (prevents the welcome wizard running at first boot)
FirstBoot scripts:
** /Library/LaunchDaemons/au.org.centenary.FirstBoot.plist (run once at boot)
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>Label</key>
<string>au.org.centenary.FirstBoot.plist</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Application Support/CENTENARY/FirstBoot.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
** /Library/Application Support/CENTENARY/FirstBoot.sh (do some things as root, perhaps ordinarily done by the setup wizard, then delete the LaunchDaemon entry, then delete itself)
#!/bin/bash
# Set TimeZone while booted.
/usr/sbin/systemsetup -settimezone Australia/Sydney
/usr/sbin/systemsetup -setusingnetworktime on
rm /Library/LaunchDaemons/au.org.centenary.FirstBoot.plist
sleep 15
# No longer any need for this initial run script.
# use srm instead of rm if this script is sensitive
rm "$0"
exit 0
Regards,
Rob Middleton.
IT Systems Administrator
Centenary Institute
Sydney, Australia.