Added tart config

This commit is contained in:
fedor 2022-04-20 17:40:13 -04:00
parent 3d96c5f082
commit 2a3d22ac3f
4 changed files with 70 additions and 1 deletions

View File

@ -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.

36
Tart.md Normal file
View File

@ -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
```

16
config.pkr.hcl Normal file
View File

@ -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"
}
}
}

View File

@ -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"
},