Munki setup notes

These are the notes I took when I was getting started with Munki. This process gets a web server setup which will host the packages and assorted definition files, and get an admin station up and running with some configs for simple drag-n-drop style app installs. See Munki’s Google Code project wiki for more details and advanced topics.

Server Side

  1. Create DNS entries for “munki” on your LAN’s domain that point to the web server
    • example: munki.lan.domain.tld
  2. Create virtual host for “munki”
    • point to path such as /var/www/munki.lan.domain.tld
  3. Create folder structure
    • /var/www/munki.lan.domain.tld/repo
    • /var/www/munki.lan.domain.tld/repo/pkgs
    • /var/www/munki.lan.domain.tld/repo/pkgsinfo
    • /var/www/munki.lan.domain.tld/repo/catalogs
    • /var/www/munki.lan.domain.tld/repo/manifests
  4. Share the repo directory out via WebDAV, NFS, etc to the admin workstations

Admin Workstation

  1. Install munki tools
  2. Mount the repo dir from the server
  3. Upload software to repo/pkgs
    • software must be either a (M)PKG or a DMG
    • munkiimport can be used to automate chunks of this process
      1. Download the software you want from the Internet
      2. Mount the DMG containing the app if necessary
      3. munkiimport —configure (only need to do this once)
        • follow the white rabbit
      4. munkiimport /Volumes/Disk Image Name/
        • follow the rabbit again
      5. Skip to step 6 below
  4. Create pkginfo for each PKG in repo/pkgsinfo
    • these are info files which contain metadata related to the software
    • can be created with the makepkginfo utility
      • makepkginfo —help
      • example: makepkginfo --file /Applications/ --appname --displayname VLCMediaPlayer --destinationpath /Applications --catalog testing --catalog production --owner adminuser /Volumes/repo/pkgs/vlc-1.1.12-intel64.dmg > /Volumes/repo/pkgsinfo/vlc.plist
        • Where to look to determine if software is already installed
        • Location of the source software in a DMG
        • The software will be referenced as VLCMediaPlayer in the rest of the Munki system
        • Where Munki should install the software if needed
        • Adds VLCMediaPlayer to the testing and production catalogs
  5. Create Catalogs in repo/catalogs
    • Catalogs define groups of PKGs
      • Think “testing”, “production”, etc
    • example: makecatalogs /Volumes/repo
      • scans the plists in the pkgsinfo folder and creates catalog files for each group
  6. Create manifests
    • Manifests define which catalogs and software each end-user workstation gets
    • When an end-user workstation checks in, it will look for its manifest in the below order
      1. a manifest name that matches its FQDN
      2. a manifest name that matches its hostname
      3. a manifest named “site_default”

End-user Workstation

  1. install munki client software
  2. run the Managed Software Updater
    • /Applications/Utilities/Managed Software Update
    • managedsoftwareupdate —help