********* *To clear the database: ********* 1: ssh to mahjongg.lab.ece.cmu.local 2: Run "create_table.sql" /usr/local/mysql/bin/mysql -u team1 ece749_team1 -pletmein < /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/dbscripts/create_table.sql 3: Run "setup_templates.sql" /usr/local/mysql/bin/mysql -u team1 ece749_team1 -pletmein < /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/dbscripts/setup_templates.sql 4: Run "tr_i_game.sql" (Requires the user to have super privaleeges, which we lost after the DB on mahjongg was restored.) /usr/local/mysql/bin/mysql -u team1 ece749_team1 -pletmein < /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/dbscripts/tr_i_game.sql ********* *To run the Final demo: ********* 1: ssh into a cluster machine (e.g., magenta, periwinkle, or othello). 2: copy the server jar file (SuDuelKu.jar) to the deploy directory of JBoss. cp /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/server/SuDuelKu.jar /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/jboss/default/deploy/ 3: copy the naming server jar file (SuDuelKuNaming.jar) to the deploy directory of JBoss. cp /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/server/SuDuelKuNaming.jar /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/jboss/default/deploy/ 4: copy the util jar file (SuDuelKuUtil.jar) to the lib directory of JBoss. cp /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/server/SuDuelKuUtil.jar /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/jboss/default/lib/ 5: Set your JAVA_HOME environment variable to the appropriate install of java. On color machines => /usr/local/j2sdk1.4.0/ On games machines => /usr/local/j2sdk1.4.2_02/ 6: Start JBoss on four different hosts - devilbunny, girltalk, drlucky, and chess (These are the initial servers which are defined in the suduelke.properties file that resides in the SuDuelKu.jar file and in the libs directory - /afs/ece/usr/crnelson/ece_www/final_demo/libs/). /afs/ece/class/ece749/ejb/jboss-3.2.3/bin/run.sh -c team1 & 7: Wait for JBoss to finish loading on each game machine(< 60 seconds). 8: In a new terminal window, ssh into mahjongg.lab.ece.cmu.edu and start the recovery manager. Once the recovery manager has found and registered the servers that were started in teh steps above, it will print out a message saying it is time to start the clients and will start printing the status of the servers as it polls them. Use the script /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/server/startRecoveryMgr or use the command below. If using the command below, make sure that SuDuelKuUtil.jar, SuDuelKuNaming.jar, SuDuelKu.jar, jbbossall-client.jar, and SuDUelKuRecoveryManager.jar are all on the class path. java -cp /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/libs/SuDuelKuUtil.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/server/SuDuelKuNaming.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/server/SuDuelKu.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/server/SuDuelKuRecoveryManager.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/libs/jbossall-client.jar ssd.mse.recovery.Driver /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/libs 9: In a new terminal window, ssh into a different cluster machine. 10: Startup the client (ssd.mse.client.ui.Driver) passing it the arguments: EJB . EJB is a flag to tell the application to use the CLI and remote game room rather then a local stub. User name can be any user name you wish to use. The properties file tells the client the list of initial servers it can contact. Make sure that SuDuelKuUtil.jar, SuDuelKuNaming.jar, jbossall-client.jar, SuDuelKuServer.jar, and SuDuelKuClient.jar are on the classpath. Use the below command, or run /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/client/startClient java -cp /afs/ece/usr/crnelson/ece_www/final_demo/libs/SuDuelKuUtil.jar:/afs/ece/usr/crnelson/ece_www/final_demo/libs/jbossall-client.jar:/afs/ece/usr/crnelson/ece_www/final_demo/server/SuDuelKuNaming.jar:/afs/ece/usr/crnelson/ece_www/final_demo/server/SuDuelKu.jar:/afs/ece/usr/crnelson/ece_www/final_demo/client/SuDuelKuClient.jar ssd.mse.client.ui.Driver EJB /afs/ece/usr/crnelson/ece_www/final_demo/libs awesomeTA 11: To start up the GUI, copy all jar files to a local machine that has access to the games cluster. Use the command below ensuring that you have SuDuelKu.jar, SuDuelKuNaming.jar, SuDuelKuUtil.jar, jbossall-client.jar, and SuDuelKuClient.jar on your class path. The below command works as-is when executed form the team's final_demo directory when it is coppied to a local machine. java -cp server/SuDuelKu.jar:server/SuDuelKuNaming.jar:libs/SuDuelKuUtil.jar:libs/jbossall-client.jar:client/SuDuelKuClient.jar ssd.mse.client.ui.Driver SWING libs awesomeTA ********* *To play (with the cli)! ********* 1: You can list games with the "l" command. If you have just reset the database you will get a message saying there are no games. 2: Create a new game with the "c " command. 3: If you list games again with the "l" command you will see the game you just created listed with the name you supplied. ********* *To Run the Fault Injector ********* 1: Start the fault injector on a color or games machine of your choice using the command below, or the startFaultInjector script in the server directory of the final_demo directory. Make sure that SuDuelKuUtil.jar, jbossall-client.jar, SuDuelKuNaming.jar, and SuDuelKuFaultInjector.jar are on the classpath. java -cp /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/libs/SuDuelKuUtil.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/libs/jbossall-client.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/server/SuDuelKuNaming.jar:/afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/server/SuDuelKuFaultInjector.jar ssd.mse.faultinjector.Driver /afs/ece.cmu.edu/class/ece749/public_html/teams-06/team1/final_demo/libs CLI 2: Set the naming server the Fault INjector should use to find game servers using the sn command and the host name of the machine hosting the naming server (if the properties file has not been modified from how it was delivered this machine should be drlucky.lab.ece.cmu.local). ********* *Gotchas ********* 1: The CLI was never fully integrated with the messaging services, so it does not currently allow a user to play the game. 2: The GUI is only tested on local machines with a local jboss instance. It should work with servers running on the games cluster if the machine running the GUI has access to the games cluster. 3: The fault injector requires a naming server to be running to find the list of active gaming servers. 4: The recovery manager needs at least on naming server running when it starts in order to register all the servers it fins when it starts. 5: If new clients are started and neither of the original naming servers are up, the clients will not be able to find a naming server and they will quit.