Setting up Tart:

brew install cirruslabs/cli/tart
brew tap hashicorp/tap
brew install hashicorp/tap/packer

git clone https://github.com/motionbug/macad.uk2025.git
cd packer-templates

# Create a Variables File (my-config.pkrvars.hcl)
<!-- ------------- sample file -------------------

# -------------------------
# Packer Variables File
# -------------------------
# This file contains variable values for the apple-tart-tahoe.pkr.hcl template
# Usage: packer build -var-file="my-config.pkrvars.hcl" apple-tart-tahoe.pkr.hcl

# https://motionbug.com/updates-to-the-packer-template-now-with-macos-tahoe/

# VM Configuration
vm_name  = "26.2_vanilla"
ipsw_url = "/Users/adele/Documents/UniversalMac_26.2_25C56_Restore_2025-12-12.ipsw"

# Account Configuration
account_userName = "admin"
account_password = "admin"

# MDM Enrollment Configuration
enrollment_type    = "link"  # Options: "profile" or "link"
jamf_url           = "https://example.jamfcloud.com"
mdm_invitation_id  = "123456789012345678901234567890"

# Feature Toggles
enable_passwordless_sudo   = "true"
enable_auto_login          = "true"
enable_safari_automation   = "true"
enable_screenlock_disable  = "true"
enable_spotlight_disable   = "true"
enable_clipboard_sharing   = "false"

------ sample file ------- -->

<!-- Building the vanilla VM -->
packer init apple-tart-tahoe.pkr.hcl
packer validate apple-tart-tahoe.pkr.hcl
packer build -var-file="my-config.pkrvars.hcl" apple-tart-tahoe.pkr.hcl

<!-- For Troubleshooting -->
packer build -debug -var-file="my-config.pkrvars.hcl" apple-tart-tahoe.pkr.hcl

<!-- Clone your VM with Tart -->
tart list
tart clone <template> <new-vm-name>
tart set <new-vm-name> --display-refit --random-serial --random-mac
tart run <new-vm-name>

Resources:

Course Overview:

1 - Why Infrastructure Changes are Risky

  • What Is Infrastructure as Code?
  • Why Infrastructure Changes Are Risky

2 - Benefits of Infrastructure as Code

  • Benefits of IaC
  • What IaC Unlocks

3 - Implementing Infrastructure as Code

  • Picking an IaC Tool
  • Understanding Advanced Concepts

4 - How IaC Fits into DevOps

  • How IaC Benefits DevOps
  • How DevOps Benefits IaC