Ok, now you have a set of machines that you'd like to start in distributed mode. It's really not that different to single instance mode but there's a couple of things to keep an eye on.

Start the mysql instance on your database machine#

1) Follow the instructions in the bioinf5 set up notes, if you haven't already

database machine notes

Start the frontend process#

Get a copy of the Frontend and Backend Code#

1) Log in to the frontend machine
2) su rails
3) cd ~/
4) svn checkout svn+ssh://dbuchan@bioinfdev.cs.ucl.ac.uk/svndata/NewPred3/trunk NewPred3
5) svn checkout svn+ssh://dbuchan@bioinfdev.cs.ucl.ac.uk/svndata/NewPredServer/trunk NewPredServer

Start the database#

1) log in to your database machine (bioinf5)
2) sudo /etc/rc.d/init.d/mysqld start
3) Log in to the mysql instance to check that the NewPred_development and NewPred_prouduction databases can be seen

Initialise the database#

If AND ONLY IF this is the first time starting the server run rake to set up the database for production:
1) cd ~/NewPred3/
2) rake db:migrate
3) That should build the development database with the schema specified by the Rails migrations.

Start the front end#

1) We'll run all the server process in their own screen session, to make things maintainable
2) screen -S frontend
3) cd ~/NewPred3/
4) sudo /usr/sbin/httpd -k start this starts the production server on the front end DO NOT start rails with webrick
5) The Rails server should now be visible via a web browser on port 80, test it out
6) If you a restarting the main server then bioinf.cs.ucl.ac.uk/bio_serf should show you the job queue. This will tell you the frontend is bound to the db correctly
7) exit the screen session with ctrl-a+d

Start the queue daemon#

1) screen -S runner
2) cd ~/NewPred3/
3) ./runner_daemon.pl
4) The queue daemon should now be seen to poll the jobs table in the database every 20-30 seconds
If it is working you should see something like this echoed to the terminal:
Jobs found : 0
Job Queue: 0
If that doesn't happen there might already be a live runner process (orphaned thread) ps for it and kill it then try again
5) exit the screen session with ctrl-a+d

Start the backend nodes#

In turn you need to log in to each of your backend machines and start the java, there are 2 possible ways to do this depending on whether you're using your own node OR one of the images that Tristan set up
You will need to compile the NewPredServer jar. Checkout the NewPredServer code from SVM then I suggest import to Netbeans or Eclipse, compile, then copy over the NewPredServer.jar to the /NewPredServer/dist/ dir where you are about to start the server

Starting your own image#

1) Log in to the machine
2) screen -S backend
3) cd /webdata/binaries/current/NewPredServer/
4) java -Xmx1024m -jar NewPredServer.jar or edit and run_bioinf.sh
5) You should see the RPC servers notes as it comes live
6) exit the screen session with ctrl-a+d and log out

Starting one of Tristan's images THIS IS THE PREFERRED METHOD#

1) log in to the machine
2) sudo /root/start.bioserv
3) The server will now be running with the bioinfd user and sending it's outputs to /var/log/bioinfd

You can check that the backend is running with#

1) ps aux | grep bioinfd
You should see something like:
root     14356  0.0  0.0 161420   760 ?        S    Feb25   0:00 su bioinfd - ./run_bioinf.sh
bioinfd  14357  0.0  0.0 106088   948 ?        S    Feb25   0:00 bash - ./run_bioinf.sh
bioinfd  14358  0.7 14.5 5808036 1171272 ?     Sl   Feb25 196:28 /usr/bin/java -Xmx2048m -jar /webdata/binaries/current/NewPredServer/dist/NewPredServer.jar
dbuchan  19596  0.0  0.0 103240   840 pts/0    SN+  19:26   0:00 grep bioinfd

Update the backend server configurations for your new webserver#

1) Go to http://YOURMACHINE:3000/configurations
2) For every backend node you have Click "New Server"
3) Change localhost to a useful identifier for the backend server
4) Change to http://SERVER_IP_ADDRESS:8083/
5) Click 'Create Server'

Add the job configuration for the jobs your want to test#

Then click New Configuration You need to create configurations for the services that newpred will run (services names at the top are case sensitive). These set out where a service will find it's executables and it's default settings for running things. Feel free to change things to reflect where you've actually put things in space that the front and backend nodes can see (i.e. /webdata)

Sample Default Configurations can be found on this page

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 22-Mar-2013 17:04 by UnknownAuthor