{"id":43980743,"url":"https://github.com/macadmins/ddm_testing","last_synced_at":"2026-02-07T09:02:43.572Z","repository":{"id":242988361,"uuid":"811144368","full_name":"macadmins/ddm_testing","owner":"macadmins","description":"Repo for working with MAOS-hosted test servers","archived":false,"fork":false,"pushed_at":"2025-07-13T20:54:22.000Z","size":53,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-14T16:36:51.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macadmins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-06T02:56:47.000Z","updated_at":"2025-07-18T01:30:37.000Z","dependencies_parsed_at":"2024-06-10T06:46:42.674Z","dependency_job_id":"577b2438-8076-48b0-9e0d-2e9b36bd4690","html_url":"https://github.com/macadmins/ddm_testing","commit_stats":null,"previous_names":["macadmins/ddm_testing"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/macadmins/ddm_testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macadmins%2Fddm_testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macadmins%2Fddm_testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macadmins%2Fddm_testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macadmins%2Fddm_testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macadmins","download_url":"https://codeload.github.com/macadmins/ddm_testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macadmins%2Fddm_testing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29190842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-07T09:02:42.867Z","updated_at":"2026-02-07T09:02:43.562Z","avatar_url":"https://github.com/macadmins.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ddm_testing\n\nFollow the directions below for getting started with your MAOS-hosted NanoHUB test server.\n\n\u003e [!CAUTION]\n\u003e 🚨🚨🚨 This is an UNSECURE setup. Only enroll machines where you won't lament losing data 🚨🚨🚨\n\n### Initial setup\n\nDownload and install the nanohubctl binary\n\n * Download nanohubctl - https://github.com/macadmins/nanohubctl/releases/tag/1.0.8\n * Extract it and install it:\n ```\n  unzip nanohubctl-darwin-arm64-1.0.8.zip\n  xattr -r -d com.apple.quarantine ./nanohubctl-darwin-arm64-1.0.8/nanohubctl-darwin-arm64\n  sudo mv ./nanohubctl-darwin-arm64-1.0.8/nanohubctl-darwin-arm64 /usr/local/bin/nanohubctl\n  rm -rf nanohubctl-darwin-arm64-1.0.8\n ```\n\nFor the initial setup, clone this repo, cd into it and clone the repo shown below\n\n```bash\ngit clone https://github.com/macadmins/ddm_testing.git\ncd ddm_testing\ngit clone https://github.com/macadmins/ddm_examples.git\n```\n\nLet's setup our environment as well\n\n```bash\n# This should be the base url to nanohub, Example: https://nanohub.example.com/\nexport NANOHUB_URL=\"https://$YOUR_SERVER_HERE\"\nexport NANOHUB_API_KEY=\"$YOUR_API_KEY\"\n```\n\nPut your assigned info where the placeholders are. For instance, if you have instance `ddm42`, your export line for BASE_URL would be:\n\n```bash\nexport BASE_URL=\"https://nanohub42.macadmins.io\"\n```\n\nLet's confirm our keys and BASE_URL are setup correctly by listing all declarations on the server:\n\n```bash\nnanohubctl ddm declarations\n[] # This makes sense because we've not added any declarations yet\n```\n\nWith this you should now have communication with the MAOS NanoHUB server!\n\n#### Enroll a test vm into your MDM server\n\nThe easier way to get started with a vm is using tart, but feel free to use whatever you prefer. See [Tart Quickstart](tart_quickstart.md) for more info.\n\n- Copy the provided enroll_$NANOHUB.mobileconfig onto your VM and install it.\n- Confirm there is stuff happening using `sudo log stream --info --debug --predicate 'subsystem == \"com.apple.ManagedClient\"'`\n\nLastly, grab your test VM's MDM UDID as we will need this for all DDM opertaions. The rest of this guide will assume the `NANOHUB_CLIENT_ID` env var is set to this ID. If the UUID is incorrect at any point moving forward, it will cause things to look like they are not working. Be 💯 sure it is correct.\n\nFor NanoHUB, the MDM UDID is the same as the hardware UUID. A couple easy ways to get this UUID on macOS:\n\n- grab it from the the server logs. Check the testing channel on Slack for directions on getting the server logs.\n- On the Mac hold the Option key, click the Apple menu in the upper left of the screen, and choose the first menu item \"System Information...\" It'll be listed toward the bottom the screen that was just opened.\n\n```bash\nexport NANOHUB_CLIENT_ID=$YOUR_VM_UUID_HERE\n\n# Confirm the ID matches the server logs for the enrollment\necho $NANOHUB_CLIENT_ID\n```\n\n#### Using ddm_examples\nWithin your working directory, run the following command to apply all examples from ddm_examples:\n\n```bash\nnanohubctl ddm sync ./ddm_examples\n```\n\nThis script will apply everything in the ddm_examples folder. Note that is uses the environment variables from above (which can also be supplied as args).\n\nIf you run it a second time, you'll see that everything has already been applied on the server side:\n\n```bash\nnanohubctl ddm sync ./ddm_examples\n```\n\nNow you can make incremental changes and sync them to the repo. Notably when changes occur, nanohub should also notify any devices which have the declarations and trigger them to apply the changes.\n\n#### Put the test vm into a set\n\nSets are a kmfddm abstraction of the DDM protocol. Think of a set as a Munki manifest. For a client to get the declarations applied to it, you must configure the machine to be a part of a set.\n\nLet's do that now.\n\nConfirm the machine does not have anything assigned to it yet:\n\n```bash\nnanohubctl ddm device sets\nnull\n```\nAdd your machine to the default set and confirm it now shows up:\n```bash\nnanohubctl ddm device add default\nCA75397A-A557-59C8-B48C-59394256E22C has been added to default\n\nnanohubctl ddm device sets\n[\n        \"default\"\n]\n```\nNow that the machine has been assigned to an enrollment set, we can look at the debug server logs and see all the raw DDM status items coming back as well as current DDM config status. Check out https://dozzle.macadmins.io for the raw logs (ask [Nate](https://github.com/natewalck) for access)\n\nNow that we know how to apply a machine to a set and confirm the set has been applied to the client, go crazy! Make new sets in ddm_examples by copying sets/set.template.txt and naming it set.YOURNAME.txt.\n\nCreate new declarations in ddm_examples and run the `nanohubctl ddm sync` command like above.\n\nIf you've found an interesting test that others might want to share, feel free and encouraged to submit that as PR to the [ddm_examples repo](https://github.com/macadmins/ddm_examples)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacadmins%2Fddm_testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacadmins%2Fddm_testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacadmins%2Fddm_testing/lists"}