Jamf and AutoPkg: JNUC 2019 Session Links and commands - UPDATE: video and slide deck now available
On 14 November 2019, at 13:30, I presented at the Jamf Nation User Conference in Minneapolis, MN, USA, on the following topic:
Jamf Pro and AutoPkg: How JSSImporter automates package management and policy creation in Jamf Pro
This posts detail the contents of the session, including sections originally planned that I had to cut to fit into 45 minutes.
The slides can now be viewed here
The video is now available to view here:
Contents
- AutoPkg + JSSImporter - setup and use
- Understand and use standard JSS recipes
- Roll your own JSS recipes
- The future of JSSImporter
Part 1: AutoPkg + JSSImporter - setup and use
What is AutoPkg?
- AutoPkg Wiki
- AutoPkg 2020 by Greg Neagle, MacSysAdmin Conference, Göteburg, Sweden, 2019.
Installing and configuring AutoPkg and JSSImporter
Manual installation
- Install Xcode command line tools:
xcode-select --install
- AutoPkg Latest Release
- JSSImporter Latest Release
- JSSImporter Wiki - Configuring Repositories
Alternative methods of installation and setup
AutoPkg from the command line
Searching for a recipe (searches repos in github.com/autopkg):
autopkg search iTerm2
Adding a repo (git clone
a recipe):
autopkg repo-add jss-recipes
Getting info about a recipe:
autopkg info iTerm2.jss
Setting AutoPkg to fail if recipe are not trusted:
defaults write com.github.autopkg FAIL_RECIPES_WITHOUT_TRUST_INFO -bool true
Making a recipe override file (saved to ~/Library/AutoPkg/RecipeOverrides
by default):
autopkg make-override iTerm2.jss
Making a recipe override file (saved to ~/Library/AutoPkg/RecipeOverrides
by default):
autopkg make-override iTerm2.jss
Running a recipe:
autopkg run iTerm2.jss
Running a recipe with more verbosity:
autopkg run -v iTerm2.jss
Running a JSS recipe with maximum verbosity:
autopkg run -vvvv iTerm2.jss
Running multiple recipes in one command:
autopkg run iTerm2.jss Google\ Chrome.jss "Microsoft Office.jss"
Running recipes from a list in a text file:
autopkg run --recipe-list JSS_Recipes.txt
Updating all repositories (git pull
all repos):
autopkg repo-update all
Verifying the trust information of a recipe with verbose output (git diff
):
autopkg verify-trust-info -vv iTerm2.jss
Updating the trust information of a recipe:
autopkg update-trust-info iTerm2.jss
Getting notifications from AutoPkg runs
Part 2: How to understand and use Standard JSS recipes
Standard JSS recipe policy format:
- Category
Testing
. - Self Service
- Ongoing frequency
- Policy name:
Install Latest %NAME%
- Package name
%NAME%-%version%.pkg
- Update Inventory set
- Smart Group name:
NAME-update-smart
The Standard Smart Group template creates groups as follows:
and-or | ( / ) | Operation | operand | value | ( / ) |
---|---|---|---|---|---|
Application Title | is | %JSS_INVENTORY_NAME% | |||
and | Application Version | is not | %version% | ||
and | Computer Group | is | Testing |
Templates:
- Standard policy template
- Standard smart group template
- Example script template
- Extension Attribute template - CFBundleVersion
Recipe Override example: Atom.jss.recipe
Promoting recipes
- jss_helper
- Auto-Update by Tom Larkin (@tlark on MacAdmins Slack Team)
- Auto-Update Magic by Elliot Jordan (@homebysix on MacAdmins Slack Team)
Part 3: Roll your own JSS recipes
Standard recipes
JSSRecipeCreator - example command to make VLC.jss.recipe
:
$ JSSRecipeCreator.py --auto ~/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/VLC/VLC.pkg.recipe
Package-only recipes
JSSRecipeCreator - example command to make VLC.jss-upload.recipe
:
$ JSSRecipeCreator.py --package_only --auto ~/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/VLC/VLC.pkg.recipe
- Using Autopkg for package Uploads to Jamf Cloud only by Daz Wallace (@dazwallace on MacAdmins Slack Team)
- How to Upload Packages to Jamf Cloud using Autopkgr by Keith Mitnick (@kmitnick on MacAdmins Slack Team)
- JSS_Package_Only_Recipes in
grahampugh-recipes
Script-only recipes
- JSS_Script_Recipes in
grahampugh-recipes
Production recipes
- JSS_Production_Recipes in
grahampugh-recipes
- Example autoupdate recipe from Auto-Update Magic
Part 4: The future of JSSImporter
- AutoPkg 2.0 Beta 1 for python 3 (does not currently work with JSSImporter)