Sunday, 13 April 2014

Jenkins Continuous Integration server on Raspberry Pi

From a fresh install of Raspbian “wheezy” image running headless (with no desktop) : 

$ cat /etc/debian_version
$ uname -a
Linux raspberrypi2 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux

  • Default Pi speed is slow for Jenkins so we need to overclock
$ sudo raspi-config
  • Select 'Overclock -> Modest 800MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt -> OK -> Reboot when selected'


  • Post reboot check the frequency is 800 MHz :
$ vcgencmd get_config arm_freq

  • Check default port of 8080 is free
$ netstat -an | grep -i 8080
<- nothing should show as bound
  •  Install OpenJDK Java 6 runtime
$ sudo apt-get update
$ sudo apt-get install -y openjdk-6-jre

  • Check Java version
$ java -version
 java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.4) (6b27-1.12.4-1+rpi1)
OpenJDK Zero VM (build 20.0-b12, mixed mode)

  •  Install Jenkins
$ sudo apt-get install -y jenkins
  • Post install check port 8080 is now bound for all IP's: 
$ netstat -an | grep -i 8080
tcp        0      0  *               LISTEN  

  • Open in GUI : http://< Raspberry Pi IP>:8080/

Note - Initial load of GUI make take a few minutes with high CPU but this is fine once it loads

  • To monitor peformance htop is a good tool :
 $ sudo apt-get install -y htop

1 comment:

  1. Hello, when I go to the plugin manager on my raspberry pi's Jenkins, there are no plugins available, as opposed to my Jenkins on my laptop. Did you have this issue and find a work around? Regards, Matthew Moisen