Apple Macintosh Application/Software Deployment Guide with LANDESK Management Suite

Version 12

    Verified Product Versions

    LANDESK Management Suite 9.5LANDESK Management Suite 9.6LANDESK Management Suite 2016.x

     

     

    Purpose:

    The purpose of this document is to instruct you in a few ways that you can deploy Apple software to Apple devices within your environment using the LANDESK Management Suite.

    This article adds the the information already contained on this process on the help site here.

     

     

    Preparing the software for deployment:

    Before we go any further it is advised advise you to read the following article from the community:

    The Commandments of Packaging for Apple Mac Software

    This article outlines the design process you should have in mind before you start creating the packages

     

     

    Packages deployed using drag and drop methods (.app):

     

    One example of a package that uses this type of method is firefox:

    -app-normsal-deployment.png

     

    A .pkg file can be made from this application file so that it can be used to deploy silently with LDMS. The tool we will be using to do is the command line utility pkgbuild. This is included in Mac OS X by default from version 10.7 (Lion)

    1. Create a folder on your desktop to create the .pkg file in. In this example we are going to use 'Deployment'
    2. Download Firefox from https://www.mozilla.org/
    3. Open the DMG file which contains Firefox.app.
    4. Open up Terminal and type the command:
      sudo pkgbuild --install-location /Applications --component /Volumes/Firefox/Firefox.app /Users/admin/Deployment/Desktop/Firefox.pkg

         sudo - this is the command to elevate the command to the administrative level. As such you may be asked for a password depending on what user you are logged in as

         pkgbuild - This is the command-line package utility provided by Apple

         --install-location - this is the location that you wish to have the package install the application to

         --component -the first path the location of source files for the .pkg file , the second path is the location that you wish to have the .pkg file created

     

       5. The .PKG installer created can be now be used and deployed in your environment using LDMS. See below for details.

     

    result.png

     

     

     

     

     

     

     

     

     

     

     

    N.B: Please note that this is a general rule, this is not always the best method to deploy .app files. Adobe flash being one example, see this article for a more specific way of doing it:

    Specific software packaging for Apple Macintosh

     

    Adobe Flash Player

    1. Download Adobe Flash Player for OS X from http://www.adobe.com/products/flashplayer/distribution3.html
    2. Open the DMG file.
    3. Right-click the Install Adobe Flash Player.app and select Show Package Contents.
    4. Browse to \Contents\Resources\ and you should see the .pkg installer file called Adobe Flash Player.pkg. That's the installer file you want to copy for software deployment .
    5. The .PKG file can be now be used and deployed in your environment using LDMS. See below for details.

     

    Packages already packaged (.pkg):

    Most of the work is done for you. This is most likely the most unique form of deployment with how specific each .pkg file that you install. Just like windows applications and installers they each have there own switches and so do Apple Mac applications. These switches can be found out from either the vendor or by some research through a search engine of your choice. Sometimes though a switch will not be needed as in the example .pkg file that was created above.

     

    Adobe provides a specific utility to pre-prepare its big suite software for silent and customised  installations. Here is an example for Adobe CS6:

    Adobe CS6

    1. Download the installation media from the Adobe Licensing Website: https://licensing.adobe.com/. This media should be located on our servers as well.
    2. Download and install the | Adobe Application Management Enterprise Edition (AAMEE) deployment tool. Please read the Deployment Guide as well which will explain which version of the AAMEE tool to use for the different Adobe CS products.
    3. The .PKG file can be now be used deployed in your environment using LDMS. See below for details.

     

    Some other examples can be found on this page:

    Specific software packaging for Apple Macintosh

    Packages in a compressed format (.dmg):

    As above if they contain an .app file to drag and drop the method above will solve this issue.

     

    If the file contained within is a .pkg file, you can extract, by copying the .pkg file to the desktop or other location and then deploy with the appropriate switches if needed.

     

    Deploying packages using a shell script .sh (Example):

    It is sometimes necessary to deploy a number of files within one LDMS software package. You have multiple choices to do this and i have complied three of them which you can use with the LDMS suite.

     

     

    Using software distribution bundles

    Information on this can be found on the help site here

     

    mac-package-bundle.png

     

     

    Using Curl

    You can also use a shell script to download the files and then install them from the sdmcache location.

     

    In this shell script I have used the curl command and the installer command to install the pkg files silently.

    installer(8) Mac OS X Manual Page

    curl(1) Mac OS X Manual Page

    #!/bin/bash
    #change the current location to that of the sdcache
    cd /Library/Application\ Support/LANDesk/sdcache
    
    #download the required files
    curl -O http://coreserver.domain.net/packages/firefox.pkg
    curl -O http://coreserver.domain.net/packages/chrome.pkg
    
    #Install the files
    installer -pkg firefox.pkg -target /
    installer -pkg chrome.pkg -target /
    
    Exit
       

    N.B: As mentioned on the apple website the installer will not reboot the machine if that is required from the .pkg file. That is something you will have add to the script yourself.

    Instead of 'Exit' have the following to trigger a reboot:

     

    reboot
       

     

     

    Using UNC path

    Please note even though this will download the files within the shell script via UNC you will still require a http path to deploy the script from the LDMS console.

    #!/bin/bash
    #change the current location to that of the sdcache
    cd /Library/Application\ Support/LANDesk/sdcache
    
    #create mount point
    mkdir /packages
    #mount package share
    mount -t smbfs -o nobrowse //username:password@coreserver.domain.net/packages /packages
    
    #username is in the windows format domain\username
    
    #copy packages to current directory, currently the sdmcache one
    cp /packages/firefox.pkg
    cp /packages/chrome.pkg
     
    #the source is the mounted share, . is a shortcut for current directory 
    
    #Install the files
    installer -pkg firefox.pkg -target /
    installer -pkg chrome.pkg -target /
    
    Exit
      

    N.B: As mentioned before, on the apple website the installer will not reboot the machine if that is required from the .pkg file. That is something you will have add to the script yourself.

    Instead of 'Exit' have the following to trigger a reboot:

    reboot
       

     

    Deployment of the software using the LDMS Suite:

    Now that you have you package prepared and tested ready for deployment use the following steps to deploy the software via the LDMS console.

    As mentioned before this is all detailed on the help site here.

     

    In this example I am going to use the firefox.pkg file that I created earlier.

     

    1. Once you have created you package ready for deployment, copy it into your main packages share. I would recommend that you use a naming convention for the folder or folder hierarchy so that you can easily find the apple packages within your share.

    2. Now in your core console or remote console open the Software Distribution window by going to : Tools > Distribution > Distribution.

    distrbution packages.png

    3. For the purpose of this example and to help me differentiate between OS package types I create a new 'Package Bundle' (Folder) and called it 'Mac Packages'

    mac folder.png

    4. Select the folder and then in the right hand column, right click and choose to create a 'New distribution package' > 'New Macintosh package'

    new mac pac.png

     

    5. This bring up the next window, which I have annotated:

    package details.png

    6. The next window option under 'install/Unistall options' is the location that you can place switches for the pkg files if you know them.

    switch page.png

    7. As with the windows package creation options you can have 'Prerequisites' , 'Assign Return codes' and add Metadata which is useful for the portal manager distributions (self service) More information about this can be found here.

    extra options.png

    8. Click save and schedule and target as usual.

    bundle contents.png

     

     

    Information on Specific software packaging can be found in this article:

    Specific software packaging for Apple Macintosh

     

    References:

    Creating payload-free packages with pkgbuild | Der Flounder

    https://wiki.afp548.com/index.php/Guidelines_for_Mac_software_packaging

    Stupid tricks with pkgbuild | Managing OS X

    xcode - Making OS X Installer Packages like a Pro - Xcode4 Developer ID Mountain Lion ready pkg - Stack Overflow

    installer(8) Mac OS X Manual Page

    curl(1) Mac OS X Manual Page

    List of Common MIME Types and Their Corresponding File Extensions