Share
Embed
Munki Presentation
A quick intro to Munki and a talk about how it's used at OneHealth to bring DevOps-ish attitudes to the IT world.
Taylor Price
April 16, 2014
Transcript
66 slides
-
managing os x client machines with munki San Diego DevOps
Meeting! April 16, 2014 1 Welcome to the meeting. -
2 Differences between munki and ‘configuration management’ like chef. Set
it and forget it - munki sets it’s clients to a certain state, and then leaves them be, where chef runs on a regular basis to enforce things. Apple software updates can come from Apple directly, or they can come from a local cache (reposado/apple sus). Common software deployment (mostly .apps, but .pkgs are common as well). -
2 what is munki? Differences between munki and ‘configuration management’
like chef. Set it and forget it - munki sets it’s clients to a certain state, and then leaves them be, where chef runs on a regular basis to enforce things. Apple software updates can come from Apple directly, or they can come from a local cache (reposado/apple sus). Common software deployment (mostly .apps, but .pkgs are common as well). -
2 what is munki? Munki is a set of tools
that can be used to manage software installs (and removals) on OS X client machines. Differences between munki and ‘configuration management’ like chef. Set it and forget it - munki sets it’s clients to a certain state, and then leaves them be, where chef runs on a regular basis to enforce things. Apple software updates can come from Apple directly, or they can come from a local cache (reposado/apple sus). Common software deployment (mostly .apps, but .pkgs are common as well). -
2 what is munki? Munki is a set of tools
that can be used to manage software installs (and removals) on OS X client machines. It can handle the Apple package format, Adobe Enterprise Deployment "packages", and drag-and-drop disk images as installer sources. Differences between munki and ‘configuration management’ like chef. Set it and forget it - munki sets it’s clients to a certain state, and then leaves them be, where chef runs on a regular basis to enforce things. Apple software updates can come from Apple directly, or they can come from a local cache (reposado/apple sus). Common software deployment (mostly .apps, but .pkgs are common as well). -
2 what is munki? Munki is a set of tools
that can be used to manage software installs (and removals) on OS X client machines. It can handle the Apple package format, Adobe Enterprise Deployment "packages", and drag-and-drop disk images as installer sources. It can also be configured to serve Apple Software Updates - either from Apple’s server or your own. Differences between munki and ‘configuration management’ like chef. Set it and forget it - munki sets it’s clients to a certain state, and then leaves them be, where chef runs on a regular basis to enforce things. Apple software updates can come from Apple directly, or they can come from a local cache (reposado/apple sus). Common software deployment (mostly .apps, but .pkgs are common as well). -
2 what is munki? Munki is a set of tools
that can be used to manage software installs (and removals) on OS X client machines. It can handle the Apple package format, Adobe Enterprise Deployment "packages", and drag-and-drop disk images as installer sources. It can also be configured to serve Apple Software Updates - either from Apple’s server or your own. Differences between munki and ‘configuration management’ like chef. Set it and forget it - munki sets it’s clients to a certain state, and then leaves them be, where chef runs on a regular basis to enforce things. Apple software updates can come from Apple directly, or they can come from a local cache (reposado/apple sus). Common software deployment (mostly .apps, but .pkgs are common as well). -
• munkiimport the tools This is the primary tool you
will use to put packages in your munki repository 4 -
• munkiimport • manifestutil the tools This tool is used
to manage your software manifests. 4 -
• munkiimport • manifestutil • makecatologs the tools After adding
new packages, changing existing packages, or pretty much anything, this will update your munki software catologs. 4 -
• munkiimport • manifestutil • makecatologs • managedsoftwareupdate the tools
This runs on the client to check for and install software. 4 -
• munkiimport • manifestutil • makecatologs • managedsoftwareupdate • launchd
the tools The launchd item allows these things to happen on the client machine at scheduled times and without requiring admin. 4 -
managedsoftwareupdate and Managed Software Update.app! managedsoftwareupdate is the commandline version.
It is invoked automatically by launchd, or you (the admin) can run it yourself manually.! Managed Software Update.app is the user friendly GUI version. This can be ran manually, or scheduled to run automatically (again through launchd). 5 -
managedsoftwareupdate and Managed Software Update.app! Managed Software Update.app does not
require administrator privileges, while managedsoftwareupdate does.! ! You can control the frequency of checks. 5 -
munkiimport, manifestutil, makecatalogs 6 Demonstration of adding a package to
a catalog, using manifestutil to add that to a manifest, and using makecatalogs when a change is made to a pkginfo file. -
munkiimport, manifestutil, makecatalogs 6 Live Demo time! Demonstration of adding
a package to a catalog, using manifestutil to add that to a manifest, and using makecatalogs when a change is made to a pkginfo file. -
breakdown of the components 7 • Manifests contain lists of
software of install/uninstall on particular clients. -
breakdown of the components 7 • Manifests contain lists of
software of install/uninstall on particular clients. • Catalogs contain the pkginfo for all the software in the catalog. -
breakdown of the components 7 • Manifests contain lists of
software of install/uninstall on particular clients. • Catalogs contain the pkginfo for all the software in the catalog. • pkginfo contains parameters for the installation/ removal of software. -
install/uninstall types 8 explain the three main types - optional
installs, managed installs, managed uninstalls. -
install/uninstall types • optional_installs 8 explain the three main types
- optional installs, managed installs, managed uninstalls. -
install/uninstall types • optional_installs • managed_installs 8 explain the three
main types - optional installs, managed installs, managed uninstalls. -
install/uninstall types • optional_installs • managed_installs • managed_uninstalls 8 explain
the three main types - optional installs, managed installs, managed uninstalls. -
other types 9 apple software updates (pkginfo type and regular)
update_for requires -
other types • apple software updates 9 apple software updates
(pkginfo type and regular) update_for requires -
other types • apple software updates • update_for 9 apple
software updates (pkginfo type and regular) update_for requires -
other types • apple software updates • update_for • requires
9 apple software updates (pkginfo type and regular) update_for requires -
client configuration 10 munkitools can be broken down into 4
sections (and installed seperately) -munkitools_admin (admin tools, not required for client), munkitools_core, munkitools_app, munkitools_launchd (restart required, not often updated) ! Configure manually via `defaults write` or deploy via a package. -
client configuration • Install munkitools 10 munkitools can be broken
down into 4 sections (and installed seperately) -munkitools_admin (admin tools, not required for client), munkitools_core, munkitools_app, munkitools_launchd (restart required, not often updated) ! Configure manually via `defaults write` or deploy via a package. -
client configuration • Install munkitools • Configure managedinstalls.plist 10 munkitools
can be broken down into 4 sections (and installed seperately) -munkitools_admin (admin tools, not required for client), munkitools_core, munkitools_app, munkitools_launchd (restart required, not often updated) ! Configure manually via `defaults write` or deploy via a package. -
This is where you configure the client.! There are only
two required values-! ClientIdentifier and SoftwareRepoURL managedinstalls.plist 11 /Library/Preferences/ManagedInstalls.plist ClientIdentifier - tells munki what manifest to use SoftwareRepoURL - tells munki client where the server is! Serve apple updates from a local cache! -
managedinstalls.plist There are other values you can configure.! SoftwareUpdateServerURL and
InstallAppleSoftwareUpdates if you want to serve apple updates are the most common. 11 /Library/Preferences/ManagedInstalls.plist ClientIdentifier - tells munki what manifest to use SoftwareRepoURL - tells munki client where the server is! Serve apple updates from a local cache! -
12 bootstrap You can also bootstrap with munki.! Just add:!
/Users/Shared/.com.googlecode.munki.checkandinstallatstartup Bootstrapping will automatically run munki for you until there are no more managed_installs left. -
onehealth 13 This can be ‘new out of box’ or
‘new to the next user’ machines. Out of box machines do not necessarily need to be erased! -
onehealth So how does this work at OneHealth? 13 This
can be ‘new out of box’ or ‘new to the next user’ machines. Out of box machines do not necessarily need to be erased! -
onehealth So how does this work at OneHealth? The workflow
is pretty simple. 13 This can be ‘new out of box’ or ‘new to the next user’ machines. Out of box machines do not necessarily need to be erased! -
onehealth With existing machines - munki + munkibootstrap packages are
installed (ARD, manually, ssh, etc).! Managed installs are automatically in effect, optional installs are in ‘self-service’. 13 This can be ‘new out of box’ or ‘new to the next user’ machines. Out of box machines do not necessarily need to be erased! -
onehealth New machines - AutoDMG built (‘never booted’) image with
an admin user and munki + munkibootstrap preinstalled. This image is deployed (ASR, DeployStudio, NetBoot) and the machine is automatically bootstrapped. 13 This can be ‘new out of box’ or ‘new to the next user’ machines. Out of box machines do not necessarily need to be erased! -
automation 14 But who wants to deal with checking for
updated applications, then using munkiimport to import them, etc? Let’s automate that! AutoPkg + Jenkins for automation! -
automation Just having munki is already a huge step forward
from manually installing packages/updates on each client. 14 But who wants to deal with checking for updated applications, then using munkiimport to import them, etc? Let’s automate that! AutoPkg + Jenkins for automation! -
automation Just having munki is already a huge step forward
from manually installing packages/updates on each client.! But why settle with that? 14 But who wants to deal with checking for updated applications, then using munkiimport to import them, etc? Let’s automate that! AutoPkg + Jenkins for automation! -
automation 14 Enter AutoPkg! But who wants to deal with
checking for updated applications, then using munkiimport to import them, etc? Let’s automate that! AutoPkg + Jenkins for automation! -
automation 14 Enter AutoPkg! Also enter Jenkins! But who wants
to deal with checking for updated applications, then using munkiimport to import them, etc? Let’s automate that! AutoPkg + Jenkins for automation! -
apple updates Reposado + Margarita 15 Gives me branches to
control what updates are approved, munki makes it so my users don’t have to have admin. ! Reposado is a cli tool, margarita is a graphical web frontend. -
Software Update branches (test, release, etc). apple updates 15 No
admin required! Gives me branches to control what updates are approved, munki makes it so my users don’t have to have admin. ! Reposado is a cli tool, margarita is a graphical web frontend. -
from the user perspective 16 MSU.app - Checks for managed_installs/uninstalls
then lets user select optional_installs/uninstalls. ! Everything without a password. ! If a package requires a restart, munki will prompt the user and take care of it. -
from the user perspective Managed Software Update.app - automatic or
user initiated. 16 MSU.app - Checks for managed_installs/uninstalls then lets user select optional_installs/uninstalls. ! Everything without a password. ! If a package requires a restart, munki will prompt the user and take care of it. -
from the user perspective Managed Software Update.app - automatic or
user initiated. No admin prompt. No need to contact IT Support. 16 MSU.app - Checks for managed_installs/uninstalls then lets user select optional_installs/uninstalls. ! Everything without a password. ! If a package requires a restart, munki will prompt the user and take care of it. -
from the user perspective Managed Software Update.app - automatic or
user initiated. No admin prompt. No need to contact IT Support. Munki will restart the computer if needed. 16 MSU.app - Checks for managed_installs/uninstalls then lets user select optional_installs/uninstalls. ! Everything without a password. ! If a package requires a restart, munki will prompt the user and take care of it. -
from admin perspective 17 There’s not much to do at
this point. Approve packages that get added by autopkg, add new software as needed. ! MunkiReport! Show them. -
from admin perspective Approve new versions of apps brought in
by AutoPkg/Jenkins. 17 There’s not much to do at this point. Approve packages that get added by autopkg, add new software as needed. ! MunkiReport! Show them. -
from admin perspective Approve new versions of apps brought in
by AutoPkg/Jenkins. Do nothing. 17 There’s not much to do at this point. Approve packages that get added by autopkg, add new software as needed. ! MunkiReport! Show them. -
from admin perspective Approve new versions of apps brought in
by AutoPkg/Jenkins.! Do nothing.! Occasionally add new software to munki. 17 There’s not much to do at this point. Approve packages that get added by autopkg, add new software as needed. ! MunkiReport! Show them. -
from admin perspective 17 MunkiReport-php! Runs a series of pre-
and postflight scripts and sends them to a server. There’s not much to do at this point. Approve packages that get added by autopkg, add new software as needed. ! MunkiReport! Show them. -
tl;dr Here’s the step-by-step version of our workflow 18 User
specific info includes hostname and user account (non-admin). Even these aren’t done totally manually - osx admin/user script for things that haven’t been put in munki yet. Also. CreateUserpkg for user creation. -
tl;dr Here’s the step-by-step version of our workflow 1. Take
new machine out of box. 18 User specific info includes hostname and user account (non-admin). Even these aren’t done totally manually - osx admin/user script for things that haven’t been put in munki yet. Also. CreateUserpkg for user creation. -
tl;dr Here’s the step-by-step version of our workflow 1. Take
new machine out of box. 2. Bootstrap it with munki, or install thin image with munki configured. 18 User specific info includes hostname and user account (non-admin). Even these aren’t done totally manually - osx admin/user script for things that haven’t been put in munki yet. Also. CreateUserpkg for user creation. -
tl;dr Here’s the step-by-step version of our workflow 1. Take
new machine out of box. 2. Bootstrap it with munki, or install thin image with munki configured. 3. Go do something else while munki runs (30 minutes tops). 18 User specific info includes hostname and user account (non-admin). Even these aren’t done totally manually - osx admin/user script for things that haven’t been put in munki yet. Also. CreateUserpkg for user creation. -
tl;dr Here’s the step-by-step version of our workflow 1. Take
new machine out of box. 2. Bootstrap it with munki, or install thin image with munki configured. 3. Go do something else while munki runs (30 minutes tops). 4. Configure user specific info (This bit can be automated using DeployStudio. For now, we do it by hand.) 18 User specific info includes hostname and user account (non-admin). Even these aren’t done totally manually - osx admin/user script for things that haven’t been put in munki yet. Also. CreateUserpkg for user creation. -
tl;dr Here’s the step-by-step version of our workflow 1. Take
new machine out of box. 2. Bootstrap it with munki, or install thin image with munki configured. 3. Go do something else while munki runs (30 minutes tops). 4. Configure user specific info (This bit can be automated using DeployStudio. For now, we do it by hand.) 5. Give the machine to its new user. 18 User specific info includes hostname and user account (non-admin). Even these aren’t done totally manually - osx admin/user script for things that haven’t been put in munki yet. Also. CreateUserpkg for user creation. -
links • Autopkg - https://github.com/autopkg/autopkg! • AutoDMG - https://github.com/MagerValp/AutoDMG! •
Munki - https://code.google.com/p/munki/! • MunkiReport-php - https://github.com/munkireport/ munkireport-php! • Jenkins - http://jenkins-ci.org/! • Me - http://drpebcak.svbtle.com/ 19 Additional Resources - https://github.com/MagerValp/CreateUserPkg https://github.com/grahamgilbert/Crypt-Server https://github.com/wdas/reposado https://github.com/jessepeterson/margarita