Go to file
Nikolay Edigaryev 3e42cfa4a8
Automated vanilla image creation via VNC (#55)
* Automated vanilla image creation via VNC

* Require packer-plugin-tart >= 0.5.0

* Signify that vanilla.pkr.hcl is Monterey-specific

* Decrease VM disk sizes from 50 to 40 GB

* Require Tart Packer plugin 0.5.1

* Automated Ventura vanilla image creation from IPSW URL

* Template to automatically disable SIP in recovery mode

* Document where one can get an IPSW URL

* Enable passwordless sudo via SSH
2022-09-30 18:12:26 +04:00
templates Automated vanilla image creation via VNC (#55) 2022-09-30 18:12:26 +04:00
.gitignore install anka builder script 2018-04-16 13:58:47 -04:00
LICENSE Initial commit 2018-04-13 10:47:36 -04:00
README.md Passwordless sudo via sudoers.d (#53) 2022-09-14 14:48:04 +04:00

README.md

macOS Packer Templates for Cirrus CI

Repository with Packer templates to build Tart VMs to use with Cirrus CI.

  • macos-{monterey,ventura}-vanilla image nothing pre-installed
  • macos-{monterey,ventura}-base image has only brew pre-installed
  • macos-{monterey,ventura}-xcode:N image is based of macos-{monterey,ventura}-base and has Xcode N with Flutter pre-installed

See a full list of VMs available on Cirrus CI here.

Building Vanilla Image

First, create a ventura-vanilla VM from the latest available IPSW with following command:

tart create --from-ipsw=latest --disk-size=25 ventura-vanilla

Start the VM and use UI to change some settings:

tart run ventura-vanilla
  1. Disable Lock Screen and Screen Saver. Preferences -> Lock Screen -> disable first three settings.
  2. Enable Auto-Login. Users & Groups -> Automatic log in as... -> admin.
  3. Allow SSH. General -> Sharing -> Remote Login & Screen Sharing
  4. Display -> Advanced -> Prevent from sleeping
  5. Open Safari. Preferences -> Advanced -> Show Developer menu. Develop -> Allow Remote Automation.
  6. (Optional, depends on your needs) Disable SIP. Run tart run --recovery ventura-vanilla -> Options -> Utilities menu -> Terminal -> csrutil disable.
  7. Enable passwordless sudo:
    1. Run sudo visudo /private/etc/sudoers.d/admin-passwordless in Terminal.
    2. Add admin ALL = (ALL) NOPASSWD: ALL to allow sudo without a password.
    3. :wq to write the file and quit.
    4. sudo some command to verify no password is needed.

Shutdown macOS.

Building Base Image

packer build templates/base.pkr.hcl

Building Xcode Images

packer build -var xcode_version="14-beta-5" templates/xcode.pkr.hcl