Home > AutoPkg, Jamf Pro, JSSImporter, Scripting > Automating AutoPkg and JSSImporter setup

Automating AutoPkg and JSSImporter setup

As part of building my autopkg-conductor solution for automating AutoPkg runs, I also wanted to automate the setup of AutoPkg and JSSImporter. My colleague Graham Pugh has written a setup script for his environment, which I was able to adapt and extend for my own needs. For more details, please see below the jump.

This script is designed to set up a Mac running macOS 10.13.x or later with the following:

  • AutoPkg
  • JSSImporter
  • The AutoPkg recipe repos defined in the script.

The script checks to see if the following components are installed. If any are missing, they’re installed on an as-needed basis:

It also installs the following Python tools and modules on an as-needed basis:

The script also includes the following features:

  • The ability to set JSSImporter to use a Jamf Pro cloud distribution point as the master distribution point

Screen Shot 2018 07 10 at 9 37 35 AM

  • The ability to install either the latest release of JSSImporter or JSSImporter 0.5.1.

Screen Shot 2018 07 10 at 9 37 49 AM

 

The reason that JSSImporter 0.5.1 is set as a specific install option is that JSSImporter 1.0 does not currently support uploading to a Jamf Pro cloud distribution point. JSSImporter 0.5.1 does support uploading to a cloud distribution point, so while the upload issues are being worked out with JSSImporter 1.x, using the older JSSImporter 0.5.1 is the currently recommended workaround.

Once these tools and modules are installed, the script does the following:

1. Configures AutoPkg to use the recipe repos defined in the AutoPkg repos section.

Autopkg repos variable

 

2. Configures JSSImporter to connect to the desired Jamf Pro server with the correct distribution point settings.

This script should not be run with root privileges or you will receive the following warning:

Screen Shot 2018 07 10 at 10 46 07 AM

Instead, the script should be run by an account with sudo privileges, so that entering the account’s password will allow sudo to run specified processes with root privileges. If you try to run this script using an account without sudo privileges, you will receive the following warning:

Screen Shot 2018 07 10 at 11 33 52 AM

If the script is successfully run, the script output should look similar to what is shown below.

If a Jamf Pro cloud distribution point is set as the master distribution point:

Screen Shot 2018 07 13 at 6 11 00 AM

If a Jamf Pro file share distribution point is set as the master distribution point:

Screen Shot 2018 07 13 at 5 44 19 AM

The script is available below. It’s also available from GitHub using the following link:

https://github.com/rtrouton/autopkg_setup_for_jamf_pro

  1. kevind
    July 13, 2018 at 6:03 pm

    is there an alternative for jssimporter to munki? I know that the previous post was inspired by autopkgr’s issues on 10.13.5, so I’m looking into alternatives for that (we’re still on 10.13.4 on the mac currently running autopkgr). will probably end up using a launchd item or cronjob to do the scheduling

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: