2016/04/10 - Apache Wookie has been retired.

For more information, please explore the Attic.

Introduction

This page is aimed at Wookie Committers who administer or are interested in administering the Wookie Demo Server. (Some of this info may or may not be helpful to others)

We have two running demos at http://wookie-vm.apache.org:8080/wookie and http://wookie-vm.apache.org:8090/wookie . The first is your default standalone jetty/derby configuration The second has an altered configuation to run  as a Tomcat Webapp and also using the external MySQL database.

Starting the Demos

Note that the code for one demo is checked out into /home/wookie/trunk whilst the other (tomcat/mysql demo) is checked out into /home/wookie/trunk-tc.

Assuming you are logged in to wookie-vm.apache.org via ssh and have a shell:

$ screen (or screen -r to resume or screen -x $pid to join another users screen)
$ cd /home/wookie/
$ sudo ./start-trunk.sh

Once running, hitting ' d' will exit the screen leaving it running. You are then back to a normal shell prompt where you can start the tomcat/mysql version of the demo:

$ sudo ./start-trunk-tc.sh

It could be the case that Tomcat is not running, in which case the tomcat/mysql demo will still fail, so start Tomcat:

$ cd /usr/local/apache-tomcat-6.0.26/bin
$ sudo ./startup.sh &

Updating the Demos

For the demo servers to continue to be relevent and useful, they should be updated to use the latest code from trunk. Normally this is fairly straight forward and can be a mostly automatic process. In our case we are running two of the same demo on the same server, one of them using code not standard to what is considered the default configuration.

So, until things change, updating from trunk is a manual process, made slightly easier with a script that alters our code for us. (Can I suggest someone check and update the checkouts at least once a month)

Updating the standard jetty/derby port 8080 demo.

$ screen -r (or 'screen -x $pid' to join another users already running screen session)
$ <ctrl-c> (to stop the current running demo)
$ sudo su -l wookie -p (log in as the 'wookie' user for updating svn)
$ cd /home/wookie/trunk
$ svn up
$ exit (to exit the wookie user and return to your normal shell)
$ cd /home/wookie
$ sudo ./start-trunk.sh
$ <ctrl-a> d (to exit screen session with demo now running using latest svn code)

Updating the altered Tomcat6/MySQL5 port 8090 demo.

$ cd /usr/local/apache-tomcat-6.0.26/bin
$ sudo ./shutdown.sh (stop the current running deployed demo)
$ sudo su -l wookie -p (log in as the 'wookie' user for updating svn)
$ cd /home/wookie/trunk-tc
$ svn up
$ exit (to exit the wookie user and return to your normal shell)
$ cd /home/wookie
$ sudo ./trunk-tc-prepare.sh (See Enabling MySQL section below for more)
$ sudo ./start-trunk-tc.sh (Runs the deploy-webapp target ready for Tomcat)
$ cd /usr/local/apache-tomcat-6.0.26/bin
$ sudo ./startup.sh & (Start Tomcat6, demo should now be available at port 8090)

Enabling MySQL for the Tomcat/MySQL Demo

There is a database already configured for the demo, it uses the default database name of 'widgetdb' but it does not use the default username/password pairs provided in the trunk code. The trunk code also has the MySQL lines commented out by default, so we need to enable them.

We have a script in /home/wookie/trunk-tc-prepare.sh that does this for us , you should only run this script after doing an 'svn up' on the trunk. It alters the file 'build.properties' - if for some reason this file itself has changed and an 'svn up' is performed there may be svn conflicts to cure, best thing to do is just delete the file, run svn up again and then run the trunk-tc-prepare.sh script to get the values we need. (If you know the file is untouched then no need to run the script!)

For informational purposes the lines changed in 'build.properties' are

from:

#wookie.persistence.manager.type=jpa
#wookie.db.user=java
#wookie.db.password=java
#wookie.db.driver=com.mysql.jdbc.Driver
#wookie.db.uri=jdbc:mysql://localhost:3306/widgetdb
#wookie.db.type=mysql
#jdbc.driver.path=../mysql-connector-java-5.1.7.jar
...
run.args="port=8080"

to this:

wookie.persistence.manager.type=jpa
wookie.db.user=notthedefaultusername
wookie.db.password=notthedefaultpassword
wookie.db.driver=com.mysql.jdbc.Driver
wookie.db.uri=jdbc:mysql://localhost:3306/widgetdb
wookie.db.type=mysql
jdbc.driver.path=../mysql-connector-java-5.1.13.jar
...
run.args="port=8090"

There is of course a nice /home/wookie/trunk/readme.txt which details some of this already, if things do not work as expected after updating the checkouts is perhaps to look there and see if things have changed. I fully expect at some point my start and update scripts will become out of date at some point in the future (they have already before).

Wookie committers - if you see this demo admin instruction page start to become outdated, please feel free to update it. Also, any Wookie committers that would like to help maintain the demo server, please file an INFRA jira issue and request an account and you will get one.

Updating/Maintaining the Server.

The server itself is a Virtual Machine (VM) housed on Nyx our main VMWare Server. The VM, like any other machine, needs to be maintained to keep up to date with the latest software and security fixes. This is left to the PMC to handle (in the case of VMs) so please try and perform checks at least once a month. (You can always open a Jira INFRA issue if you run into problems or you would like a snapshot of the VM taken first so you can rollback in case of trouble.)

$ sudo apt-get update
$ sudo apt-get upgrade

When new kernel versions etc come out, update with:

$ sudo apt-get dist-upgrade
$ sudo reboot

When a new Ubuntu release comes out (usually October and April)

$ sudo do-release-upgrade

Contribs Welcome.