Jesus Vigo reviews the steps necessary to create package-based installers to simplify the software deployment process for OS X.
A management suite, such as Apple Remote Desktop, simplifies the deployment of software applications to all managed OS X devices. But what happens when you use an alternative management suite that only supports PKG file types?
In keeping with the sysadmin theme, I'd like to touch on the topic of creating your own installer packages to deploy apps, settings, or even scripts—complete with paths to the destination and security permissions.
The magical functionality necessary to create most packages is built right in to Terminal with the pkgbuild command, so there are no additional software licenses or costs.
Let's jump right into the process below and create a deployable pkg file.
- For the purposes of this tutorial, I've chosen Google Chrome to model the creation process, but feel free to substitute for an app of your choice. Start by mounting the application's DMG file. Take note of both the name of the mounted volume and the app itself (Figure A).
- Launch Terminal and type in the following command, replacing the paths as necessary (Figure B).
sudo pkgbuild —install-location /Applications —component /Volumes/Google\ Chrome/Google\ Chrome.app ./Desktop/Google\ Chrome.pkg
- After authenticating, your package will commence building (Figure C).
- The process will take several minutes, depending on the file size (Figure D).
- Upon completion, the pkg will save to your desktop, ready for deployment (Figure E).
That's it! The process really is that easy for most applications. The only caveat here is that not all apps are created equal, so how a dev compiles his or her app could affect the success of the pkg build.
This is where testing is your friend. Honestly, you really don't want to deploy an untested application across your network or roll it into your AutoDMG image.
What's your experience with creating your own installer packages? Let us know in the discussion thread below.
- How to automate workflow tasks with DeployStudio
- Pro tip: How to create a NetRestore image
- How to create and use Task Workflows in DeployStudio
- Pro tip: Automate image creation using the System Image Utility