Building a Kick-Ass Mac Mini Build/Integration Server for iOS, Android, Blackberry and Mac Development, Part I


This is the first of a series of blog posts where I walk you through the process of turning an old mac mini into a kick ass swiss army knife build integration/scm server.


Several years ago, I purchased a mac mini to run as a dedicated web server.  The server worked well, but issues with my ISP caused me abandon self hosting and move my virtual domains to the cloud.  Since then, the mac mini has been quietly sitting on the shelf, until now.

A few weeks ago, I purchased a Synology RS812 NAS appliance and quickly moved all of my subversion and git repositories to it.  However, I started to wonder if having my life’s work stored on the NAS was really a good idea.  If the drives got corrupted, I would loose everything.

I started to spec out a new server to throw in my 12U rack.   I spend hours poring over specs for server cases and power supplies looking for the quietest ones I could find.  I quickly came to the conclusion that a passively cooled system would be slower than my existing mac mini.

I pondered.  Maybe I could use the mac mini as a subversion server, mirrored to the subversion repositories on the NAS.  Then idea struck me – why not turn the mac mini into a dedicated build server? 

I purchased OS X Server ($20) and then I started to realize how incredibly useful this mac mini could be. By spending $20 for OS X server and $139 for a new disk drive I get all of the following:

•    Software Update Caching.  Right now each of my macs will poll the apple server to check to see if there is a software update.  If there is one, it will download it directly from apple, for each mac.  OS X Server has a service that will download the updates exactly once, and each of your macs will install the update from the server, saving bandwidth on your Internet connection.

•    LDAP.  With the LDAP server, you can have a single network login for all of your mac, mac books, etc.

•    Provisioning.  The server can control iOS devices and macs, pushing down developer certificates.  This is a big win for an iOS developer.

•    Source code repositories.  The mini will host subversion and git source code repositories.  The subversion repositories will be mirrored to the NAS, so at any point I have two copies of my subversion repositories in sync.

•    Build server.  With the mac mini, I will be able to build mac, iphone, ipad, blackberry and android applications.  More importantly, with Jenkins, I can also have a build slave running on Windows.

•    And lastly, you get a crap wiki server.

Upgrading the Hardware (the Path to Hell is Paved with Good Intentions)

After upgrading the mac mini to Mountain Lion, the performance was terrible.  Granted, the mac mini’s performance was never great to begin with, by any measure, but I needed more speed.

So, I drove to the store and picked up a 1TB Seagate Solid State Hybrid Hard drive (SSHD). I cracked open the mini, admired the delicate craftsmanship, and then installed the drive.  That is when my plan nearly derailed.

I went searching through my boxes for the original DVDs that came with the mac mini and installed the OS.  However, I forgot that the app store didn’t come out until after Snow Leopard was released.  Therefore, if I wanted to upgrade to Mountain Lion, I’d have to upgrade to Snow Leopard first. The only problem was that after several hours of searching for the Snow Leopard installation DVDs, I simply couldn’t find them.
I downloaded the Lion installation package and copied it to the mini and tried to install.  The installer refused, stating that the OS was too old, I would have to upgrade to Snow Lion first.

After another futile attempt to find the missing installation DVDs, I tried to use the migration assistant (which doesn’t copy the operating system files).  Time machine was no good either.

It a fit of desperation, I was able to burn the installer to a USB key.  With that, I was able to boot and finally install Mountain Lion on the mac mini. 

Each step above wasted several hours, and when you can only devote several hours a night to this side project, this adventure took nearly a full week to run its course. 

Now, I can honestly say that purchasing the Seagate SSHD was well worth it.  It may not be the fastest drive on the market, but it is bounds and leaps faster than the 5400rpm Toshiba drive.  The system boots fast and is actually usable now.

The only problem is, I broke the heat sensor connector when reinstalling the drive.  The connector sheared off the board.  I was able to solder the sensor cable directly to the pads, but the fan is running wide open now.   There are two options to fix this, which I will cover later when I finish building the server and come back to it.

Installing OS X Server, XCode

Next, I installed the $20 OS X server app.   This app overlays on top of your operating system. 

Turn on the caching server and then update your system from within the Server app.  Launch the appstore and update software.  You will start to see that the caching service starts downloading the files and starts using disk space.

Next, I downloaded XCode.  Once XCode is downloaded, run the app and then go to the XCode->Preferences and click on the downloads icon.  Download the command line tools.

Once this has finished, take a moment to admire what you now have done.   The following software packages have been installed without needing to compile anything: subversion, git, perl, php, ruby, python, and of course, apple’s XCode compilers.

That is enough for now, next time we can start setting up the Subversion server to mirror to another repository.

Leave a Reply