Munki 2: Upgrading Your Munki Repo Content

Hi all. Welcome to the fourth part in my Munki 2 blogs: The on-going guide to get Munki newbies up and running with a basic setup to cut your teeth on!
This blog is designed as an add on to the earlier articles enabling you to take your plain default Munki 1 content and snazz it up to the Munki 2 standard!
My Demo Setup
Just for clarification, my demo setup for these instructions and screenshots is as follows:
Server and Client OS: OS X Yosemite 10.10.1
Server app: 4.0.3
Munki Tools: 2.2
Setting the scene…
So you’ve carried out all of the upgrades and got everything to work, but your repo is looking a little like this:
munki 2 repo setup
And your end users are seeing something like this:
managed software centre munki 2
Kinda sucks right? We can do better than this.
First up…Icons
Let’s start on getting some icons added and working. Well, would you know it, Greg has gifted us another command line too to run to automate this: Iconimporter.
1) Grab a copy from the Munki GitHub page and put it into the directory /usr/local/munki on your administration Mac.
2) Now run this, pointing the tool at your Munki Repo:

/usr/local/munki/iconimporter [path to your munki repo]

munki repo command
3) The tool should now go through all items in your repo, dig out the icons where possible, upload this into the correct directory (./munki_repo/icons/) and configure the pkgsinfo files to use it.
munki repo icons
4) Now what you may notice is that sometimes it finds more than 1 icon you could use. In this event, you’ll need to manually go into the icons directory, chose one of the icons and remove the “_[x]” off the end of the filename.
For Example: I want to use the second Python icon for the Python item. I will rename ./icons/Python_2.png to ./icons/Python.png and Munki will use this.
Now, without bothering to go through and do this for all the installers, my repo immediately looked prettier!
prettier munki repo
And prettier means, much more end-user friendly!
user friendly munki repo
Don’t forget to check out the full documentation for all of the information.
Categories and Developers
Now we’ve added the pretty pictures, how about some organisation? Let’s set a Category and Developer for each item.
I’m afraid at the moment that this is a manual task entailing opening each relevant pkgsinfo file on your repo (./munki_repo/pkgsinfo/) in a plain text editor and adding the values for these items. For example, let’s use the Firefox pkgsinfo file.
firefox pkgsinfo munki 2
firefox pkhsinfo munki after
Don’t forget to run a makecatalogs once you’ve finished:


Editing XML files…I’m not so sure about that
I understand that some people might feel that editing an XML file might be too open to mistakes, and that’s a fair point to make. For these people, I’d recommend two things:
1) Always backup the file before you make your edits. Do not delete this backup until you have confirmed your changes work fine.
2) Why not Zoidberg Munki Admin?
editing xml files munki 2 meme
As I’ve stated in a previous post, Munki Admin can easily set the Developer and Category with a nice GUI interface.
Even better? These values can be set by dragging the item (or items!) to the relevant sections on the left hand side!
munki admin packages
And that’s it, configuring and upgrading to Munki 2 for beginners! How’s that? Got a taste for more Munki? I’d highly recommend four places to go next:
1) Attend the Munki 101 course
2) Munki Wiki / Documentation
3) Munki-Dev Google Group
4) The ##osx-server irc channel
As always, if you have any questions, queries or comments, let us know below and I’ll try to respond to and delve into as many as I can.
While the author has taken care to provide our readers with accurate information, please use your discretion before acting upon information based on the blog post. Amsys will not compensate you in any way whatsoever if you ever happen to suffer a loss/inconvenience/damage because of/while making use of information in this blog.