Forum archive
TKLPatch for Jenkins (Hudson)
[Update 24-10-2011] Latest version here.
[Update 31-01-2011] I'll be changing to Jenkins on my second release of this TKLPatch. I really don't trust Oracle when it comes to opensource.
Continuous Integration comming to TurnkeyLinux! This TKLPatch will convert turnkey-core-11.0rc to a powerful Hudson Continuous Integration Server. I'm new to this topic but was in the need of this appliance, and after some research I decided to build this patch for Hudson. If anybody have experiencience with it and wants to share some recommendations to include, feel free to do so. I just did the basic deployment. I thought on making an inithook script to ask the hudsun manager password and secure the server on firstboot, but then I felt it was easiest to simply let the final user decide and create it's own admin user and permissions.
Notes: I used tkl-core and not tkl-tomcat because of the default mysql server in tkl-tomcat is not needed and I prefered to install tomcat6 over remove mysql-server.
Features:
- Tomcat6 running in ports 80 and 443 (http and https respectly, using same config as tkl-tomcat)
- Hudson 1.389 (the main page link is pointing to 1.386 as the last one but the link is outdated)
- Application deployed to tomcat's root.
What it does:
1. Set Hostname to hudson
HOSTNAME=hudson echo "$HOSTNAME" > /etc/hostname sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts
2. Update package information
apt-get update
3. Install tomcat6 and openssl to generate certs. Also installed authbind to bind tomcat to ports 80 and 443.
install tomcat6 openssl authbind
4. Remove tomcat6 default app
rm -Rf /var/lib/tomcat6/webapps/ROOT/
5. Download hudson 1.389 war. The lastest link in Hudson's homepage is outdated :S
mkdir -p /opt/hudson && cd /opt/hudson wget http://updates.hudson-labs.org/download/war/1.389/hudson.war
6. Deploy hudson on tomcat's root
ln -s /opt/hudson/hudson.war /var/lib/tomcat6/webapps/ROOT.war
7. Enable authbind to bind tomcat to ports lower than 1024
echo "AUTHBIND=yes" >> /etc/default/tomcat6
8. Set hudson home in jvm params.
echo JAVA_OPTS=\"\${JAVA_OPTS} -DHUDSON_HOME=/var/lib/tomcat6/webapps/hudson\" >> /etc/default/tomcat6
9. Shutdown tomcat
service tomcat6 stop
10. Clean apt cache
apt-get clean
Enjoy!
I was ashamed to ask to include hudson but I reaaally wanted to happen! To be honest, I'll start using it this month, that's why I prepared this tklpatch, to give it a ride. I just can't install something without making the patch :P
I tell you how it goes, I'm also waiting for the final openldap appliance for a super-secret project I'm working on mwahahaha...