From 2a3d22ac3f81e987abdab9131cfc8fbdd06599c9 Mon Sep 17 00:00:00 2001 From: fedor Date: Wed, 20 Apr 2022 17:40:13 -0400 Subject: [PATCH] Added tart config --- README.md | 8 ++++++++ Tart.md | 36 ++++++++++++++++++++++++++++++++++++ config.pkr.hcl | 16 ++++++++++++++++ templates/base.json | 11 ++++++++++- 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 Tart.md create mode 100644 config.pkr.hcl diff --git a/README.md b/README.md index 9daf229..59363f0 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,11 @@ See a full list of VMs available on Cirrus CI [here](https://cirrus-ci.org/guide ## Anka Please see [`Anka.md`](Anka.md) for details on how to build Anka VMs. + +## Parallels + +Please see [`Parallels.md`](Parallels.md) for details on how to build Parallels VMs. + +## Tart + +Please see [`Tart.md`](Tart.md) for details on how to build Tart VMs. diff --git a/Tart.md b/Tart.md new file mode 100644 index 0000000..d917c36 --- /dev/null +++ b/Tart.md @@ -0,0 +1,36 @@ +## Building Vanilla Image + +First, create a `monterey-vanilla` VM from the latest available IPSW with following command: + +```console +tart create --from-ipsw=latest monterey-vanilla +``` + +Start the VM and use UI to change some settings: + +```console +tart run monterey-vanilla +``` + +1. Disable Lock Screen. Preferences -> Lock Screen -> disable "Require Password" after 5. +2. Disable Screen Saver. +3. Enable Auto-Login. Users & Groups -> Login Options -> Automatic login -> admin. +4. Allow SSH. Sharing -> Remote Login +5. Open Safari. Preferences -> Advanced -> Show Developer menu. Develop -> Allow Remote Automation. +6. Run `sudo visudo` in Terminal, find `%admin ALL=(ALL) ALL` add `admin ALL=(ALL) NOPASSWD: ALL` to allow sudo without a password. + +Shutdown macOS. + +## Building Base Image + +```bash +packer build -only=tart templates/base.json +``` + +## Building Xcode Images + +```bash +packer build -only=tart \ + -var xcode_version="13.3" \ + templates/xcode.json +``` diff --git a/config.pkr.hcl b/config.pkr.hcl new file mode 100644 index 0000000..526cead --- /dev/null +++ b/config.pkr.hcl @@ -0,0 +1,16 @@ +packer { + required_plugins { + parallels = { + version = ">= 1.0.0" + source = "github.com/hashicorp/parallels" + } + tart = { + version = ">= 0.1.0" + source = "github.com/cirruslabs/tart" + } + veertu-anka = { + version = ">= v2.3.0" + source = "github.com/veertuinc/veertu-anka" + } + } +} diff --git a/templates/base.json b/templates/base.json index 9f379cf..c1a9c78 100644 --- a/templates/base.json +++ b/templates/base.json @@ -30,6 +30,15 @@ "ram_size": "8G", "disk_size": "80G", "boot_delay": "30s" + }, + { + "name": "tart", + "type": "tart-cli", + "vm_name": "{{ user `mac_os_version` }}-base", + "vm_base_name": "{{ user `mac_os_version` }}-vanilla", + "ssh_username": "admin", + "ssh_password": "admin", + "ssh_timeout": "120s" } ], "provisioners": [ @@ -42,7 +51,7 @@ }, { "inline": [ - "yes '' | ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"" + "yes '' | /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"" ], "type": "shell" },