wiki:ServerLinz2
Last modified 4 weeks ago Last modified on 04/25/12 16:39:16

Standalone Ubuntu Linux server in Linz

On 2011-11-10 we got a standalone server at Johannes Kepler University, Linz, http://140.78.116.130 (or http://geogebra2.idm.jku.at, which is the same since the beginning of March 2012). It hosts some virtual servers, but its primary purpose is to host the virtual server for automated testing.

It has 12 GB of RAM (2x2 originally, +2x4 extra) since VirtualBox requires memory. The network card is a

00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 05)

which was buggy in Linux by default and required to be patched (see the fix-1000e script in /usr/local/sbin and /etc/rc.local).

The host machine is an Ubuntu 11.10 (64 bit, server edition). The following packages are installed:

The /NAS directory is an NFS mount to a NAS box (mainly for backup).

Virtual servers

All virtual servers are run by the "kovzol" user. After reboot, each virtual servers must be restarted manually. Some services in these virtual servers also require manual restart:

  • autotest: as tester,
    ./start-bulldog >> bulldog.log 2>&1 & tail -f bulldog.log &
    ./refresh-war-test42 &
    ./refresh-info &
    

Automatic Testing

To separate the processes for the automated server, we use a preinstalled Ubuntu 11.10 (64 bit, server edition) VirtualBox image fileset (.vbox, .vdi) and upload it to the host machine in Linz (~1200 MB). We use everywhere the default settings, but memory is extended to 4 GB, 1 processor is set, and a "* soft/hard nofile 10000" setting is used in /etc/security/limits (see http://dev.geogebra.org/trac/wiki/Web#Compilation ford details). The hard disk size were also doubled. Then the following commands were used to modify and start it:

VBoxManage registervm /home/kovzol/VirtualBox\ VMs/GeoGebra2\ Ubuntu\ 11.10/GeoGebra2\ Ubuntu\ 11.10.vbox
VBoxManage modifyvm "GeoGebra2 Ubuntu 11.10" --nic1 nat --natpf1 "autotestssh,tcp,,2222,,22"
VBoxManage modifyvm "GeoGebra2 Ubuntu 11.10" --nic1 nat --natpf1 "autotesthttp,tcp,,8080,,80"
VBoxManage modifyvm "GeoGebra2 Ubuntu 11.10" --name "AutoTest Ubuntu 11.10"
VBoxManage modifyvm "AutoTest Ubuntu 11.10" --memory 4096
VBoxManage modifyvm "AutoTest Ubuntu 11.10" --cpus 1
VBoxManage modifyhd VirtualBox\ VMs/AutoTest\ Ubuntu\ 11.10/GeoGebra2\ Ubuntu\ 11.10.vdi --resize 100000
VBoxManage startvm "AutoTest Ubuntu 11.10" --type headless

For stopping "halt" can be used as root, then

VBoxManage controlvm "AutoTest Ubuntu 11.10" poweroff

Restart can be done by using "VBoxManage startvm" (as above).

The following pieces of software are installed:

All openjdk-* packages were removed.

Java 5 JDK was installed from http://www.geogebra.org/download/installer/jdk/ to /opt/jdk1.5.0_22. In future it may be removed since Java 6 is used for packaging, and may be used for compiling as well (with forcing Java 5 compliance).

Details

The tester user can log in via ssh, port 2222. The start-bulldog script is an endless loop which does the following (see trunk/geogebra/test/scripts/autotest for every detail):

  • Updates the sources via SVN.
  • Builds the desktop and web versions and tests it for:
    • desktop build problems,
    • desktop JAR file creation problems,
    • loading a simple GGB file and tests its regression output in desktop,
    • desktop compilation problems (even if GeoGebra starts properly),
    • GWT compilation problems,
    • JUnit test errors.
    • Newly introduced JUnit test failures.
  • It sends an email to geogebra-dev if a problem occurred.
  • Here one can investigate the JUnit test history: http://ggb1.idm.jku.at:8080/query.

Not tested yet:

  • obfuscation problems (proguard),
  • JAR signing problems (SHA1 errors and such),
  • checking the regression output for lots of GGB files,
  • GeoGebraWeb.

The output can also be viewed at http://140.78.116.130:8080/revs-vanilla/, here all available revisions can be checked. The latest one is symlinked to "latest". The GeoGebraWeb compilation output is available in the war subdirectory, usually the one of the HTML files should be selected. A fresh report on the server status is available on this link: http://geogebra2.idm.jku.at:8080/revs-vanilla/info.html.

GeoGebraMobile testing with PhantomJS

This machine is stopped now. It is based on Gabor's own virtual machine, and it has been run with the following statements:

VBoxManage registervm /home/kovzol/VirtualBox\ VMs/Gabor\ -\ headless\ JS\ Ubuntu\ 11.04/Gabor\ -\ headless\ JS\ Ubuntu\ 11.04.vbox
VBoxManage modifyvm "Gabor - headless JS Ubuntu 11.04" --nic1 nat --natpf1 "mobiletestssh,tcp,,2223,,22"
VBoxManage modifyvm "Gabor - headless JS Ubuntu 11.04" --nic1 nat --natpf1 "mobiletesthttp,tcp,,8082,,80"
VBoxManage startvm "Gabor - headless JS Ubuntu 11.04" --type headless

Gröbner basis testing

http://140.78.116.130:8081/~tester is a Gröbner basis testing web application.

It is run by using the following commands:

VBoxManage registervm /home/kovzol/VirtualBox\ VMs/Groebner\ Ubuntu\ 11.10/Groebner\ Ubuntu\ 11.10.vbox
VBoxManage modifyvm "Groebner Ubuntu 11.10" --nic1 nat --natpf1 "gbtest,tcp,,2224,,22"
VBoxManage modifyvm "Groebner Ubuntu 11.10" --nic1 nat --natpf1 "ggbtesthttp,tcp,,8081,,80"
VBoxManage startvm "Groebner Ubuntu 11.10" --type headless

TODO: Implement ordering, database of already solved problems, more CAS plugins, HTML/PHP code cleanup and publish.

SingularWS testing

This is what was done to start this virtual machine:

kovzol@geogebra2:~$ VBoxManage registervm /home/kovzol/VirtualBox\ VMs/SingularWS/SingularWS.vbox
kovzol@geogebra2:~$ VBoxManage modifyvm SingularWS --nic1 nat --natpf1 "wstestssh,tcp,,2225,,22"
kovzol@geogebra2:~$ VBoxManage modifyvm SingularWS --nic1 nat --natpf1 "wstesthttp,tcp,,8085,,80"
kovzol@geogebra2:~$ VBoxManage startvm SingularWS --type headless

Now the following queries will work:

Some additional changes were done to support Varnish based caching. Please read the full story at http://code.google.com/p/singularws/source/browse/doc/README.