Skip to content

Testing

Joe Workman edited this page Mar 15, 2021 · 3 revisions

Testing the workflow

SimpleMDM published a tutorial to setup a DEP sandbox environment. A JumpCloud Admin can employ the principles from that article to test out the macOS zero-touch deployment workflow using virtual machines VMWare Fusion, Parallels, or VirtualBox.

Running the MDM-Prestage-User-Enrollment workflow within a virtual machine is a relatively simple way to test the procedure without wiping and reinstalling macOS on a physical computer.

The Scripting OS X blog published a tutorial to download MacOS .app installers which can be used to install MacOS on a virtual machine.

Debugging

A number of steps are required for this workflow to run correctly and build the service account. If something isn't working, it's likely the case that one of the configured variables were set incorrectly or not all all. Debug logs are located in the /var/tmp/ directory for systems configured to run this workflow.

Quitting DEPNotify

Command-control-x should quit out of the fullscreen DEPNotify window should you need to exit and check the debug logs.

Included python tests

To verify that the required variables are set as expected. A test suite is included in this repository to verify the contents of the jumpcloud_bootstrap_template.sh and postinstall.sh scripts. If the the prestage user enrollment workflow is failing to start on a new system, running the tests can help identify points of failure.

If manually downloading the files from this repository, download the postinstall_verify.py, pue_verify.py and test_runner.py files into a directory. Within the test_runner.py script, change the location of the script variables to point to the jumpcloud_bootstrap_template.sh and postinstall.sh file locations respectively.

pue_verify.text_PUE.script = "../jumpcloud_bootstrap_template.sh"
postinstall_verify.text_POST.script = "../postinstall.sh"

If this repository is cloned with GitHub, open a terminal window, cd into the "support/zero-touch/prestage_user_enrollment/automation scripts" directory and run:

python3 test_runner.py

A run of the test suite with test failures is displayed below, In this example the ENROLLMENT_USER variable is missing from the postinstall script.

test results displaying a failure