Hacker News new | ask | show | jobs
by hinkley 2210 days ago
I don't care though. What I care about is that it's a pain in the butt to do CI/CD pipelines for an application with iOS/OSX support. So if someone has a headless OS X contraption on offer, I want to hear some more about it.

The last time I set this up, a manager decided he wanted a laptop like the rest of us instead of the iMac he got. He asked semi-jokingly if someone wanted the machine for anything and I said "Yes, I do" before he even got the sentence out.

There was just enough memory on the machine for me to set up a few Jenkins agents on it, one for Safari, the rest using the Selenium-maintained docker images.

4 comments

> So if someone has a headless OS X contraption on offer, I want to hear some more about it.

This project relies on OSX-KVM, which is a thing that already exists. The dockerization of that project (what this post is about) is a gimmick as described by GP.

I was so excited when I read:

> This Dockerfile automates the installation of OSX-KVM inside a docker container.

Except it automates the fetching of the macOS installation media and launching qemu, which is exactly what OSX-KVM already does. [1] This project does nothing additional to automate the actual installation of macOS inside the VM.

I wish Apple supported installation automation like Microsoft does with sysprep (or Linux with kickstart/preseed). The best I've found is Arduino USB devices that pretend to be a keyboard and mouse to manually advance the installer, which is super lame "automation"

[1] https://github.com/kholia/OSX-KVM/blob/master/OpenCore-Boot....

> This project does nothing additional to automate the actual installation of macOS inside the VM.

This one does https://github.com/myspaghetti/macos-virtualbox

Not fully, not perfectly, but does. It periodically asks you to press enter and wait.

> The best I've found is Arduino USB devices that pretend to be a keyboard and mouse to manually advance the installer, which is super lame "automation".

Definitely not great as an actual process, but this sounds like a super cool project!

I don’t see any requirement for Apple to provide such functionality. This is simply because all Apple devices come with an OS preinstalled.

And you have tools like Jamf for any enterprise fleet management needs

> So if someone has a headless OS X contraption on offer, I want to hear some more about it.

you still legally need to run it on an actual Mac due to Apple's terms of service though... so is there really a lot gained ?

If a tree falls in a forest and no one is around to hear it, does it make a sound?
If we are going to divert into Zen koans and non-dual philosophies, then it is definitively "yes it did". The falling away of the perception of an intrinsicly-existing self doesn't change that there's still perception. It would make a sound the same way there is a sound made when one hand claps.

Back on topic though: it's too bad Apple doesn't allow licenses for running things headlessly like this.

>Back on topic though

You over-philosophized to the point of bringing their kitschy koan off-topic.

How I interpreted the use of the koan : Apple has no history of legally chasing those who virtualize their operating system; as this is a non-topic thusfar -- who cares?

The hammer may fall one day, but so far 'why are we worried about a legal response that doesn't seem to exist?'.

The answer, of course, is that anyone who builds product based on a legally grey area is at risk when that area begins to crumble.

>it's too bad Apple doesn't allow licenses for running things headlessly like this.

agreed, but I think Apple wants to drive everyone to a hardware solution.

At one point 'enterprise-ish' hardware was offered, but now it seems that it'd be in their interest to offer virtualization licenses while trying to smooth out whatever troubles exist between their software and the major VM hyper-visor offers out there -- mostly since there are huges holes in their hardware offerings for those seeking to do 'enterprise-ish' things en masse.

Apple has no history of legally chasing those who virtualize their operating system

Maybe not macOS yet. But the definitely chased people who virtualized iOS:

https://www.macrumors.com/2019/08/15/apple-corellium-copyrig...

I'd interpret that koan to mean that those in isolated woods can make noise without being heard.

Say I have a personal project with a few dozen users. Somebody reports a bug on osx -- I don't do windows, I don't do macs, so I'd need to rely on my small community to fix it. With a pirate copy, I'd be able to do the fix -- and none would be the wiser.

Scale that up to a company, put it up on a public repo's CI, and that's when people might hear the tree fall.

There is if you're running Linux, like you might be if macOS dropped support for your hardware.
With 40 years of Apple development under my belt, I can safely say that Apple used to be great about supporting older hardware.

When they were on rough times, everyone understood about needing to break compatibility with old hardware (that nobody really cared about anyway because, despite it's horrendous price, was super obsolete due to the rate of Moore's law back then). But nowadays, Apple is invalidating old hardware platforms for superfluous reasons, like abandoning 32-bit apps, enforcing their OEM cryptographic authority (with T2 chip) and getting into it with nVidia (granted nVidia screwed up big time with those GPU chips that blow) or more recently, getting into it with Intel (which has caused agonizing supply-chain issues for Apple). They are no longer that good about helping people support Linux either --you would think that when they deprecate a machine, they would at least have the decency to open source all of its drivers...(and have pre-negotiated the legal rights to do so).

That is exactly what I was thinking of. I don't want to buy dedicated hosts from MacStadium. I got native iOS builds and Unity buidls that would work well with this. Isolation is not as big of a concern.

I too would like to hear if anyone has been able to pull this off.

EDIT: And what about licensing?

Licensing is impossible if you don't run this on Apple hardware. The macOS license only allows you to install and run macOS on devices that came with it and this includes virtualization.

However, if you buy a Mac, install Linux and use it to run the pipelines, that'd be strictly legal I believe.

> However, if you buy a Mac, install Linux and use it to run the pipelines, that'd be strictly legal I believe.

I'm in this boat, so there's a market for it.

If we put aside the licensing issues, isn't QEMU notoriously slow? Building iOS apps seems pretty slow even on a high-end MBP, so I'd be curious how long it took under QEMU.

Still, very interesting idea!

Qemu Is a bit slow when doing full system virtualization.

Qemu-kvm however is insanely fast as it offloads most of the actual virtualization to KVM and to the native virtualization instruction set .

> isn't QEMU notoriously slow

No! Major cloud providers use it to provide VMs with basically zero overhead.