mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
Tools: Choose Enrollment VM base image using environment variable (#18070)
Good for running out older versions of macOS during an semi-automated test
This commit is contained in:
parent
13f4703f01
commit
1cb670a3c1
2 changed files with 6 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ The script takes no arguments, but can be configured through three environment v
|
|||
- `FLEET_ENROLL_SECRET` (required) The fleet enrollment secret
|
||||
- `FLEET_URL` (required) The fleet base url
|
||||
- `MACOS_ENROLLMENT_VM_NAME` (optional) The name of the VM. If nothing is specified, the default name is `enrollment-test`.
|
||||
- `MACOS_ENROLLMENT_VM_IMAGE` (optional) The image to use for the VM. If nothing is specified, the default image is `ghcr.io/cirruslabs/macos-sonoma-base:latest`
|
||||
|
||||
The entire process from the generation of the `pkg` file to the installation is automated. The only part that requires user intervention is installing the MDM profile.
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,13 @@ set -m
|
|||
# Fleet enroll secret placed in $FLEET_ENROLL_SECRET
|
||||
# Fleet URL placed in $FLEET_URL
|
||||
# Optional VM name in $MACOS_ENROLLMENT_VM_NAME
|
||||
# Optional VM image in $MACOS_ENROLLMENT_VM_IMAGE
|
||||
# For others see https://tart.run/quick-start/
|
||||
# - ghcr.io/cirruslabs/macos-ventura-base:latest
|
||||
# - ghcr.io/cirruslabs/macos-monterey-base:latest
|
||||
|
||||
vm_name="${MACOS_ENROLLMENT_VM_NAME:-enrollment-test}"
|
||||
image_name="ghcr.io/cirruslabs/macos-sonoma-base:latest"
|
||||
image_name="${MACOS_ENROLLMENT_VM_IMAGE:-ghcr.io/cirruslabs/macos-sonoma-base:latest}"
|
||||
|
||||
alias ssh_cmd="sshpass -p admin ssh -o \"StrictHostKeyChecking no\" admin@\$(tart ip $vm_name)"
|
||||
alias ssh_interactive_cmd="sshpass -p admin ssh -o \"StrictHostKeyChecking no\" -t admin@\$(tart ip $vm_name)"
|
||||
|
|
|
|||
Loading…
Reference in a new issue