Home

Awesome

MunkiCatalogPromote

Promotes pkginfo files from development to testing to production after a certain number of days

Rationale

If you have a lot of Munki items to move through a development-testing-production process, it can be cumbersome to go into each pkginfo and add a new catalog to the pkginfo, even if you're doing it through a GUI like MunkiAdmin. MunkiCatalogPromote allows you to bulk-promote all your pkginfo files after a certain number of days.

There are actually a bunch of catalog promotion scripts for Munki. Ed Ravin has compiled a fairly comprehensive list on the Munki Dev mailing list.

I wanted to create something simple for what I want, which is just to move every pkginfo through after a certain number of days. I also wanted to practice some more Python, so this script was a good excuse to do so. If this script doesn't do what you want to do, definitely check out any of the other automated options from Ed Ravin's list.

How to use MunkiCatalogPromote

General Instructions

Example of configuration/installation via command line

Edit the downloaded file

nano ~/Downloads/MunkiCatalogPromote-master/MunkiCatalogPromote.py

Create the directory

sudo mkdir /usr/local/mcp/

Move the files

sudo mv ~/Downloads/MunkiCatalogPromote-master/* /usr/local/mcp/

Change permissions and ownership

sudo chown -R root:wheel /usr/local/mcp
sudo chmod -R 755 /usr/local/mcp

Acknowledgements

Some of the code is lifted/tweaked from autopromoter, some from outset, and some from munki.