Why you should use AutoPkg to populate and keep up to date your Munki repo

So far, all we’ve done is import Firefox into your Munki repo. Your Munki repo is a bit bare. It would probably take a long time to import every single piece of software you want to deploy to your Mac fleet using munkiimport every time. Fortunately, there is a project that helps you automate importing new versions of software into your repo: AutoPkg.

There are other advantages to using AutoPkg instead of manually using munkiimport for every single item you want to add to your Munki repo.

First of all, with AutoPkg, you’re far less likely to run into the Munki successfully installed some software, but now each time Munki runs, it wants to install the software again. Why is this? issue a lot of new Munki admins hit at one point or another.

You really should have a good read of How Munki Decides What Needs To Be Installed, which really is an important piece of understanding how Munki works, especially since there isn’t an AutoPkg recipe for every possible thing you might want to import into your Munki repo. Vendors who package installers badly make it difficult for Munki to auto-detect how it should be determined to be installed or not, so you may sometimes have to create an installs array or installcheck_script to compensate for the bad packaging.

AutoPkg basically automates a lot of manual processes. How it pertains to Munki would specifically be the manual process of checking to see if there’s a new version of software, downloading that new version, importing it into the Munki repo, and then potentially editing the pkginfo for the item so that Munki won’t get into an install loop if the vendor packaged the installer badly.

Another handy thing AutoPkg can do is actually help you update Munki for your clients. Yes, you can manually download the latest Munki tools package, import it using munkiimport, and make sure it’s added to the relevant manifests your clients use, but then your clients will have to restart every time you update Munki. With AutoPkg, there’s a munkitools6-signed.munki.recipe recipe that downloads the Munki tools package, unpacks the package into individual components, and then imports each component separately. That way, unless the actual launchd part of Munki changes, your client machines won’t have to reboot.

That’s why you should use AutoPkg. Next time, we’ll go into the actual steps to set up and use AutoPkg.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *