Skip to content

Deployment Strategies

BigMac Admin edited this page Dec 7, 2023 · 10 revisions

There are many ways to configure Renew to behave right for your environment. This page is meant to show examples of how to use the configuration profiles to change the behavior to suit your needs.

Please see the Required Arguments and Optional Arguments pages for details on all available keys and what they do.

Jamf users can find the JSON schema in this repository: https://github.com/Jamf-Custom-Profile-Schemas/ProfileManifestsMirror

Configuring Required Arguments

Friendly Style

<key>RequiredArguments</key>
<dict>
	<key>MaximumDeferrals</key>
	<integer>9999</integer>
	<key>UptimeThreshold</key>
	<integer>14</integer>
	<key>NotificationThreshold</key>
	<integer>9999</integer>
	<key>DeferralDuration</key>
	<integer>23</integer>
</dict>

This option set would limit renew to only ever use the macOS Notification Center, and never enter Normal Mode or Aggressive Mode. Users would be notified once their computer has been online for 14+ days, and will only be notified once every 23 calendar hours.

Neutral Style

<key>RequiredArguments</key>
<dict>
	<key>MaximumDeferrals</key>
	<integer>6</integer>
	<key>UptimeThreshold</key>
	<integer>10</integer>
	<key>NotificationThreshold</key>
	<integer>2</integer>
	<key>DeferralDuration</key>
	<integer>6</integer>
</dict>

This option set would result in users getting two Notification Center events and then four Normal Mode events before then entering Aggressive Mode (Notification events and Normal Mode events both add towards the Maximum Deferrals which is set to 6.) Users would be notified once their computer has been online for 10+ days, and Renew events would trigger every 6 calendar hours.

Strict Style

<key>RequiredArguments</key>
<dict>
	<key>MaximumDeferrals</key>
	<integer>2</integer>
	<key>UptimeThreshold</key>
	<integer>14</integer>
	<key>NotificationThreshold</key>
	<integer>1</integer>
	<key>DeferralDuration</key>
	<integer>2</integer>
</dict>

This option set is an example of strict settings which would probably result in a poor user experience. Once a device with this configuration has an uptime of 14+ days, the user will receive 1 Notification Center event, followed by 1 Normal Mode event 2 hours later, followed by Aggressive Mode 2 hours after that.

Configuring Optional Arguments

You can pass any command supported by SwiftDialog by either settings the key provided by Renew or by including them in an "Additional Options" key.

See this page for specific details on what keys are available, or review the examples below.

Neat and Tidy

<key>OptionalArguments</key>
<dict>
	<key>AdditionalDialogOptions</key>
	<string>--width 300 --height 400 --messagefont size=15 --position topright --ontop --messagealignment centre </string>
	<key>AdditionalNormalOptions</key>
	<string>--moveable</string>
	<key>MessageIcon</key>
	<string>SF=restart.circle</string>
	<key>RestartButtonText</key>
	<string>Restart Now</string>
	<key>DeferralButtonText</key>
	<string>Later...</string>
	<key>NoDeferralsRemainingButtonText</key>
	<string>Later...</string>
</dict>

This option set will resize the Renew dialog window to be much smaller and make it appear in the top-right corner. It sets the icon to an SF Symbol with default coloring, and it changes the language on the buttons to accomodate the smaller size. It also allows the window to be moveable, but only when Renew is in Normal Mode.

You likely want to adjust the font face and size as well, and this size window looks great with a banner image tailored to the same size.

Using Different Options for Normal vs. Aggressive Mode

<key>OptionalArguments</key>
<dict>
	<key>AdditionalDialogOptions</key>
	<string>--ontop</string>
	<key>AdditionalNormalOptions</key>
	<string>--moveable --messagefont size=15</string>
	<key>AdditionalAggressiveOptions</key>
	<string>--messagefont size=15,color=red</string>
</dict>

This is an example of how layer the various options to get a desired effect. In this example, the --ontop option will apply to both Normal and Aggressive mode windows as well as the --messagefont size=15, while the --moveable option will only apply to Normal Mode windows, and --messagefont size=15,color=red will apply only to Aggressive Mode.

Because I want to pass the font size option to both Normal and Aggressive mode windows, but I want to pass the font color option only to Aggressive mode, I have to repeat the --messagefont size=15 argument in both keys.

This is because dialog --messagefont size=15 --messagefont color=red is not a supported manner to pass arguments to SwiftDialog.

Deadline Mode

<key>RequiredArguments</key>
<dict>
	<key>MaximumDeferrals</key>
	<integer>-1</integer>
	<key>UptimeThreshold</key>
	<integer>27</integer>
	<key>NotificationThreshold</key>
	<integer>2</integer>
	<key>DeferralDuration</key>
	<integer>8</integer>
</dict>
<key>OptionalArguments</key>
<dict>
    <key>Deadline</key>
    <integer>30</integer>
</dict>

In this example we have disabled the Maximum Deferral count and set the optional Deadline key. Once this device has an uptime of greater than 27 days the user will receive 2 Notification Center events at least 8 hours apart. Then they will receive a normal mode dialog event every 8 hours until their uptime reaches 30 days+. Once the device has an uptime of over 30 days (and the current deferral duration has elapsed) the user will get an Aggressive Mode dialog event.

Combining Optional and Required Arguments to Fit Your Needs

"You Wouldn't Like Me When I'm Angry" Style

<key>RequiredArguments</key>
<dict>
	<key>MaximumDeferrals</key>
	<integer>6</integer>
	<key>UptimeThreshold</key>
	<integer>14</integer>
	<key>NotificationThreshold</key>
	<integer>4</integer>
	<key>DeferralDuration</key>
	<integer>8</integer>
</dict>
<key>OptionalArguments</key>
<dict>
	<key>AdditionalDialogOptions</key>
	<string>--ontop</string>
	<key>AdditionalNormalOptions</key>
	<string>--moveable --width 300 --height 400 --messagefont size=15 --position topright --ontop --messagealignment centre </string>
	<key>AdditionalAggressiveOptions</key>
	<string>--messagefont size=15,color=red --blurscreen</string>
</dict>

In this example, a device that is has an uptime past 14+ days would begin getting Notification Center events every 8 hours. The user would get 4 of these events, and then 2 Normal Mode events with a neat and tidy window off to the side. The Normal Mode window can be moved. If the device still hasn't rebooted 8 hours after the 2nd Normal Mode event, it will go Hulk..err... Aggressive Mode and have a large window with a blurred background and no option but to click the "Restart Now" button.

Note: Clicking the "Restart Now" button does not immediately force restart the computer. It initiates the Restart sequence the same as if a user clicked the option from the Apple menu. There is a 30 second timer countdown window which can be cancelled, but if a Restart is selected then applications with autosave would autosave and applications that require user action to save documents would pause the restart sequence and allow users to save their work.

This also means that a user can click "Restart Now" and choose not to let the restart happen, in which case they'll get another Aggressive Mode event 30 minutes later (assuming you use the standard LaunchAgent.)