Deploy GarageBand and it’s loops for Mac Labs on Jamf PRO.

Deploy GarageBand and it’s loops for Mac Labs on Jamf PRO.

It would be all mac-admin dreams to be able to setup GarageBand and the loops for mac labs smoothly. Unfortunately setting up and managing Apple computers in a lab is different compared to BYOD or 1-to-1 devices. All teachers expect all computers in a lab to be ready for use when a user logs into the machine.

Currently, VPP apps will be added to devices only if the client is enrolled into an MDM and the MDM has all VPP details configured. VPP apps are deployed after the imaging process with JAMF Pro Policies.

In this post, I will demonstrate how i deployed GarageBand and the complete set of GarageBand loops for a lab of macs using JAMF Pro. Please make sure that your Caching Server works.

There are few tools required for this method. They are:

 

Pkgkeeper.sh is a script created by Michael Page that will allow you to create an installer from a downloaded Mac App Store app. Once the download is complete, the package is then saved to your desktop. This script will exclude all MASreceipt from the installer. Please follow Michael Page’s instructions on how to setup pkgkeeper.sh on your / admin computer (http://errorfreeit.com.au/blog/2014/10/18/pkgkeeper-script?rq=pkgkeeper).

Note for OS X 10.11 or macOS 10.12 users: macOS’s System Integrity Protection prevents this script from working. To temporally disable SIP boot into a recovery partition or USB installer, open Terminal and type ‘csrutil enable –without dtrace’.

Please make sure you have removed the application from your computer to allow you to re-download Garageband from MAS.

Once you have downloaded the installer(s), please rename the PKG files downloaded by pkgkeeper.sh on your desktop and drag it to Casper Admin to import it to Jamf Pro. Once GarageBand.pkg is imported, please create a Policy just to install GarageBand to a scope of computer that hasn’t got GarageBand.

The next step is to download the GarageBand loops by using Carl’s appleLoops.py script and import all 392 packages to Jamf Pro, like the following image.

Gbloops

Just kidding…

IMHO, installing GarageBand loops with that method will fail because since there are 392 packages (22Gb), the installation process will take a very long time and when it failed, the only thing we can do is to flush the log on that machine and Jamf will start all over again from 1st package. This is not ideal at all.

Due to the total size of the packages, (22GB), the best way to install the GarageBand loops packages is by caching them on the client computer. If we use JAMF’s method to cache the installer packages, this creates double the work of having to create two policies and lots of cached smart groups. One for Caching and another for Installing the cached packages. That will consume more of your time to set it up.

Thankfully, Carl Ashley has written a script to download the GarageBand loops. This script downloads the loops to a temporary location on the client, if the download fails or some packages are corrupt then the script re-downloads missing packages and skips any previously downloaded files on the next run.

First, we need to download Carl’s latest script and create a package to deploy it to a temporary hidden folder (i.e.: /usr/local/bin/) by using Packages and import it to Composer to make sure the files in sub folders in that package has the same exact permission.

appleLoopsPkg

InstallPkg is an application that will allow us to install all .pkg files in a folder. Please download InstallPkg and import InstallPkg.pkg file to Composer to fix permission issue. And then, click “build to pkg” to export it as a pkg which will works on Jamf. Now you can import the converted InstallPkg.pkg file to Casper Admin for you to deploy it together with the script in a policy later.

The next step is to create a script to run appleLoops.py script. The following script will run appleLoops.py with Jamf flags and temporary destination (i.e.: /usr/local/bin/tmp/). Then it will call InstallPKG script to run packages in Mandatory & Optional folders. You can save it as InstallCachedAppleLoops.sh on Jamf and set it to run after.

#!/bin/bash
#
# run appleLoops.py Script
#
/usr/local/bin/appleLoops.py -c http://cacheserver:port -j -d /usr/local/bin/tmp/ -f garageband1015.plist

# install all mandatory apple garageband loops
/usr/local/bin/installpkg /usr/local/bin/tmp/garageband1015/2016/mandatory/*

# install all optional apple garageband loops
/usr/local/bin/installpkg /usr/local/bin/tmp/garageband1015/2016/optional/*

exit 0

The next step is to create a Policy to run appleLoops.pkg, InstallPkg, and InstallCachedAppleLoops.sh script and scope it to computers that has Garageband.app installed and computers that require loops.

GBloops

Now, we can setup both policy (GarageBand and GarageBand Loops) to run on start up process or we can setup a custom trigger to it.

 

 

 

 

Leave a comment