Hi again, and welcome to the first instructional blog in this Munki series. In this blog I will show you how I configure a Munki Repository server (aka ‘Munki Server’). This is part one of three parts required to setup the Munki solution in its most basic form.
Some notes for this series:
- These instructions have been written for our internal teams and for our typical installations.. Tweaks may be required to fit your exact setup.
- The server used in these examples is Mac OS X Server 10.8.4
- The server uses Mac Server App version 2.2.1.
- The server has been configured with a boot drive called “ServerHD” and a data drive called “DataHD” for the services data.
- The clients used in these examples are Mac OS X 10.8.4, although the instructions have been tested on Mac OS X 10.8.2+.
- Munki is provided free of charge under the Open Source license. Although free, your mileage may vary, so test any solutions heavily before rolling them out as ‘live’.
Additional information can be found on the Munki site.
Munki Server Requirements
Being a Mac consultant you would be right to assume that this guide is written for creating and using a Munki Server based on Mac OS X Server. However the requirements are fairly open with almost any web server being able to fill the role with some people reporting success with a NAS box!
The Munki Server, in its ‘normal’ configuration, is simply used to provide a file system on a web server for the clients to access.
You have your Mac Server installed and configured with 10.8.4 and Server app 2.2.1. This has both forward and reverse lookups configured and working fine. If you are going to use Apple’s Profile Manager, I’d recommend the server service side of things is also configured before carrying out these steps.
Enable the service and create the folder structure
- Enable the “Websites” service at default settings, using the Server app.
- Check the service is working by clicking the “View Server Website” option below the “Websites” table. If you see a “Welcome to Server” page then all is good.
- Once this is working fine, quit both Safari and Server app. Launch the Terminal application.
- Navigate to the Service data storage location.
- Create a folder to store the Munki data in.
- Navigate into this new directory.
- Create the top level directory called “munki_repo”.
- Navigate into this new directory.
- Create the following directories inside the “munki_repo” directory:
mkdir "catalogs" mkdir "manifests" mkdir "pkgs" mkdir "pkgsinfo"
- Set the correct permissions on these directories (a+rX).
Link the Munki Repository with the Web Service
- Leave Terminal open. Relaunch the Server.app and navigate back to the “Websites” service.
- Double click the default “Server Website” item to edit these settings.
- Click the arrow next to the “Store Site Files In: Default” Box. Make a note of where this default store is. By default, this will be “/Library/Server/Web/Data/Sites/Default/” (colour coded for later use).
- Use Terminal to create a symlink called “munki_repo” in the default websites directory, pointing to your “munki_repo” directory created in step 7. For your site, change the section in red to match the location of your munki_repo and the section in blue to match your web site directory.
Please Note: This command is on one line.
sudo ln –s /Volumes/DataHD/Munki/munki_repo
This step allows us to store the Munki Repository off the Server boot drive (best practice) but still use the default Web Server location, simplifying the installation.
- Close any open Finder and Terminal windows and switch back to the Server App.
- Click the “Edit Advanced Settings…” button.
- Select the tick box called “Allow Folder Listing” and click “OK”. Click “Done” on the “Server Website” screen.
- Launch Safari and navigate to “127.0.0.1/munki_repo”.
- If you see the folder listing created in step 9 then your Munki Server is fully configured. Repeat steps 16 and 17 to disable the folder listing for security purposes.If you do not see the folder structure then repeat the steps. It’s likely your symlink might be incorrect, or you’ve not closed the Website settings (and so the changes haven’t been applied).
There you go. Your Munki Repository Server should be configured ready for some clients. Next time, we jump into configuring a Munki Admin machine (the Darren method), for adding installers to your Munki Repo.
Any hints, tips or opinions? Let us know in the comments below, it would be great to hear your feedback!
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.