(Warning - this is a long one!)
Hello all,
I've been trying to figure out an easier method for deploying Mountain Lion to end users without a full re-image, especially to Lion users who have been re-imaged in the last year. Having to backup and reconfigure end users is a real pain and inconvenience, and with Apple now releasing yearly OS updated, I really felt a need to come up with a method of just upgrading, rather than re-imaging, computers that were in healthy condition. This post is a kind of "thinking on paper" to see if my ideas are in agreement with what other Casper customers are doing, and perhaps help other Casper users that are trying to accomplish the same thing I am, but are stuck.
I initially referenced the Knowledge Base Article that is located here for deploying Lion and Mountain Lion:
https://jamfnation.jamfsoftware.com/article.html?id=173
What was the most intriguing in that article was scenario 2, but I didn't want to deal with a NetInstall, especially since I have network locations where the NetBoot service is unavailable. In addition, I've heard the NetInstall upgrade process sometimes causes some issues with the jamf client and the service accounts that are installed on the computers, leaving some clients in a semi-manageable state.
After doing some additional research, I found the Greg Neagle's "createOSXinstallPkg" would fit my needs for this project. The tool is located here: http://managingosx.wordpress.com/2012/07/25/son-of-installlion-pkg/. Kudos to Greg for developing and releasing this tool for the rest of us to use. If you're not familiar with it, this tool takes the OS X installer from the Mac App Store and turns it into a package that at next reboot will kick off the installation of Lion or Mountain Lion, similar to the process that occurs when using the Mac App Store installer. In addition, you can use the tool to add small simple packages that are installed along with OS X.
The drawback of the OS X Installer is that many packages, including the Casper Quick Add package generated from Recon, cannot be installed as part of the process, due to the limited amount of command line tools available in the installer environment. To get around this, rather than try to have the generated OS X Installer from the createOSXinstallPKG tool try to install the Quick Add package directly, I just had copy it to a directory so that it's on the upgraded computer, and wrote a shell script and a launchd daemon that will run at boot time that installs the Quick Add package. The script that is executed by the launchd job then deletes the launchd task at completion, effectively making it a "first boot" only task.
I uploaded the package generated from the createOSXinstallPkg tool into Casper Admin. I then created a self-service policy that Installs this package. At the end of the self-service policy, a simple script runs that executes the command 'shutdown -r now' to reboot the computer to whichever partition the OS X installer has 'blessed' for the installation process to complete. Once the OS X installation is completed, the system reboots, runs the quickadd.sh script that I've set to run with launchd, and installs the QuickAdd.pkg. The quickadd script also runs some jamf commands after the QuickAdd package finishes before it deletes the launchd task, and then itself. These commands include:
- Re-enroll the computer
- Flush policy history
- Run any 'new' policies
- Install all cached software packages, and Apple software updates
- Refresh MCX
- Execute a policy, via a policy trigger, that installs some specific customization packages specifically for Mountain Lion computers, that would normally be installed during imaging.
- Repair permissions, flush caches.
- Update inventory.
- Reboot immediately.
So far, the results have been pretty good. After about 45 minutes, I get a fully upgraded and patched Mountain Lion system, with no re-image required. I'm not sure if this ever would be something that I would allow end-users to do on their own from Self Service, but it is very helpful for our Help Desk to just have the end users drop off their laptops, and come back an hour later with it fully upgraded, with no other hassles. I imagine I'll duplicate this policy with one that just executes with a policy trigger so that it can be executed outside of Self Service from the command line.
I'd be glad to share more details if anyone is interested in this type of workflow. My question to the nation, is, am I going in the right direction with this, and, are there others out there with similar workflows for upgrading Macs in place without a re-image? Is there too much risk in reducing computer reliability by not doing a full re-image for an operating system upgrade? The IT part of me that has been deploying Macs and Windows computers for almost 15 years says "always re-image", but the prospect of re-imaging every year to keep people current makes me want to have this type of solution available.
Your thoughts?
Thanks,
~Ted