Normal service is resumed with a vengeance after the conference...
Ran the whole process from script to completed builds again on Jenkins3 this morning, and all worked well, so I figure we're ready for the next stage. Wrote up the instructions and provided the script on the TEI Wiki, then set about preparing to build our proper VM for deployment. Initially we thought we'd do this using Remastersys to create an ISO for the full server install, but that failed -- the ISO wouldn't boot -- so we're going to take the same approach on our proper VM as is detailed in the wiki page. GN is arranging with sysadmin for the VM to be provisioned.
The existence table primary key field had not been set to auto-increment, so when a new item was added, it got the id zero; that screwed up behaviour in the AdaptiveDB code. Fixed the bug, and changed the zero value.
Most of our Calico volunteers were Ling students who can make use of a reference letter about their service during the conference, so I've written those this morning.
Remember the comma operator when returning a sequence of multiple elements in an XQuery return statement. If you want to return more than one element, then you need to wrap the whole thing in parentheses and separate each element with a comma. Compare the first "if" return with the second "else" return:
<div id="relatedList">
{
let $relatedCount := count($relatedNationality)
return
if ($relatedCount < 1) then
<h2>There are no other people from {$nationality}.</h2>
else
(<h2>Other people from {$nationality}.</h2>,
<ul>
{
for $related in $relatedNationality
let $relatedId := $related/@xml:id
let $relatedTitle := $related//tei:title
return
<li>
<a href="player.xql?id={$relatedId}">
<img src="images/thumbs/{$relatedId}.png" alt="{$relatedTitle}"/>
<span class="relatedListItemLine">{$relatedTitle}</span>
</a>
</li>
}
</ul>)
}
</div>
It looks like the place to change the default port is /etc/default/jenkins. Tried to change it to port 80, but it wasn't having any of it, so gave up. We can map 8080 from the VM through the AJP connector.
It appears that many forward links were created (titles_to_titles) from titles to subsequent titles which were not mirrored by corresponding backward links (titles_to_prectitles). Since we only used titles_to_prectitles in our views, many title progressions are not yet reflected accurately.
The solution is to create titles_to_prectitles links directly from the titles_to_titles table -- they should essentially be mirrors of each other. This should be possible fairly simply using SQL, and changes would immediately be reflected in the views. We should also do the reverse, ensuring that both tables are in sync.
This SQL gives us (if I'm correct in my assumptions) an overview of the situation we're in with regard to records missing from titles_to_prectitles:
SELECT ttt.*, old_titles.ttl_title_code AS older_title_code, new_titles.ttl_title_code AS newer_title_code FROM `titles_to_titles` AS ttt LEFT JOIN titles AS old_titles on ttt.ttt_older_title_id_fk = old_titles.ttl_title_id LEFT JOIN titles AS new_titles on ttt.ttt_newer_title_id_fk = new_titles.ttl_title_id WHERE NOT EXISTS ( SELECT * FROM titles_to_prectitles AS ttp WHERE ( ttp.ttp_title_id_fk = ttt.ttt_newer_title_id_fk AND ttp.ttp_prectitle_id_fk = ttt.ttt_older_title_id_fk ) ) LIMIT 0 , 700
This can be extended to create tehe missing records in titles_to_prectitles, and then re-engineered to do the reverse and create any missing records in titles_to_titles.
My home install of VirtualBox is older than my work one, and the instructions for port forwarding elsewhere in this blog don't work on it. This is how to port-forward Jenkins on an older VirtualBox.
- Shut down both the VM and VirtualBox.
- Open the XML file for the VM.
- Add these lines to the
<ExtraData>section:<ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/jenkins/GuestPort" value="8080"/> <ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/jenkins/HostPort" value="9494"/> <ExtraDataItem name="VBoxInternal/Devices/e1000/0/LUN#0/Config/jenkins/Protocol" value="TCP"/> - Restart VB and the VM. If you get this error:
Configuration error: Failed to get the "MAC" value (VERR_CFGM_VALUE_NOT_FOUND).
then you have the wrong value for the virtual network adapter (i.e. "e1000" above should be something else). Search the logs to find lines like this:00:00:01.104 [/Devices/e1000/0/Config/] (level 4) 00:00:01.104 AdapterType <integer> = 0x0000000000000000 (0) 00:00:01.104 CableConnected <integer> = 0x0000000000000001 (1) 00:00:01.104 LineSpeed <integer> = 0x0000000000000000 (0) 00:00:01.104 MAC <bytes> = "08 00 27 27 01 f8" (cb=6)
which will tell you the correct name of the device.
Jenkins4 (my home VM) is now running builds... fingers crossed...
Last day of the conference.