Bazel with Orka?

Hi! Our team transitioned to Orka on M2, from Intel Mac on prem, for our iOS CI/CD with Jenkins. Getting on Orka has been a huge improvement in both Mac management and speed.! But our organization is continuing to grow and we’re looking at moving to Bazel Build to help optimize and reduce our CI costs.

We got some advice from some Bazel experts that using VM’s with bazel is “harder” and barre metal machines could actually be better working with Bazel. My team is currently evaluating how we might integrate Bazel with orka, possibly with remote build caching solution like Build Buddy.

Does anyone have any real world experience using Bazel with MacStadium Orka? Any case studies or walkthroughs could be helpful. Thanks!

2 Likes

@mpulsipher or @jasondavis do you have insights here that could help @mike.quinn?

Hi @mike.quinn!

We have had good success working with Build Buddy, and our team is doing a bit more analysis with Bazel and Orka. From our general experience, setting up and configuring Bazel overall has complexities due to the caching and incremental builds it generates, but it’s not clear that there are further challenges integrating it into Orka when compared to bare metal. Would you mind connecting us with some of the Bazel experts you were speaking with?

I appreciate the feedback from yourself and other customers on this, and we aim to have some more material on this topic in the coming weeks.

-Jason

1 Like

Mike!
I’m a sales engineer with MacStadium and I’ve been working on integrating various CI/CD tools/solutions with Orka. I’ve most recently been working with getting Bazel setup and working as a caching solution. I was able to get it up and running using an internal to Orka Mac VM to host the cache but it should also be doable with linux or another solution with a bit of tweaking. It was fairly straight forward to get running with Bazelisk and Homebrew on the Orka VM.

The virtual machine will need Xcode installed, as well as Homebrew. Using homebrew I installed Bazelisk and Openjdk. The VM was also configured to allow auto-login.

I also cloned the bazel buildfarm repository into the host machine from GitHub - bazelbuild/bazel-buildfarm: Bazel remote caching and execution service

You should be able to spin up a VM to serve as the Bazel server by spinning up a VM with the above setup and launching it with port 8980 available. This can be done using Orka 3.0 with 'orka3 vm deploy --image --ports 8980:8980

You’ll need to setup the workers/client based on what your needs are but the above will get the server ready.

As for other options, aside from a VM within the Orka cluster, you should be able to configure a Linux VM to operate much the same way either over a site to site tunnel or a MacStadium Linux server that can communicate with your Orka deployment once those are released. We’re currently ramping up a new services to allow for Linux workloads via VMs and may be able to add you in for early access once released. It’ll also be announced here on the community site under the News category.

Let me know if you need additional assistance or want to have a chat about working with Bazel.

3 Likes

Thanks so much for that information! We’re most likely going to start on this next month, and we’ll reach out if we need any knowledge sharing or guidance!