How to install multiple packages

labock
New Contributor

Hey guys-

I'm trying to use CasperAdmin/CasperRemote to install a group of packages all at once remotely. I have a .dmg file that contains 3 .mpkg files that need to be installed on multiple computers remotely. How can I do this using CasperRemote?

-Luke

13 REPLIES 13

mm2270
Legendary Contributor III

Any reason you placed them all in the same .dmg? The dmg format in Casper is supposed to be used to deploy static files and folders into directory paths that don't need to be "installed" with the installer application. For example, a drag and drop application like Firefox being copied to /Applications/

You may want to drag each mpkg into Casper Admin separately and then check them all in Casper Remote after selecting target machines and deploy.

OTOH, you could theoretically use the dmg you have, but would need to script installing them. Where are the mpkgs being dropped to in the dog? If they are all going into one folder, you may be able to utilize it. If its going to something like the root of the HD, then it may not work as well.

labock
New Contributor

I'm completely new to the CasperSuite world, but the documentation for what I'm supposed to be doing from previous years said to set it up that way.

Anyways, I tried dropping the individual packages into CasperAdmin and then using CasperRemote to deploy them. The job finishes but the log says the installation failed because the package could not be verified.

mm2270
Legendary Contributor III

I'm not sure why you'd get a message that the package could not be verified. What version of Casper Suite are you using?

labock
New Contributor

I'm using 9.31

Not applicable

@labock have you tried caching the package first, then using Install All Cached Packages?

labock
New Contributor

No, and how do you do that?

mm2270
Legendary Contributor III

It involves setting up two policies and some Smart Groups, usually. Basic idea would be:

1) Policy 1 deploys the packages with the "Cache" option enabled for each instead of the default "Install"

2) A Smart Groups gathers macs that have the Packages successfully cached on them (use the "Packages Cached by Casper" for the criteria here and, after the above policy runs at least once successfully on a Mac, use the ellipses (…) button to choose the packages from a list. Also make certain the collect inventory option is checked for the policy)

3) Policy 2 uses the above Smart Group as its scope, and the same 3 packages added, but with the "Install Cached" option enabled for each instead of the default "Install" Use whatever frequency and trigger makes sense for it.

Once Policy 1 runs, collects inventory, Macs should start to fall into the Smart Group and the second policy can take over for actually installing them.

All that said, this is silly question, so please don't be offended, but have you verified that all the packages actually install correctly on a Mac that you might be trying to push them to by double clicking and running them manually? Did you make these .mpkgs yourself or are they vendor supplied?

labock
New Contributor

The .mpkg files I have are vendor supplied. They are for a program called Lightwright and Beamwright, theatre software as far as I know. I also have a .pkg file that I created with CasperComposer that holds the license file for the Lightwright software. I installed Lightwright on my own machine already in order to create this license file which i packaged with Composer.

My documentation instructed me to:

-place that .pkg file, along with the two vendor .mpkg files in a folder. -change the properties of that folder, along with its contents via the terminal
-wrap the contents of the folder to a .dmg via Disk Utility. -upload the .dmg to CasperAdmin along with some .sh script in order to deploy.

mm2270
Legendary Contributor III

Are those instructions from the vendor? Because that doesn't sounds like anything JAMF would write up.
I'm not familiar with those software titles, but that process seems unnecessarily complicated to me. However, you might be dealing with one of those applications that requires a license file to be in a certain location so the installer pkg can see it when its run. Does that sound accurate? If so, I hate those kinds of installations. These are designed to be run by an end user and not really for any kind of mass deployment.

labock
New Contributor

No those are instructions on how to deploy the software to various campus machines at my university based on how it was done in previous years, I'm a student worker for the summer at our IT department and am not very familiar with this software, so I'm just following the steps to the best of my ability.

labock
New Contributor

And yes, it's one of those stupid license file required softwares, which I agree are extremely frustrating to mass deploy if they don't have some kind of license manging server.

mm2270
Legendary Contributor III

Do you have some freedom to "redesign" this in a way that makes more sense? Or are you bound as a student worker to follow those instructions? Hopefully you can at least experiment with this.
If so, here would be my recommendation.

Open /private/tmp/ from the Finder > Go to Folder window and make a new folder there. Name it something simple that would represent this installation. Simple alpha characters and no spaces or weird symbols would be best.

Drag the 3 .mpkg files into that directory to copy them there. Make sure they are copying (they should by default) since /tmp/ gets cleaned out at reboots.

Now in Composer, drag the folder from /tmp/ into the app's sidebar panel. it should create a new source with that folder and the 3 .mpkgs in it.

Now click on the disclosure triangle for this new package in Composer to see the "Scripts" item and other items underneath it. Right click on Scripts and choose "Add Shell Script" and choose either "postflight" or "postinstall". The former can be used with either flat or bundle style pkgs while the latter only works with flat packages. I've had better success with postflight scripts for some reason.

Click on whatever script you added and type or copy/paste in the following, adjusting the path as necessary. Say you named the folder you created "WrightApps" as an example.

for PKG in $(ls "/private/tmp/WrightApps/" | grep "pkg$"); do
      /usr/sbin/installer -pkg "$PKG" -tgt / -allowUntrusted
done

Make sure to leave the shebang in the script (#!/bin/sh)
That should loop through any pkgs or mpkgs in that folder and install them one at a time.

Along with this you can deploy the license file to whichever directory that needs to be in. Not sure if its required that its physically in the same folder as the installer or if its supposed to be in a set location on disk, but whichever way that needs to happen, you can drop that into the same Composer build in the location it needs to go in.
Since the above script will run AFTER everything gets dropped on disk, it will hopefully see the license/registration file and be able to use it.

When ready, build this out as a pkg installer, not a dmg. If you used a preflight script, you may see a warning that it can only be sued with bundle style packages and Composer will let you build it that way if needed.
Try uploading and deploying that pkg as a test to see how it works.

The above is not guaranteed to work, but it may work better than the instructions you've been following to date.

Chris_Hafner
Valued Contributor II

Oddly I've found two things to sort this out... mind you I agree with the above posts. Yet, take a look at this thread (Or point it out to your JSS admin). You will sometimes get this "package cannot be verified" if they haven't done their user migration yet. FYI, this should not detract in any way from what's being mentioned in this post. I just think that you're having an error on one hand and a slightly over complicated solution to, possibly, a different problem on the other.

https://jamfnation.jamfsoftware.com/article.html?id=362