timsutton / osx-vm-templates

macOS templates for Packer and VeeWee.
MIT License
1.12k stars 248 forks source link

Add VHD/Parallels HDD Support + README Overhaul #93

Closed americanhanko closed 3 years ago

americanhanko commented 6 years ago

This PR

Known Issues / Questions Before Merging

This has been a WIP for a while, so there might mistakes in here so keen eyes are appreciated.

timsutton-sl commented 6 years ago

Awesome! I'll just start adding comments as I slowly make my way through it.

jonanh commented 6 years ago
timsutton commented 6 years ago

Hey @americanhanko, sorry this continues to linger. Just wanted to let you know I didn't forget :)

americanhanko commented 6 years ago

No worries @timsutton! I've actually been thinking about closing since I think we both agree that we ought to work toward keeping ISO as the only source type...rather than having a slew of scripts to construct base VMs for the various hypervisors. I think the README updates are the most valuable part of this PR, so I'd be happy to close and re-open a new one that contains only information about the current workflow. Totally up to you.


@jonanh Sorry it's taken this long to respond to your comments (Tim's ping helped 👍).

I really like your ideas, particularly about having a single prepare_disk.sh utility that takes some parameters. I had originally had that design in mind but decided that a separate script was better in the interest of making an immediate impact. Depending on where @timsutton wants to take this, that script may or may not become a reality. I'm of the opinion that we should simplify the workflow as much as possible, even if that means taking a bit longer to get it there.

This thought of yours also struck a chord with me:

maybe we could do the provision with a single provisioner

After reading that, I started thinking about what it would look like to use a configuration management tool as the provisioner (e.g. Chef) with a user-configurable set of provisioning steps (Packer variables) that could replace the current script-driven workflow. I started working on an experimental branch (currently broken) that uses Chef as the provisioner. The final implementation of this would leverage a recipe (e.g. boxcutter.rb) that would be taken from the macOS cookbook.

My team will likely end up utilizing this approach anyway in a private fork since it fits so well with our infrastructure. The question is whether or not that approach is right for this repository. My feeling is the answer is probably not since it would mean any box build with this repo would have chef-client installed, as well as increasing this repo's dependencies. The benefit would be that, since the provisioning steps would be written in Ruby and well-tested, there would be an increase in provisioning flexibility, as well as creating an opportunity for CI.