Trying to build a headless server for Jenkins...
Got RM set up with SVN instructions and working on the places.xml file. He's now made some edits, so I've updated the db and added him to the project team page.
US and I took a walk around the campus and decided on where our signs should be placed. I've now plotted them all on a Google Earth view and generated an image from them, along with info on what needs to be on which side, and I'll start creating the actual PDFs for printing tomorrow. I also called the sign folks in Grounds and checked on how they work; they have a coroplast insert and they can tape signs to each side for us.
Received two new codes from PD in preparation of new 1911 data:
- Language: Hindi: 6500
- Religion: Sikh: 880
Started my first attempt at building Jenkins2 with my desktop VirtualBox. Steps:
- Created a new Ubuntu 64-bit VM with 2GB of RAM and an expanding 25GB HD.
- Booted and installed from a downloaded 64-bit PC (AMD64) server install CD ISO.
- Let the installer determine the partitioning (it used LVM and created three partitions).
- ERRONEOUSLY chose the "Tomcat Java Server" option to start with. Note that this is not necessary; in fact Tomcat gets in the way, and I had to uninstall it later.
- Rebooted after install, did updates, and then installed
curl. - Downloaded and installed the Oracle JDK (downloaded it locally, put it on a server, and curled it to the VM). NOTE: There are Sun Java packages in the repos, I think; it would probably be better to install them, but I couldn't quite figure out how and I was in a rush. I think I could have done
sudo apt-get install sun-java6-jreandsudo apt-get install sun-java6-jdk. - Created
/usr/local/java, copied the JDK binary there, made it executable and executed it. - Added the following to
/etc/profile:JAVA_HOME=/usr/local/java/jdk1.6.0_25PATH=$PATH:$HOME/bin:$JAVA_HOME/binexport JAVA_HOMEexport PATH
- Configured Java through update-alternatives:
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre1.6.0_25/bin/java" 1sudo update-alternatives --set java /usr/local/java/jre1.6.0_25/bin/java
- Rebooted and tested with
java -versionthat the JDK is now default the Java VM. - Tried to do waiting updates with apt-get, but they were held back, so did them with aptitude. Why is this necessary?
- Couldn't find Tomcat, so did
sudo apt-get install tomcat6, and installed it. This seemed to update theopenjdktoo, but it didn't mess with the configuration of the Oracle Java. - After reading around a bit, I decided I'd rather use Tomcat7, so I created
/usr/local/apache-tomcat-7.0.12, and usedwgetto download thetar.gzfile, and then didtar xvzfto unwrap it. - Added my usual
utf8_startup.sh. - Ran Tomcat and confirmed it was working by curling
127.0.0.1:8080.
Next I wanted to find a convenient way to access the VM's Tomcat from the host, so I ran this in a terminal on the host, after shutting down the vm:
VBoxManage modifyvm "Jenkins2" --natpf1 "tomcat,tcp,,9090,,8080"
This should set up port forwarding between the host desktop port 9090 and the Tomcat running on port 8080 in the VM.
The port-forwarding worked like a charm, but in the process I discovered that Tomcat 6 is set to run as a service. So I have Tomcat 7 available, but I'll stick with Tomcat 6 from the repos for the moment, unless I find a reason to abandon it.
NOTE: All of the Tomcat stuff was unnecessary, but the Sun/Oracle Java is required.
- Added the Jenkins key and repo as explained here, and installed Jenkins.
- Having done that, I realized that it's actually starting by itself on port
8080; it doesn't need to run inside Tomcat. So I edited its script in /etc/init.d/jenkins to add this to the arguments:--httpPort=8081. This should make it start on 8081 and not conflict with Tomcat. - Then I shut down the VM and ran this on the host:
VBoxManage modifyvm "Jenkins2" --natpf1 "jenkins,tcp,,9091,,8081"
which should let me see Jenkins on 9091 on the host, without having to turn off Tomcat for the moment. However, in future, we should probably just leave Tomcat out of it. - Despite my re-configuration, Jenkins kept trying to start on
8080. Meanwhile, I got sick of the limited terminal available in the headless vm, so I didsudo apt-get install openssh, and tested it, then shut down the VM and ran this:
Now I can connect to the VM using:VBoxManage modifyvm "Jenkins2" --natpf1 "guestssh,tcp,,2222,,22"ssh -l hcmc -p 2222 localhost
which means I can easily copy/paste from browsers, use a larger terminal, etc. - So then I went back and got rid of Tomcat (
sudo apt-get remove --purge tomcat6), and then copied my backup of the/etc/init.d/jenkinsback over the edited one to remove the attempt to reconfigure thehttpPort. Then a restart gave me.... A WORKING JENKINS on port8080.
Next, install texlive and friends:
- In the user's home directory,
mkdir texlive, thencd texliveandwget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz. tar xvfz install-to-unx.tar.gzcd install.....sudo ./install-tl
Texlive installed. Then I had to do sudo apt-get install subversion, because I'll be needing that.
Next, I followed my own instructions to get TEI installed.
Then in trunk/P5 I did make dependencies, and then sudo apt-get install [the list of dependencies].
However, an attempt to build P5 failed:
make Checking you have running XML tools and Perl before trying to run transform... Perl:/usr/bin/perl xmllint:make: *** [check.stamp] Error 1
Turns out xmllint is in libxml2-utils, so had to sudo apt-get install libxml2-utils. Now a make is proceeding as expected.
Next, I wanted to do some cleanup -- on login, there was a message to the effect that there were packages available for upgrade, but the message was wrong (see discussion here). So I did sudo rm /etc/motd.tail.
Next, I tried make pdf, which is one of the targets that failed for me on my desktop due to the absence of TeXLive 2010. It failed again for the same reason; although I've installed TeXLive 2010, the system has at least one symbolic link (from /usr/bin/xelatex to /usr/bin/xetex) which are from the old Debian 2009 Tex package.
So the instruction on the TEI wiki page for installing packages, which includes texlive, is wrong; that shouldn't be installed. I've now removed it (sudo apt-get remove texlive). Then I added the install location of the 2010 to my path, by doing sudo nano /etc/profile, and adding PATH=$PATH:/usr/local/texlive/2010/bin/x86_64-linux to it.
Then I tried make pdf again, and got the same error, so it's not caused by the texlive version after all. Although the error message suggests that the error is caused by a space in a font name, I think it's actually caused by the absence of the font. Reported this to SR, who modified the source so that the Minion Pro and Myriad Pro fonts are no longer required (they're proprietary anyway). Now I can build a PDF, but I'm still getting an error at the end.
Looking in job$.log (after deleting it, and re-running the make pdf to be sure it's fresh), I see that it still starts with this:
hcmc@Jenkins2:~/tei/trunk/P5$ more job\$.log kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro/B', contains ' ' kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro/I', contains ' ' kpathsea: Invalid fontname `Myriad Pro', contains ' ' kpathsea: Invalid fontname `Myriad Pro/BI', contains ' ' kpathsea: Invalid fontname `Myriad Pro:', contains ' '
The rest of the file consists mainly of
** WARNING ** Failed to convert input string to UTF16...
but there are two more Myriad Pro errors towards the end, and finally there's this:
kpathsea: Invalid fontname `HAN NOM A', contains ' ' kpathsea: Invalid fontname `HAN NOM A', contains ' ' kpathsea: Invalid fontname `HAN NOM A', contains ' ' kpathsea: Invalid fontname `HAN NOM A/B', contains ' ' kpathsea: Invalid fontname `HAN NOM A', contains ' ' kpathsea: Invalid fontname `HAN NOM A/I', contains ' ' kpathsea: Invalid fontname `HAN NOM A', contains ' ' kpathsea: Invalid fontname `HAN NOM A/BI', contains ' ' kpathsea: Invalid fontname `HAN NOM A:', contains ' '
with lots more instances of the same thing. So I suspect there are still references to Myriad Pro in the code, and there's also this other font, which I've never heard of. It doesn't seem to be available in the repos either, as far as I can tell (there's no ttf-hannom, although Arch Linux seems to have one). Waiting to hear from SR where he got it from.
At the request of AC, added a very simple sidebar to the VPN WordPress page, on the left side of the layout. Had to adjust all of the template files, and re-jigged the CSS to accomodate the modified layout for content. AC and I determined that the site's navigational structure wasn't clear enough with regard to finding blog posts, so this sidebar was brought in to provide easier access to archives.
I put the initial set of widgets in the sidebar but I expect that AC will want to play around.
After JN had to check out the current source and build to get around a recent bug, I took the opportunity to go through the same process, create an eXist war file:
- mkdir exist_trunk
- cd exist_trunk
- svn co http://exist.svn.sourceforge.net/svnroot/exist/trunk/eXist .
- ./build.sh clean
- ./build.sh download-additional-jars
- cd extensions
- cp build.properties local.build.properties
- [Edit local.build.properties to turn on FOP.]
- cd ../
- ./build.sh
- ./build.sh -f build/scripts/jarsigner.xml
- ./build.sh dist-war
- mkdir [tomcat]/webapps/exist
- cp dist/exist-1.5....war [tomcat]/webapps/exist
- jar xfv [tomcat]/webapps/exist/exist-1.5...war
Then I started Tomcat 6.0.26, but eXist failed to start. So I installed the latest Tomcat (7.0.12). It took me a while to get this going, but I eventually figured out that all the .sh and all the .jar files in the bin directory need to be executable. I used my usual utf8-startup.sh file to start it up, and exist came up working fine. So the latest eXist seems to prefer the latest Tomcat.
Took a trip over to the banquet room, and took photos; tested the network port, and measured some distances. Also spoke to MS on the phone, and we're agreed that the twin pillars look like a good spot to bring down the network cable and locate the camera, assuming the servers don't object.
Met with CSP, AL and HR to complete the Project Lite Web document, and then had a whiteboard session to plan the navigation, based on discussions the dept has already had. Came up with what looks like a good navigation plan, and passed back an outline of it, with photos of the whiteboard, for HR to start working into the spreadsheet.
JN left early to vote, so I got late duty.