From 3e713affb9bdd17c2e4ee6bbd76aa8c5ac68fd7f Mon Sep 17 00:00:00 2001 From: Amit Karsale Date: Tue, 28 Nov 2023 14:23:10 +0530 Subject: [PATCH] (vanagon-237) Add platform definition to vanagon --- CHANGELOG.md | 3 +++ lib/vanagon/platform/defaults/osx-14-arm64.rb | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 lib/vanagon/platform/defaults/osx-14-arm64.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 8be9530d..8d94792e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ This project adheres to [Semantic Versioning](https://semver.org). This changelog adheres to [Keep a CHANGELOG](https://keepachangelog.com). ## [Unreleased] +### Added +- (VANAGON-237) Add macOS 14 (ARM) platform definition to vanagon + ### Added - (VANAGON-236) Add macOS 14 (Intel) platform definition to vanagon diff --git a/lib/vanagon/platform/defaults/osx-14-arm64.rb b/lib/vanagon/platform/defaults/osx-14-arm64.rb new file mode 100644 index 00000000..eb3cb486 --- /dev/null +++ b/lib/vanagon/platform/defaults/osx-14-arm64.rb @@ -0,0 +1,24 @@ +platform 'osx-14-arm64' do |plat| + plat.brew '/opt/homebrew/bin/brew' + plat.servicetype 'launchd' + plat.servicedir '/Library/LaunchDaemons' + plat.codename 'sonoma' + + plat.provision_with 'export HOMEBREW_NO_EMOJI=true' + plat.provision_with 'export HOMEBREW_VERBOSE=true' + plat.provision_with "export HOMEBREW_NO_ANALYTICS=1" + + plat.provision_with 'sudo dscl . -create /Users/test' + plat.provision_with 'sudo dscl . -create /Users/test UserShell /bin/bash' + plat.provision_with 'sudo dscl . -create /Users/test UniqueID 1001' + plat.provision_with 'sudo dscl . -create /Users/test PrimaryGroupID 1000' + plat.provision_with 'sudo dscl . -create /Users/test NFSHomeDirectory /Users/test' + plat.provision_with 'sudo dscl . -passwd /Users/test password' + plat.provision_with 'sudo dscl . -merge /Groups/admin GroupMembership test' + plat.provision_with 'echo "test ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/username' + plat.provision_with 'mkdir -p /etc/homebrew' + plat.provision_with 'cd /etc/homebrew' + plat.provision_with 'createhomedir -c -u test' + plat.provision_with 'su test -c \'echo | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"\'' + plat.vmpooler_template 'macos-14-arm64' + end