DroidsOnRoids/osx-box-bootstrap

Name: osx-box-bootstrap

Owner: Droids On Roids

Description: Bitrise OS X Virtual Machine bootstrap scripts

Forked from: bitrise-io/osx-box-bootstrap

Created: 2017-08-30 00:06:05.0

Updated: 2017-08-30 00:06:08.0

Pushed: 2017-09-07 13:22:43.0

Homepage:

Size: 19966

Language: HTML

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

README

With this setup you can create a vagrant base OS X VM / box.

This setup should be compatible with most Virtual Machine tools / hypervisors supported by vagrant, like VirtualBox, Parallels or vSphere, only the packaging depends on the actual tool.

You can find tool specific setup & packaging instructions below.

Table of Content:

  1. Request a tool to be pre-installed
  2. Create VM & OS X installation
    • how to create the base VM & install a vanilla OS X
  3. Provisioning
    • how to prepare the required OS X environment, with preinstalled tools, based on a vanilla OS X installation
  4. Packaging
    • how to save the create VM in a vagrant ready box format, which can then be simply used with vagrant
Request a tool to be pre-installed

If you'd like to add a tool to be pre-installed you can create a Pull Request, adding your changes to the playbook.yml (Ansible playbook) of this repository. Please also add a related test/report to the system_report.sh file, which is used to test & list the pre-installed tools.

If you want to add a weekly cache update script, you should do that in weekly-cache-update-playbook.yml. This should not change any pre-installed tool version, nor should it install any new tool; the weekly cache update should only update already installed tools' caches, for example the CocoaPods or brew spec caches.

When a new version of this stack is available on bitrise.io we'll run system_report.sh and post the result into the bitrise.io GitHub repository, under the system_reports folder.

We're still working on proper Pull Request checks, if your PR checks would fail there's probably no issue at all, we'll let you know if you have to change anything.

Create VM & OS X installation
VMware vSphere specific
Disable macOS SIP (System Integration Protection) in vSphere

If you can't hit Command+R fast enough when the VM boots (you most likely can't):

Click on VM and select tab Summary and then under VM Hardware -> Edit Settings: VM Options: Boot Options: Boot Delay Enter 10000 as milliseconds ( 10 seconds ).

Start the VM, open it's tab/window, click into (just to be sure it has keyboard focus), and start keep holding Command+R. VMware boot menu will appear - you should still keep holding Cmd+R, while also hit Enter to select the default “Boot normally” option. Once the Apple logo and the boot loading progress bar appears you can release Command+R, and macOS will boot into Recovery mode.

Restore the boot delay to 0 once you manage to boot into Recovery mode!

Source: http://apple.stackexchange.com/a/237693/86977

Parallels specific [no longer maintained]

We used this setup for quite a long time, but not anymore, and so this setup is no longer actively maintained. Feel free to extend this guide if you have more information / if the guide is not up-to-date anymore.

VirtualBox specific [experimental / not maintained]

Experimental: we don't actively use this configuration. This guide was created for VirtualBox 4.x, might or might not work with 5.x . Feel free to extend this guide if you have more information / if the guide is not up-to-date anymore.

Some notes for experimenting with VirtualBox based OS X VMs:

Important Note

VirtualBox's snapshot rollback doesn't start the VM if the snapshot was taken when the VM was running. Parallels does this (turns the VM on even if it's not running when you roll back to the snapshot) but VirtualBox does not, you have to ensure the VM is turned on.

OS X Install guide (common)

Once installed:

Provisioning
Install Xcode - can be saved as an intermediate template
Final steps: Run auto setups, with ansible

NOTE: you should call the bitrise commands from a tmux session, to make it easier to manage the process, as some of the steps take quite some time.

Xamarin notes

Note: the Xamarin stack can be built on top of an already provisioned Xcode stack/template. Just clone the provisioned Xcode template, do the Xamarin specific bits, and that's all.

Update Xamarin components in this repository

Update NUnit

Update Xamarin Components

Install Xamarin Platform on the VM

To add the Xamarin specific bits you should also run this, after you ran the previous steps: bitrise run provision-xamarin-vm

Layout of this repository
OS X version notes

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.