Skip to content

Setup push to computers

Chris Lasell edited this page Mar 19, 2016 · 2 revisions

Installing d3 onto managed computers

In order for your client computers to use d3, it must be installed on them.

Client computers will need all the things you did when you Installed d3 on your own machine

If you used the .pkg installer, you can use it to install d3 onto your managed Macs.

Otherwise, you have a few options about how to deploy, howeve the easiest one would be to build your own .pkg.

Casper policies, or any other non-d3 method, should probably always be used to push out d3 itself, and any updates to it. If you deploy d3 with d3, you risk chicken-and-egg problems.

Using depot3.pkg

If you used depot3.pkg to install on your machine, and d3 is now working, try this:

  1. Add depot3.pkg to Casper as a regular Casper Package.
  2. Create a policy that installs depot3.pkg
  3. In that policy, use a script, a shell command, or another package to install the /etc/d3.conf and /etc/ruby-jss.conf files, populated with values for your site.
  4. If you are not using expiration, you may use the policy to remove /Library/LaunchAgents/com.pixar.d3.RepoMan.plist, and /Library/Application Support/d3/d3RepoMan.app, which are installed by the .pkg
  5. Scope the policy to all computers that should have d3 installed, and enable it

Other deployment options

If you did not use depot3.pkg to install on your machine (e.g. if you don't store ruby gems in /Library/Ruby/Gems/2.0.0) you need to replicate what you did to your machine on your managed Macs.

Probably the easiest way to do this is by making a Casper package with Composer, and then deploy it with a Casper policy, similar to the steps above.

If you plan to use expiration, you'll need to set that up as well.

Here's a list of what should be installed onto client computers:

  • The results of 'sudo gem install depot3'

    This usually will be various things inside /Library/Ruby/Gems/2.0.0/. Install it on a fresh computer, or use Composer to locate the files that were installed. You may want to run that command on the client machines, though watch out for build errors.

  • /Library/Application Support/d3/ (copied from the data folder of the depot3 gem)

    This will contain:

    • d3RepoMan.app (if you'll be using expiration)
    • the puppytime folder ( unless you've specified a different folder in the config)
  • /etc/ruby-jss.conf (properly configured for your site)

  • /etc/d3.conf (properly configured for your site

  • symlinks or wrappers to the executables in the gem install bin directory

    • d3
    • d3admin
    • d3helper
    • puppytime

    The default gem install directory for the OS is /Library/Ruby/Gems/2.0.0/. If that's where your system-wide gems are installed, the executables will be in /Library/Ruby/Gems/2.0.0/bin.

  • /Library/LaunchAgents/com.pixar.d3.RepoMan.plist (if you'll be using expiration)

    Get a copy of this from /Library/Application Support/d3/

Once you have all that packaged up, push it out to a machine, and fire up d3. Running d3 list-available should give you a list of packages in d3.

Importing Casper Receipts

As you import packages from Casper into d3, there will probably be computers out there which have those packages installed already, via a Casper policy or Casper Remote.

In those cases, you'll want to create d3 receipts for those packages on the computers.

Running sudo d3helper --import-casper-receipts will do just that.

It looks through the Casper package receipts on the computer, and looks for matching packages in d3. If found, a d3 receipt is created.

You can run it over and over, and it will only import receipts it hasn't yet imported.

So, during the time you are importing Casper packages into d3, set up a policy to run sudo d3helper --import-casper-receipts regularly.

CAUTION: Be very careful managing d3 packages via policies and Casper remote, they are meant to be managed with d3. Installing via Casper methods doesn't create a d3 receipt, and uninstalling with Casper doesn't remove the d3 receipt. (d3 however does create and remove Casper receipts, since it uses the jamf binary to do the work).

Once you've got all your Casper packages in d3, you should make sure those packages aren't used directly by any policies, and train your admins to use d3 rather than Casper for software deployment.