Files
fleet/tools/tuf/test/Nudge-auto-update-test-guide.md
T
Lucas Manuel Rodriguez d256bfdc71 Add arm64 support for fleetd extensions and fixes on test scripts (#31084)
This was required to test https://github.com/fleetdm/fleet/pull/30864 on
Apple Silicon.

I've created https://github.com/fleetdm/fleet/issues/31092 for tracking
purposes.

Fixes:
- Build univeral binary extension on macOS to test on VMs without
Rosetta.
- Add support for linux and Windows arm64. Which is also needed to test
Linux and Windows on UTM on Apple Silicon.
- Add Linux arm64 & Windows arm64 to the test scripts.

---

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [X] Added/updated automated tests
- [X] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [X] Make sure fleetd is compatible with the latest released version of
Fleet (see [Must
rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md)).
- [x] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [x] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [x] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
2025-07-21 15:47:59 -03:00

2.9 KiB

Nudge auto-update test guide

Setup

To test Nudge auto-updates, first setup your local environment for testing Orbit. This guide assumes a macOS device set up according to the README, where we'll run most of the commands, TUF server, Orbit and the Fleet server.

Add Nudge to TUF repo

The process for adding Nudge to the TUF repo is similar to the process for adding new versions of Orbit, osqueryd, or Fleet Desktop.

# Generate nudge app bundle.
make nudge-app-tar-gz version=1.1.10.81462 out-path=.

# Push the nudge target as a new version
./tools/tuf/test/push_target.sh macos nudge nudge.app.tar.gz 1.1.10.81462

Verify Nudge installation locally

Confirm that your Fleet server settings for app_config.mdm.macos_updates.minimum_version and app_config.mdm.macos_updates.deadline are empty and restart the Fleet server if necessary.

Run the fleet-osquery installer generated for your local environment. After Orbit has launched, wait for Orbit to perform any necessary updates for Orbit, osqueryd, or Fleet Deskotp. You can find the locally installed files at opt/orbit/bin/.

At this point, Nudge should not be installed. Try launching Nudge in demo mode to confirm.

opt/orbit/bin/nudge/macos/stable/Nudge.app/Contents/MacOS/Nudge -demo-mode

Next, edit your Fleet server configuration to set app_config.mdm.macos_updates.minimum_version and app_config.mdm.macos_updates.deadline. The specific settings don't matter here so long as they are valid (i.e. mimumum version follows the "13.0.1" pattern and deadline follows the "2023-12-31" pattern).

At the next update interval, Orbit should download and install Nudge. After 30-60 seconds, try again to launch Nudge in demo mode and check the version by clicking the info icon in the upper left corner of the Nudge window.

Logs

Orbit logs can be found locally at private/var/log/orbit.

Troubleshooting

Trouble generating nudge-app-tar-gz

The make nudge-app-tar-gz script was written to be compatible with the current Nudge release as of the time of this writing (version 1.1.10.81462). Note that this script may require modification to work with prior releases of Nudge that use different paths for the package. In such cases, the script will raise an error stating that a file was not found at the expected path.

For example, the script needs "Applications/Utilities" to be added certain paths as shown below in order for it to work with version 1.1.7.81411.

	$(TMP_DIR)/nudge_pkg_payload_expanded/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge --version
	tar czf $(out-path)/nudge.app.tar.gz -C $(TMP_DIR)/nudge_pkg_payload_expanded/Applications/Utilities/ Nudge.app

The change above was observed to work with several other prior versions tested as well. In other cases, you may need to inspect the directory structure of the expanded package and tweak the script accordingly.