Work on new TEI Jenkins server based on Precise
Posted by mholmes on 25 May 2012 in Servers, R & D, Activity log
Started testing on a VM, running my old script bit by bit and watching the results. I've got as far as a working Jinks server, and one or two builds work, but there will have to be many changes. These are my notes so far:
First time building Jenkins with Precise, I'm running only what I think I need to run, and keeping notes. #START UNTESTED BIT -- TEST LATER ON DEFAULT INSTALL.# #First do updates. echo "Doing system updates before starting on anything else." apt-get update apt-get upgrade #Now add the repositories we want. echo "Backing up repository list." cp /etc/apt/sources.list /etc/apt/sources.list.bak #Uncomment partner repos. echo "Uncommenting partner repositories on sources list, so we can get Sun Java." sed -i -re '/partner/ s/^#//' /etc/apt/sources.list #FINISH UNTESTED BIT# #First Jenkins echo "Adding Jenkins repository." wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | apt-key add - echo "deb http://pkg.jenkins-ci.org/debian binary/" > /etc/apt/sources.list.d/jenkins.list #OK #Next TEI. echo "Adding TEI Debian repository." gpg --keyserver wwwkeys.uk.pgp.net --recv-keys FEA4973F86A9A497 #NOT OK: HAD TO USE: #Next TEI. gpg --keyserver wwwkeys.pgp.net --recv-keys FEA4973F86A9A497 echo "deb http://tei.oucs.ox.ac.uk/teideb/binary ./" > /etc/apt/sources.list.d/tei.list #OK #Now we can start installing packages. echo "Updating for new repositories." apt-get update #OK echo "Installing core packages we need." apt-get install openssh-server libxml2 libxml2-utils devscripts xsltproc debhelper subversion trang && echo "Installing curl, required for some tei building stuff." apt-get install curl && #OK. curl already installed. #TEI packages echo "Installing TEI packages." apt-get install psgml xmlstarlet debiandoc-sgml linuxdoc-sgml jing jing-trang-doc libjing-java rnv texlive-xetex && #NOT OK: rnv no longer in repos (but is in TEI, so no worries); linuxdoc-sgml should be linuxdoc-tools. HAD TO USE: apt-get install psgml xmlstarlet debiandoc-sgml linuxdoc-tools jing jing-trang-doc libjing-java texlive-xetex apt-get install trang-java tei-p5-doc tei-p5-database tei-p5-source tei-schema saxon nxml-mode-tei tei-p5-xsl tei-p5-xsl2 tei-p5-xslprofiles tei-roma onvdl tei-oxygen zip && #NOT OK: nxml-mode-tei has no installation candidate. HAD TO USE: apt-get install trang-java tei-p5-doc tei-p5-database tei-p5-source tei-schema saxon tei-p5-xsl tei-p5-xsl2 tei-p5-xslprofiles tei-roma onvdl tei-oxygen zip && #Setting up configuration for oXygen mkdir /root/.com.oxygenxml chmod a+x /root/.com.oxygenxml mkdir /root/.java chmod a+x /root/.java echo "Don't forget to put your licensekey.txt file in the folder /usr/share/oxygen so that oXygen is registered." #OK #Various fonts and the like. echo "Installing fonts we need." apt-get install ttf-dejavu msttcorefonts ttf-arphic-ukai ttf-arphic-uming ttf-baekmuk ttf-junicode ttf-kochi-gothic ttf-kochi-mincho echo "The Han Nom font is not available in repositories, so we have to download it from SourceForge." cd /usr/share/fonts/truetype mkdir hannom cd hannom wget -O hannom.zip http://downloads.sourceforge.net/project/vietunicode/hannom/hannom%20v2005/hannomH.zip unzip hannom.zip find . -iname "*.ttf" | rename 's/\ /_/g' rm hannom.zip fc-cache -f -v #OK #Configuration for Jenkins echo "Starting configuration of Jenkins." echo "Getting the Hudson log parsing rules from TEI SVN." cd /var/lib/jenkins svn export https://tei.svn.sourceforge.net/svnroot/tei/trunk/P5/Utilities/hudson-log-parse-rules chown jenkins hudson-log-parse-rules echo "Getting all the job data from TEI SVN." #Don't bring down the config.xml file for now; that contains security settings specific to #Sebastian's setup, and will prevent anyone from logging in. We leave the server unsecured, #and make it up to the user to secure it. #svn export https://tei.svn.sourceforge.net/svnroot/tei/trunk/Documents/Editing/Jenkins/config.xml #chown jenkins config.xml svn export --force https://tei.svn.sourceforge.net/svnroot/tei/trunk/Documents/Editing/Jenkins/jobs/ jobs chown -R jenkins jobs echo "Installing Jenkins plugins." cd plugins wget --no-check-certificate http://updates.jenkins-ci.org/latest/copyartifact.hpi chown jenkins copyartifact.hpi wget --no-check-certificate http://updates.jenkins-ci.org/latest/emotional-hudson.hpi chown jenkins emotional-hudson.hpi wget --no-check-certificate http://updates.jenkins-ci.org/latest/greenballs.hpi chown jenkins greenballs.hpi wget --no-check-certificate http://updates.jenkins-ci.org/latest/jobConfigHistory.hpi chown jenkins jobConfigHistory.hpi wget --no-check-certificate http://updates.jenkins-ci.org/latest/plot.hpi chown jenkins plot.hpi wget --no-check-certificate http://updates.jenkins-ci.org/latest/log-parser.hpi chown jenkins log-parser.hpi wget --no-check-certificate http://updates.jenkins-ci.org/latest/scp.hpi chown jenkins scp.hpi wget --no-check-certificate http://updates.jenkins-ci.org/latest/WebSVN2.hpi chown jenkins WebSVN2.hpi echo "Restarting Jenkins server, so that it finds and initializes all the new plugins." /etc/init.d/jenkins restart #OK PROBLEMS AFTER STARTUP: 1. Builds fail because rnv is not installed. Have to get it from SourceForge: cd ~ apt-get install libexpat-dev wget http://downloads.sourceforge.net/project/rnv/Sources/1.7.10/rnv-1.7.10.zip unzip rnv-1.7.10.zip cd rnv-1.7.10 ./configure make make install 2. NON-FATAL, but investigate: in Stylesheets: Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk-amd64/lib/tools.jar 3. FATAL: BUILD Build for P5, XSLT 2.0 test -d release/p5 || mkdir -p release/p5/xml/tei/stylesheet/ for i in bibtex common2 docx dtd docbook epub epub3 fo2 html html5 latex2 nlm odds2 odt profiles/default rdf relaxng rnc slides tbx tite tools txt xhtml2 xsd ; do \ tar cf - --exclude .svn $i | (cd release/p5/xml/tei/stylesheet; tar xf - ); \ done (cd odt; mkdir TEIP5; saxon -o:TEIP5/teitoodt.xsl -s:teitoodt.xsl expandxsl.xsl ; cp odttotei.xsl TEIP5.ott teilite.dtd TEIP5; jar cf ../teioo.jar TEIP5 TypeDetection.xcu ; rm -rf TEIP5) /bin/sh: 1: jar: not found mkdir -p /var/lib/jenkins/jobs/Stylesheets/workspace/debian-tei-p5-xsl2/debian/tei-p5-xsl2/usr/share/xml/tei/stylesheet cp catalog.xml /var/lib/jenkins/jobs/Stylesheets/workspace/debian-tei-p5-xsl2/debian/tei-p5-xsl2/usr/share/xml/tei/stylesheet cp teioo.jar /var/lib/jenkins/jobs/Stylesheets/workspace/debian-tei-p5-xsl2/debian/tei-p5-xsl2/usr/share/xml/tei/stylesheet cp: cannot stat `teioo.jar': No such file or directory make[1]: *** [installp5] Error 1 make[1]: Leaving directory `/var/lib/jenkins/jobs/Stylesheets/workspace'