Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

Creating your own #nodejs development server with a #raspberrypi running #jenkins

, 10 Mar 2014
Rate this:
Please Sign up or sign in to vote.
At home I almost only develop nodejs code and because of that I've been using grunt to run jshint, mocha, ... on my modules.Because I'm always creating new project and experiments I've a dedicated raspberry pi model b for development purposes.  Until now that raspberry had support to:SSHGITENCFS (ba


At home I almost only develop nodejs code and because of that I've been using grunt to run jshint, mocha, ... on my modules.

Because I'm always creating new project and experiments I've a dedicated raspberry pi model b for development purposes. Until now that raspberry had support to:
  • SSH
  • GIT
  • ENCFS (backup to dropbox)
  • Nodejs 0.10.2
  • MongoDB ( compiled from https://github.com/skrabban/mongo-nonx86 )
This infrastructure is nice but I needed a CI server to test every push request. My previous experience installing Jenkins on a raspberry was not very positive but I decided to give it another try.

Some of the most important installation steps are described bellow:
I installed jenkins using:
<code>
sudo apt-get install jenkins jenkins-common


Then I updated the jenkins.war to the latest stable version.

<code>
/usr/share/jenkins/jenkins.war


To run jenkins you need to increase the system tmpfs values:

<code>
> sudo vim /etc/default/tmpfs

TMP_SIZE=1073741824 #1gb
RUN_SIZE=157286400 #150mb


Then configure Jenkins to use oracle arm java version:
<code>

> sudo vim /etc/default/jenkins

JENKINS_HOME=/home/jenkins
JAVA=/usr/lib/jvm/jdk-7-oracle-armhf/jre/bin/java


I've also enabled swap and configured a jenkins user on the machine.


Gotcha
Jenkins initialisation may take a couple of minutes on the first time is executed.


Conclusion
With this configuration I got a build machine to keep tracking my changes to the code. Jenkins is not very fast but it's usable.

Some figures of the machine resources with jenkins running follows:

<code>
> free -mh

             total       used       free     shared    buffers     cached
Mem:          485M       372M       112M         0B        20M       190M
-/+ buffers/cache:       161M       323M
Swap:         1.0G         0B       1.0G


> df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           150M   69M   82M  46% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           302M     0  302M   0% /run/shm

I hope this has given you some idea on how to build a low voltage server for your home development.

@aetheon


License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

aetheon
Web Developer
Portugal Portugal
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 10 Mar 2014
Article Copyright 2014 by aetheon
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid