Skip to main content

Running Mac as a production server

For one of my open source projects we were given a server, a mini mac to be precise. Sure, we could have put linux on it, but because all the stack we are using runs on Mac so we decided we could probably use this server, why not. We sent it to a mac mini server farm to host it.

Image result for mac mini server 2013

There were a few wrinkles.

Sleep.
We delegated the server setup to an intern so they could learn how to set up the machine, they forgot to turn off sleep so the server was oddly unresponsive for the first week or so of testing.

Updates.
Macs like updating, and they seem to use RAM to do so. If you don't update the server you can have a significant chunk of your RAM hanging out waiting for you to do the update. We haven't figured out how to accept XCode downloads from the apple store, so this means we had to learn how to turn on VNC.

Turning on VNC
sudo  /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all

Turning off VNC

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off


Using pm2 vs forever
At the same time we did the upgrade, we decided wouldn't it be nice to have a new node process manager? So we switched our webservices to use pm2. After a month of sleep like behavior, after we had solved the sleep like behavior, we decided maybe switching process managers at the same time as switching OS was a bad idea. We switched back to forever and now the server is almost normal.

These were a few reasons why we regret using the Mac server instead of formatting it with Linux, although now that its sort of stable with ~97% uptime we aren't planning formatting it just yet.

Comments

Popular posts from this blog

10.6.8 update spells Joy for Minimacs everywhere

If, after updating to 10.6.8 you get into a reboot loop, never fear the update is the same as every other update, except there is a step involving replacing the kernel.

This is very easy to do if you either (a) download it and save it on your Minimac before you update to 10.6.8, or (b) you have a mac formated USB key that you can copy it onto after your Minimac starts looping.

Here is the super-condensed minimal effort path to get you into Minimac heaven... (no not a dead Minimac, a running one), at least until Lion comes out.

On another computer (preferably a Mac or Ubuntu)
Download the legacy kernel[mirror]Put it on a Mac formated USB key * On the Reboot Looping Minimac
Hold down Shift as you bootAt the boot loader screen type (once you start typing it will apear in black letters on the bottom of the screen)  recovery=yes, -x Once it has finished loading, plug in the USB keyCopy the legacy_kernel-10.6.8.bz2 to your MinimacDouble click on it to unzip itMove the legacy_kernel-10.6.8 to …

English Noun Incorporation?

I was at a talk today with some Ojibwe data where invariably the claim that "English doesn't have incorporation" or at least incorporation of objects came up. We have "vacume clean" but generally we only incorporate the instrument. I remember a similar discussion coming up a few years ago in 2007 and I asked myself about apple picking. My colucators said, sure, but you can't say apple pick right? I thought about it a bit and came up with a linear string of words that might get google results. I remember I searched for "we apple picked" and found a few results, indicating to me that some people say it, generally when discussing their weekends. So, having my Android with me at the talk I googled again. This time I found a lot more examples than before, 394 to be exact, all of the first page clear examples with native speakers, speaking naturally.

I've heard this claim can be traced back to Baker 1988. When I got home I googled the claim "…