Jenkins (continuous integration) install inside jail

Status
Not open for further replies.

Malo

Cadet
Joined
Feb 22, 2013
Messages
6
Hi there! This is my very first post, so i want to send a BIG THANKS! to this community for developing such a powerful tool like FREENAS

I'd like to install inside my jail Jenkins, a very useful Continuous integration server. I've orlready set up my jail with trasmission, and it's working well

I've installed jenkins with
Code:
pkg_add -r jenkins


and started the service with
Code:

maloJail# /usr/local/etc/rc.d/jenkins onestart
Starting jenkins.
maloJail# Feb 22, 2013 2:29:18 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Feb 22, 2013 2:29:21 PM winstone.Logger logInternal
INFO: HTTP Listener started: port=8180
Feb 22, 2013 2:29:21 PM winstone.Logger logInternal
INFO: AJP13 Listener started: port=8009
Feb 22, 2013 2:29:21 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine v0.9.10 running: controlPort=disabled
Feb 22, 2013 2:29:21 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Feb 22, 2013 2:29:21 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Feb 22, 2013 2:29:21 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Feb 22, 2013 2:29:21 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Feb 22, 2013 2:29:21 PM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Feb 22, 2013 2:29:21 PM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Feb 22, 2013 2:29:26 PM org.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration run
INFO: Trying to register BouncyCastle as a JCE provider
Feb 22, 2013 2:29:26 PM org.apache.sshd.common.util.SecurityUtils$BouncyCastleRegistration run
INFO: Registration succeeded
Feb 22, 2013 2:29:26 PM org.jenkinsci.main.modules.sshd.SSHD start
INFO: Started SSHD at port 21219
Feb 22, 2013 2:29:26 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Feb 22, 2013 2:29:26 PM hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 22631
Feb 22, 2013 2:29:37 PM hudson.WebAppMain$2 run
INFO: Jenkins is fully up and running



My jail ip is

Code:
192.168.11.15


So i've tried to reach jenkins from my network

Code:
http://192.168.11.5:8081


But the service seem unreachable!


This is my config:

Code:
Freenas 8.3.0-p1
HP Microserver N40L



What i'm doing wrong?
 

Malo

Cadet
Joined
Feb 22, 2013
Messages
6
Resolved

I've got it!

I've noticed here that the default --httpListenAddress param in /usr/local/etc/rc.d/jenkins should be 0.0.0.0 and not 127.0.0.1 (I'm inside the jail, so localhost is 192.168.11.15, and i don't want to restrict access only from the jail)

I've edited /usr/local/etc/rc.d/jenkins and now it looks like
Code:
 -- CUTTED ---


. /etc/rc.subr

name="jenkins"
rcvar=jenkins_enable

load_rc_config "${name}"

: ${jenkins_enable="NO"}
: ${jenkins_home="/usr/local/jenkins"}
: ${jenkins_args="--webroot=${jenkins_home}/war  --httpListenAddress=0.0.0.0 --httpPort=8180 --ajp13ListenAddress=127.0.0.1 --ajp13Port=8009 --prefix=/jenkin$
: ${jenkins_java_home="/usr/local/openjdk6"}
: ${jenkins_user="jenkins"}

 -- CUTTED --- 

 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
It also doesn't hurt to add an entry to /etc/hosts inside the jail with the hostname/ip of the jail.
 

Malo

Cadet
Joined
Feb 22, 2013
Messages
6
It also doesn't hurt to add an entry to /etc/hosts inside the jail with the hostname/ip of the jail.

I've done it ;) Thanks.

Only one thing.. Can i ovverride the jenkins arguments (jenkins_args) in the jail rc.conf without touching the /usr/local/etc/rc.d/jenkins script?
 
Status
Not open for further replies.
Top