jamf / JamfSync

Jamf Sync utility for synchronizing between Jamf Pro distribution points and/or file folders
MIT License
34 stars 0 forks source link

JamfSync

Utility for transferring files between file folders, Jamf Pro file share distribution points and Jamf Pro JDCS2 distribution points and updating the packages on Jamf Pro servers.

Instructions

See JamfSync/Resources/Jamf Sync User Guide.pdf for help running Jamf Sync, or when running "Jamf Sync.app", click Help / Jamf Sync User Guide.

Features

Command line parameters

NOTE: Run JamfSync with no parameters first to add Jamf Pro servers and/or folders. Passwords for Jamf Pro servers and distribution points must be stored in the keychain in order to synchronize via command line arguments.

Usage: JamfSync [(-s | --srcDp) ] [(-d | --dstDp) ] [(-f | --forceSync)] [(-r | --removeFilesNotOnSource)] [(-rp | --removePackagesNotOnSource)] [-p | --progress] JamfSync [-h | --help] JamfSync [-v | --version]

-s --srcDp:        The name of the source distribution point or folder.
-d --dstDp:        The name of the destination distribution point or folder.
-f --forceSync:        Force synchronization of all files even if they appear to match on both the source and destination.
-r --removeFilesNotOnSource:        Delete files on the destination that are not on the source. No delete is done if ommitted.
-rp --removePackagesNotOnSource:        Delete packages on the destination's Jamf Pro instance that are not on the source. No delete is done if ommitted.
-p --progress:        Show the progress of files being copied.
-v --version:        Display the version number and build number.
-h --help:        Shows this help text.

NOTE: If a distribution point name is the same on multiple Jamf Pro instances, use "dpName:jamfProName" for the name.

Examples: "/Applications/Jamf Sync.app/Contents/MacOS/Jamf Sync" -srcDp localSourceName -dstDp destinationSourceName --removeFilesNotOnSource --progress "/Applications/Jamf Sync.app/Contents/MacOS/Jamf Sync" -s "JCDS:Stage" -d "JCDS:Prod" -r -rp -p "/Applications/Jamf Sync.app/Contents/MacOS/Jamf Sync" -s localSourceName -d destinationSourceName

Source Code Overview

The source code is located in several groups.

Model

The files in the Model group are used to keep track of and process data that is used.

ViewModels

The files in the ViewModels group are used to keep track of and process data that is used. Published variables will cause the assocated views to redraw.

UI

The files in the UI group are the SwiftUI files for the user interface. The data in DataModel is used to control the view. Anytime a property with @Published is changed, it will cause any views that use those fields to redraw.

Utility

The files in the Utility group are helper classes for processing data and don't have a direct connection to the UI.

Expanding the types of distribution points supported by JamfSync

It would be handy to add distribution points for direct cloud connections, like for Rackspace, Amazon Web Services, Akamai. The following would need to be done in order to support one of these:

Improvements needed yet

Contributing

To set up for local development, make a fork of this repo, make a branch on your fork named after the issue or workflow you are improving, checkout your branch, then open the folder in Xcode.

This repository requires verified signed commits. You can find out more about signing commits on GitHub Docs.

Pull requests

Before submitting your pull request, please do the following:

Contributors