How to configure Jenkins
How to Configure Jenkins as SMF service - example for updates of default values.
Install package:
apt-get install jenkins-common
Download Jenkins WAR file:
wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war
Update JAVA_HOME, default: /usr
svccfg -s svc:/application/jenkins:jenkins setprop options/JAVA_HOME = astring: /myshare/builds/tools/jdk7
Update JAVA_ARGS, default: -Xmx512m
svccfg -s svc:/application/jenkins:jenkins setprop options/JAVA_ARGS = astring: \"-Xmx2048m -XX:MaxPermSize=2048m\" # if need disable ping thread svccfg -s svc:/application/jenkins:jenkins setprop options/JAVA_ARGS = astring: \"-Xmx2048m -XX:MaxPermSize=2048m -Dhudson.slaves.ChannelPinger.pingInterval=-1\"
Update HTTP_PORT, default: 8080
svccfg -s svc:/application/jenkins:jenkins setprop options/HTTP_PORT = astring: 8082
update JENKINS_HOME, default: /var/jenkins
svccfg -s svc:/application/jenkins:jenkins setprop options/JENKINS_HOME = astring: /myshare/builds/jenkins/daemon
Update JENKINS_WAR, default: /usr/share/jenkins/jenkins.war
svccfg -s svc:/application/jenkins:jenkins setprop options/JENKINS_WAR = astring: /myshare/builds/jenkins/war/jenkins.war
Update JENKINS_PREFIX, default: /jenkins
svccfg -s svc:/application/jenkins:jenkins setprop options/JENKINS_PREFIX = astring: /ci
Change service user, default: root
svccfg -s svc:/application/jenkins:jenkins setprop method_context/user = astring: igor
Change service group, default: root
svccfg -s svc:/application/jenkins:jenkins setprop method_context/group = astring: staff
Create directory for log file and update permissions:
mkdir -p /var/log/jenkins chown -R igor:staff /var/log/jenkins
Update JENKINS_LOG, default: /var/log/jenkins.log
svccfg -s svc:/application/jenkins:jenkins setprop options/JENKINS_LOG = astring: /var/log/jenkins/jenkins.log
Refresh changes:
svccfg -s svc:/application/jenkins:jenkins refresh
Take a look and check of properties:
svcprop jenkins
Start service:
svcadm enable jenkins
Check issues:
svcs -xv
example logadm line for rotate logs:
logadm -w /myshare/builds/jenkins/log/jenkins.log -C 10 -c -p 1d -t '/myshare/builds/jenkins/log/jenkins.log.$n' -z 1