Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AutoPkg Intro

AutoPkg Intro

If you want to automate your software update workflow, AutoPkg is indispensable.

This talk was given at the Twin Cities Mac Admins meetup in March, 2015. @MspMacAdmns

Avatar for Dan Keller

Dan Keller

March 23, 2015

Other Decks in Technology

Transcript

  1. UPDATES Where do we get them? When do they become

    available? Are they consistent? How do we deliver them?
  2. PACKAGING PROCESS • Why package? • Required for deployment •

    Make customizations • Fix broken installers ?
  3. ENTER AUTOPKG Solves both problems at once. Find & Download

    Software Prepare for Distribution Import into Distribution System
  4. AUTOPKG RECIPES • Default repo: autopkg/recipes • 115 recipes •

    .download - 29 • .pkg - 31 • .munki - 48 • .install - 7 13
  5. % autopkg list-recipes | grep .download | wc -l
 477

    % autopkg list-recipes | grep .pkg | wc -l
 277 % autopkg list-recipes | grep .install | wc -l 
 142 % autopkg list-recipes | grep .munki | wc -l
 427 % autopkg list-recipes | grep .jss | wc -l
 40 *Shamelessly adapted from Greg Neagle’s 2014 MacAdmin talk 14
  6. HOW IT WORKS • autopkg runs recipes (plist XML files)

    • recipes call other recipes or processors • processors do the work
  7. HOW IT WORKS • AutoPkg wiki on Github • Getting

    started and FAQ • Documentation on every core processor • Recipe creation instructions
  8. GETTING STARTED • Download AutoPkg: http://autopkg.github.io/autopkg (current v. 0.4.2) •

    install git (included in 10.9+) • run autopkg repo-add recipes
  9. RECIPE REPOS • Any git repo • AutoPkg “repo-add” defaults:

    • repo = github.com/autopkg/repo • name/repo = github.com/name/repo • full git repo address
  10. REPO-ADD % autopkg repo-add recipes
 
 Attempting git clone…
 Cloning

    into ‘/Users/dan/Library/AutoPkg/RecipeRepos/ com.github.autopkg.recipes'...
 
 Adding /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes to RECIPE_SEARCH_DIRS...
 Recipe search path is: (
 ".",
 "~/Library/AutoPkg/Recipes",
 "/Library/AutoPkg/Recipes",
 "/Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes"
 ) %
  11. REPO-LIST % autopkg repo-list
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.48kram-recipes (https://github.com/autopkg/48kram-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.arubdesu-recipes (https://github.com/autopkg/arubdesu-recipes)/Users/dan/Library/AutoPkg/ RecipeRepos/com.github.autopkg.bochoven-recipes (https://github.com/autopkg/bochoven-recipes)


    /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.bradclare-recipes (https://github.com/autopkg/bradclare-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.cgerke-recipes (https://github.com/autopkg/cgerke-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.dankeller-recipes (https://github.com/autopkg/dankeller-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.derak-recipes (https://github.com/autopkg/derak-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.gerardkok-recipes (https://github.com/autopkg/gerardkok-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.golbiga-recipes (https://github.com/autopkg/golbiga-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.grahamgilbert-recipes (https://github.com/autopkg/grahamgilbert-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.gregneagle-recipes (https://github.com/autopkg/gregneagle-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.groob-recipes (https://github.com/autopkg/groob-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.hansen-m-recipes (https://github.com/autopkg/hansen-m-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.hjuutilainen-recipes (https://github.com/autopkg/hjuutilainen-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.homebysix-recipes (https://github.com/autopkg/homebysix-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.jaharmi-recipes (https://github.com/autopkg/jaharmi-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.jazzace-recipes (https://github.com/autopkg/jazzace-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.jessepeterson-recipes (https://github.com/autopkg/jessepeterson-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.jleggat-recipes (https://github.com/autopkg/jleggat-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.joshua-d-miller-recipes (https://github.com/autopkg/joshua-d-miller-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.jps3-recipes (https://github.com/autopkg/jps3-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.justinrummel-recipes (https://github.com/autopkg/justinrummel-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.keeleysam-recipes (https://github.com/autopkg/keeleysam-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.lashomb-recipes (https://github.com/autopkg/lashomb-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.luisgiraldo-recipes (https://github.com/autopkg/luisgiraldo-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.mosen-recipes (https://github.com/autopkg/mosen-recipes)
 /Users/dan/Library/AutoPkg/RecipeRepos/com.github.autopkg.n8felton-recipes (https://github.com/autopkg/n8felton-recipes)
  12. REPO-UPDATE • Performs git pull for specified repo • autopkg

    repo-update all • git pull on all added repos
  13. SEARCH • Find recipes among all the AutoPkg recipe repos

    • No need to repo-add first • Only searches the AutoPkg organization on Github
  14. SEARCH ➜ ~ autopkg search GoogleDrive ! Name Repo Path

    ---- ---- ---- GoogleDrive.install.recipe cgerke-recipes Google/GoogleDrive.install.recipe GoogleDrive.download.recipe cgerke-recipes Google/GoogleDrive.download.recipe GoogleDrive.pkg.recipe cgerke-recipes Google/GoogleDrive.pkg.recipe GoogleDrive.sccm.recipe cgerke-recipes Google/GoogleDrive.sccm.recipe GoogleDrive.download.recipe dankeller-recipes GoogleDrive/GoogleDrive.download.recipe GoogleDrive.munki.recipe dankeller-recipes GoogleDrive/GoogleDrive.munki.recipe GoogleDrive.download.recipe derak-recipes Google/GoogleDrive.download.recipe GoogleDrive.munki.recipe derak-recipes Google/GoogleDrive.munki.recipe ! To add a new recipe repo, use 'autopkg repo-add <repo name>'
  15. SEARCH ➜ ~ autopkg search GoogleDrive ! Name Repo Path

    ---- ---- ---- GoogleDrive.install.recipe cgerke-recipes Google/GoogleDrive.install.recipe GoogleDrive.download.recipe cgerke-recipes Google/GoogleDrive.download.recipe GoogleDrive.pkg.recipe cgerke-recipes Google/GoogleDrive.pkg.recipe GoogleDrive.sccm.recipe cgerke-recipes Google/GoogleDrive.sccm.recipe GoogleDrive.download.recipe dankeller-recipes GoogleDrive/GoogleDrive.download.recipe GoogleDrive.munki.recipe dankeller-recipes GoogleDrive/GoogleDrive.munki.recipe GoogleDrive.download.recipe derak-recipes Google/GoogleDrive.download.recipe GoogleDrive.munki.recipe derak-recipes Google/GoogleDrive.munki.recipe ! To add a new recipe repo, use 'autopkg repo-add <repo name>'
  16. • Use --recipe-list or -l to specify a text file

    with a list of recipes to run RUNNING MULTIPLE RECIPES
  17. CUSTOMIZING RECIPES • Recipe overrides • Local files containing your

    own customizations • Create with make-override verb
  18. AUTOMATING • Jenkins CI server (overkill?) • https://swytechnotes.wordpress.com • LaunchDaemon

    • LaunchDaemon + wrapper script • http://seankaiser.com/blog
  19. • Check every week/day/hour(!?) • Output a run report file

    • Email when there is an update AUTOMATING
  20. AUTOPKGR • GUI for AutoPkg • Includes support for JSS

    • https://github.com/lindegroup/autopkgr