How to deploy a file to the local system?

pickerin
Contributor II

When performing some things, such as the Adobe-blessed method of installing Flash, you have to get an installer application to the local machine. What is the best practice for doing this? My distribution point is over https, so I was thinking I could write a script and use Curl to pull a .zip file from the JSS or another server to the local system and then unpack it, but was curious if there was an easier way that I'm overlooking?

3 ACCEPTED SOLUTIONS

mm2270
Legendary Contributor III

You could use curl to pull down the file from your http enabled DP, provided that works in your environment.

In my case, I usually just wrap it up as a pkg file that places the application installer into a set location, such as /var/somefolder/ and then runs it via a postinstall script embedded into the pkg. That lets the JSS do its usual installation process to drop the installer.app into the location I specified when I packaged it in Composer and the postinstall script takes care of running it. The script is of course optional if you only want to drop it to a set location.

Also, it seems as of Casper Suite 8.63, we no longer see the pesky disk images mount visibly in the Finder when using the DMG package method. It wasn't mentioned anywhere I could find in the release notes, but it seems that long standing pet peeve of mine has been fixed.

View solution in original post

pickerin
Contributor II

Just figured it out I believe, the secret I was missing was "Cache".

You can deploy a DMG to the "Waiting Room" (/Library/Application Support/JAMF/Waiting Room/) by selecting "Cache" from the Action pop-up menu when Adding Packages to the Policy.

If I'm wrong help me out.

View solution in original post

pickerin
Contributor II

Just to close this thread out...

I finally figured out what I was missing, and it wasn't "Cache" though that kind of works if you have a DMG. What I really wanted was a blank Composer package, and then just drag the files into the package and things *should* work correctly. However, I can't figure out how to build a "blank" Composer package. They all have to be snapshots. So, I created a snapshot and just deleted everything out of it. However, that doesn't seem to work as I'm getting the "This Apple Package did not have a valid index.bom file. Assuming it is a flat file package." and while it places the files on the drive, the postinstall script doesn't ever run, so nothing actually happens.

Off to check out Packages.

View solution in original post

9 REPLIES 9

mm2270
Legendary Contributor III

You could use curl to pull down the file from your http enabled DP, provided that works in your environment.

In my case, I usually just wrap it up as a pkg file that places the application installer into a set location, such as /var/somefolder/ and then runs it via a postinstall script embedded into the pkg. That lets the JSS do its usual installation process to drop the installer.app into the location I specified when I packaged it in Composer and the postinstall script takes care of running it. The script is of course optional if you only want to drop it to a set location.

Also, it seems as of Casper Suite 8.63, we no longer see the pesky disk images mount visibly in the Finder when using the DMG package method. It wasn't mentioned anywhere I could find in the release notes, but it seems that long standing pet peeve of mine has been fixed.

pickerin
Contributor II

So, do I take a snapshot in Composer, drag the Installer into the folder I want it to be in, and then close the snapshot? I've tried that a couple times, and Composer never seems to catch the file change...

I know this can't be difficult, I'm just missing something. How do you "specify a location when you package it in Composer"? I'd like to do it the "right way" and copying it down via a shell script doesn't seem to be it.

pickerin
Contributor II

Just figured it out I believe, the secret I was missing was "Cache".

You can deploy a DMG to the "Waiting Room" (/Library/Application Support/JAMF/Waiting Room/) by selecting "Cache" from the Action pop-up menu when Adding Packages to the Policy.

If I'm wrong help me out.

mm2270
Legendary Contributor III

You can use the caching mechanism if you want, sure, but you don't need to use any capture method in Composer to do what I described. Just place the file/folder into the location you want it to get deployed to on your system, open Composer and just drag/drop that same file/folder into Composer, making sure to drag it into the Source column. As long as you don't drag it into an existing sources folders, Composer creates a new Source at the bottom of the list. Name it, add any scripts, etc, then build it as a .pkg or .dmg, etc.

FWIW, I've had odd issues with Casper's caching method and certain packages. We tried using it with Office 2011 updaters and for some reason they always ended up corrupted and couldn't be installed. I never figured out why. Wrapping them up as a pkg or dmg "install" to place them on the Mac awaiting installation has been more reliable for us.

Chris_Hafner
Valued Contributor II

Ditto on skipping both caching the installer and using snapshots with composer. I've seen many ways of doing this, though I personally don't agree with the "Best practice" methods described by either adobe or Apple. Pulling the flash package out of the installer and using that is the way we go... However, here is a great thread on various ways to install flash.

https://jamfnation.jamfsoftware.com/discussion.html?id=5713

stevewood
Honored Contributor II
Honored Contributor II

My two pennies....another method for packaging the files is to use Packages (http://s.sudre.free.fr/Software/Packages/about.html). I've found this to be easier to use than Composer for dropping files onto systems. Especially if you need to drop files into multiple locations.

donmontalvo
Esteemed Contributor III

@stevewood Stephen Sudré (the developer) is very responsive and active on the Installer-Dev list. We've built Mac packaging workflows around Packages (and before it, its predecessor Iceberg) that make deployment a snap, including updating existing packages, adding logic (check requirements), doing FEU/FUT, etc...

I'm not a Composer fan, unless you're capturing OS'es. Snapshots are dangerous (there, I said it), and it's long in tooth in the "ability to add logic" area, etc. It's an "Easy Button" for folks who don't know how to package (unofficially vetted package manifests), etc.

I know everyone's got to decide on their own tool and workflow, we've always structured our workflow to put us in the best position down the road (not just today). We avoid proprietary solutions in areas where there is no need, like packaging. I'm content to cringe on the sideline when someone mentions Composer or snapshots. ;)

Stephen's Packages tool is brilliant, and follows Apple's guildelines, and doesn't tie you to any third party solution. Take Packages away and you've got exactly what's needed for continuing on with any other non-proprietary tool that follows Apple's guidelines. What happens if/when Casper is yanked from an environment? You're stuck with non-standard packages that don't follow Apple guidelines and can't be used outside of Casper (double-click a Composer generated DMG and you'll see what I mean). Trust me, been there...

http://jamfnation.jamfsoftware.com/discussion.html?id=1038

JAMF: I really would love to see you guys roll Packages in to Casper Suite...Casper's packaging capability is the one area that needs a shot in the arm.

Don

--
https://donmontalvo.com

donmontalvo
Esteemed Contributor III

@Chris_Hafner

I personally don't agree with the "Best practice" methods described by either adobe or Apple.

We try to follow Apple's guidelines, but they've not always had enterprise admins' best interest in mind. ;)

Adobe's "best practice" is whatever makes them mo' money. Their "one code set between platforms" saves them money (we subsidize their dev team). Lots of mouthes to feed over there...hey, did you know "Creative Suite is the future"? Google Adobe+Monopoly for some history...

I've been burned before, relying solely on a 3rd party solution (NetOctopus in the 90's) and getting left stranded when they shut down. Lesson learned, we've made it a point to avoid proprietary packaging tools. It'd be a different story if JAMF rolled in Packages as an optional supported tool. We'd be dancing all night...

Don

--
https://donmontalvo.com

pickerin
Contributor II

Just to close this thread out...

I finally figured out what I was missing, and it wasn't "Cache" though that kind of works if you have a DMG. What I really wanted was a blank Composer package, and then just drag the files into the package and things *should* work correctly. However, I can't figure out how to build a "blank" Composer package. They all have to be snapshots. So, I created a snapshot and just deleted everything out of it. However, that doesn't seem to work as I'm getting the "This Apple Package did not have a valid index.bom file. Assuming it is a flat file package." and while it places the files on the drive, the postinstall script doesn't ever run, so nothing actually happens.

Off to check out Packages.