Jenkins setup notes

On 2012/08/28, in flex, flex, signal, webdev, by a b

There are piles of Jenkins setup blog entries on the tubes.  Here are my notes, for my own reference.  On the NBC Olympics Live Extra project, we absolutely hammered our build sever.  There were over 10,000 jobs run by the time it was done, and some of the iOS packing builds would take up to 10 minutes.  It took a bit of fiddling to get Jenkins just as we wanted it.

For hardware, we ended up with an older Mac Pro desktop to use, it’s 2 x 2.6ghz Quad Core Xeon with 6GB ram, OSX 10.6.8.  One could probably get by with less hardware, as long as you aren’t running multiple concurrent packaging builds.  To nerd out, just do all this on your laptop, and try it with a local git repo.  Jenkins is the shizzle.  If you get super into it, set up your LAN with a decent Mac Mini, or maybe a dual core Macbook? Go nuts, create your own git remote, and you’ll get CI and a redundant backup. Fweee!

To get started, install Jenkins standalone:

Modify the startup daemon to run as a different admin capable user.  Some people create a ‘Jenkins’ user, but I don’t think that’s necessary.

    sudo vi /Library/LaunchDaemons/org.jenkins-ci.plist

You want to change the UsernName key pair. You obviously don’t have to edit with VI, but you should probably have to use sudo, so you will be able to save, aight?


You will also need to change ownership of the Jenkins root folder. It installs as wheel, which is a weird BSD throwback name for a superuser group, but leaving it as wheel and changing the Jenkins username causes weirdness, angst, and strife.

    sudo chown -R YOUR_ADMIN_USER /Users/Shared/Jenkins

It is also helpful to adjust the way the Java VM was doing garbage collection.  There’s a bit on setting startup options in the Jenkins documentation.

    defaults write /Library/Preferences/org.jenkins-ci SETTING VALUE

I found the following properties were helpful:

    heapSize 1024m
    permGen 512m

Unraveling the whole thing around JavaVM out of memory and garbage collection was a bit epic. I’ll make another post about that later. Now that you’re all tweaked, you need to kick Jenkins in the pants. Here how to start/stop the daemon.

  start: sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
  stop: sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

If things get really crazy,  log out the admin user, or just restart the whole machine :)

I think that’s about it. We also installed a few plugins for Jenkins, but none of them are necessary to Ant. Maybe I’ll list those later.


Comments are closed.