Open-Sourcing Support of AWS ARM Instances with macOS 13 for GitHub’s Runner-Images

Kévin Darcel
bitso.engineering
Published in
2 min readSep 20, 2023

After detailing our migration of our iOS CI to AWS ARM instances here, we’re proud to share another achievement. We have now successfully open-sourced our customizations for creating AWS AMIs and contributed to GitHub’s official repository.

Key Highlight: Our contributions, which include support for macOS 13, are now accessible to all. Explore our changes here.

Our primary objective is to assist the wider community in CI/CD, especially when leveraging AWS and GitHub’s Self-Hosted Runners. We’re confident that our experiences can offer useful insights, making it easier for teams encountering similar obstacles.

We highly appreciate collaboration. We encourage everyone to review our contributions and to add their own. Your insights, refinements, or solutions only strengthen the community, fostering continual progress.

Getting Started with Bitso’s Contribution

Want to use our contribution? Here’s a quick guide:

  1. Clone the AWS Support Branch and Navigate to macOS Images Directory
git clone --branch aws-support git@github.com:bitso-oss/runner-images.git
cd runner-images/images/macos/

2. Set Environment Variables

Substitute placeholders with appropriate values.

export SOURCE_AMI_NAME='amzn-ec2-macos-13*'
export INSTANCE_TYPE=mac2.metal
export BUILD_ID=bitso-ec2-macos-13
export VM_USERNAME=ec2-user
export VM_PASSWORD=
export SSH_KEYPAIR_NAME=
export SSH_PRIVATE_KEY_FILE=
export GITHUB_API_PAT=
export XCODE_INSTALL_STORAGE_URL=
export XCODE_INSTALL_SAS=

3. Execute Packer Build

packer build \
-on-error=ask \
-color=true \
-var "source_ami_name=$SOURCE_AMI_NAME" \
-var "instance_type=$INSTANCE_TYPE" \
-var "build_id=$BUILD_ID" \
-var "vm_username=$VM_USERNAME" \
-var "vm_password=$VM_PASSWORD" \
-var "ssh_keypair_name=$SSH_KEYPAIR_NAME" \
-var "ssh_private_key_file=$SSH_PRIVATE_KEY_FILE" \
-var "github_api_pat=$GITHUB_API_PAT" \
-var "xcode_install_storage_url=$XCODE_INSTALL_STORAGE_URL" \
-var "xcode_install_sas=$XCODE_INSTALL_SAS" \
templates/macOS-13.arm64.aws.pkr.hcl

4. Note on the Apple TCC.db Issue

As highlighted in our previous post, you will need manual intervention during the `configure-machine.sh` step due to Apple’s TCC.db file. This requires direct macOS UI interaction using Remote Desktop and Screen Sharing app.

To our long-time followers, thank you for your ongoing support. For those just joining, we eagerly await your contributions and feedback. Together, we can enhance these tools, pushing the boundaries of CI/CD effectiveness and collaboration.

Until our next update, stay tuned!

--

--

Kévin Darcel
bitso.engineering

Passionate about tech, science, cars and space 🏎🔭⚙️ Eco responsable 🌱 ₿ Ξ