Author: klichong Date: Thu Jun 4 17:17:19 2009 New Revision: 781799 URL: http://svn.apache.org/viewvc?rev=781799&view=rev Log: fix for JIRA issue OLIO-100 - references to web20 still exist in the document
Modified: incubator/olio/docs/java_setup.html Modified: incubator/olio/docs/java_setup.html URL: http://svn.apache.org/viewvc/incubator/olio/docs/java_setup.html?rev=781799&r1=781798&r2=781799&view=diff ============================================================================== --- incubator/olio/docs/java_setup.html (original) +++ incubator/olio/docs/java_setup.html Thu Jun 4 17:17:19 2009 @@ -6,6 +6,8 @@ + + @@ -15,6 +17,7 @@ + @@ -25,6 +28,8 @@ + + <title>Olio/Java Install and Setup Guide</title> <meta name="generator" content="Bluefish 1.0.7"> @@ -32,6 +37,8 @@ + + @@ -42,6 +49,8 @@ + + @@ -52,6 +61,8 @@ + + @@ -62,6 +73,8 @@ + + @@ -76,18 +89,21 @@ + <h1 align="center">Olio/Java<br> + Install and Setup Guide From Source Tree</h1> + <p><span style="font-weight: normal;">Note: The application currently does not use memcached. Please ignore the memcached related setup instructions</span><br> @@ -96,18 +112,21 @@ + </p> + <h2>Overview</h2> + <p>Java Olio is a macro-level benchmark consisting of the following components:</p> @@ -116,51 +135,60 @@ + <ol> + <li> + <p style="margin-bottom: 0in;">The web application</p> + </li> + <li> + <p style="margin-bottom: 0in;">The main database </p> + </li> + <li> + <p style="margin-bottom: 0in;">Distributed storage servers (MogileFS or localFS)</p> @@ -168,17 +196,20 @@ + </li> + <li> + <p style="margin-bottom: 0in;">Storage metadata database (for MogileFS)</p> @@ -186,52 +217,61 @@ + </li> + <li> + <p style="margin-bottom: 0in;">Geocoder emulator </p> + </li> + <li> + <p>Workload driver</p> + </li> + </ol> + <p>If your primary interest is in setting up the application alone, you need items 1-5 above and they can all be setup on a single system. If on the other hand, you would like to drive load against the @@ -247,6 +287,7 @@ + <p>For a horizontally scaled workload, or to measure the performance of the individual components, you can deploy the SUT components on separate physical or virtual machines. Keep in @@ -254,20 +295,24 @@ bulk of cpu is spent in the application server component. <br> + <br> + Java Olio is available either as a kit, or by downloading the source. There are two separate sections that describe how to get started, either by <a href="#Extracting_the_Contents">Extracting the Contents</a>, or by <a href="#Downloading_The_Source">Downloading the source</a>.<br> + <br> + In the following sections, we'll go over the steps needed to configure each component :</p> @@ -275,8 +320,11 @@ + <a href="#Extracting_the_Contents">Extracting the Contents</a><br> + <br> + <a href="#Downloading_The_Source">Downloading the source</a> <p><a href="#setupDriver">Setting up the driver</a></p> @@ -284,6 +332,7 @@ + <p><a href="#installWebApp">Installing the Web Application</a></p> @@ -291,24 +340,28 @@ + <p><a href="#setupDB">Setting up the database</a></p> + <p><a href="#loadDB">Loading the database</a></p> + <p><a href="#setupFileStore">Setting up the filestore</a></p> + <p><a href="#startMemCached">Starting memcached Server</a></p> @@ -316,6 +369,7 @@ + <p><a href="#setupEmulator">Setting up the Geocoder Emulator</a></p> @@ -323,18 +377,21 @@ + <p><a href="#testWebApp">Testing the web application</a></p> + <p><a href="#startRun">Starting a benchmark run</a></p> + <h2><a name="Prerequisite_Software:"></a>Prerequisite Software:</h2> @@ -342,12 +399,14 @@ + <ul> + <li><a href="http://java.sun.com/javase/downloads/index.jsp">Java SE 6</a></li> @@ -355,6 +414,7 @@ + <li><a href="http://ant.apache.org/">Apache Ant </a></li> @@ -362,6 +422,7 @@ + <li><a href="http://subversion.tigris.org/">Subversion: </a> an open source revision control system</li> @@ -369,6 +430,7 @@ + <li><a href="http://faban.sunsource.net/">Faban</a> a facility for developing and running benchmarks.</li> @@ -376,131 +438,170 @@ + <li>Java EE 5 compliant application server - eg. <a href="https://glassfish.dev.java.net/public/downloadsindex.html">GlassFish</a></li> + <li>Java Persistence API (JPA) provider - eg. <a href="http://www.eclipse.org/eclipselink/">Eclipselink</a></li> + <li>Database tier - eg. mySQL</li> + </ul> + <h2><a name="Extracting_the_Contents"></a>Extracting the Contents</h2> + <br> + The Olio/Java kit is packaged as a gzipped tar file. The first task is to unzip the file and untar it to extract it's contents. Because of the long pathnames, please use gtar to extract. This can be done as follows:<br> + <br> + # gzcat olio-java-<version>.tar.gz | gtar xvf -<br> + <br> + This will cause a directory named olio-java-<version> to be created whose contents should look like:<br> + <br> + # ls olio-java-0.1*<br> + <br> + LICENSE JavaOlioDriver.jar RELEASE-NOTES-java-0.1.txt geocoder.war Java_setup.html<br> + <br> + NOTICE olioJava/ release<br> + <br> + #<br> + <br> + We will use $JAVA_OLIO_HOME to designate the name of this directory. A description of the contents follows :<br> + <br> + <ul> - <li> The oliojava directory contains the web application. This -application will be deployed on the webserver. This oliojava/<br> + + <li> The <span style="font-style: italic;">oliojava</span> directory contains the web application. This +application will be deployed on the webserver. <br> + <br> + </li> - <li> JavaOlioDriver.jar contains the load generator/driver -(which we typically refer to simply as driver). The driver is -implemented using Faban, an open source benchmarking toolkit.<br> + + <li> <span style="font-style: italic;">JavaOlioDriver.jar</span> contains the load generator/driver +(which we typically refer to simply as <span style="font-style: italic;">driver</span>). The driver is +implemented using <a href="http://sunsource.faban.net">Faban</a>, an open source benchmarking toolkit.<br> + <br> + </li> - <li>geocoder.war contains the simple servlet used to emulate the geocoder.<br> + + <li><span style="font-style: italic;">geocoder.war</span> contains the simple servlet used to emulate the geocoder.<br> + <br> + </li> - <li>java_setup.html is this document.<br> + + <li><span style="font-style: italic;">java_setup.html</span> is this document.<br> + <br> + </li> - <li>release contains the release name. LICENSE and NOTICE contain the licenses.<br> + + <li><span style="font-style: italic;">release</span> contains the release name. LICENSE and NOTICE contain the licenses.<br> + </li> + </ul> + <h2><a name="Downloading_The_Source"></a>Downloading The Source</h2> @@ -508,12 +609,14 @@ + <span style="text-decoration: underline; font-weight: bold;"></span><br> + The Olio source is available via SVN at <a href="https://svn.apache.org/repos/asf/incubator/olio/">https://svn.apache.org/repos/asf/incubator/olio/</a>. Please see the <a href="http://www.apache.org/dev/version-control.html#anon-svn">instructions</a> for downloading the source. We will use $OLIO_HOME to designate the @@ -524,18 +627,21 @@ + <br> + <ul> + <li>The <span style="font-style: italic;">webapp</span> directory contains the web application. The java/trunk sub-directory contains the workspace for the Java application. The java source @@ -548,18 +654,21 @@ + </ul> + <ul> + <li>The <span style="font-style: italic;">workload</span> directory contains the code for the load generator/driver (which we typically refer to simply as driver). The @@ -571,30 +680,36 @@ $WORKLOAD in this document.<br> + </li> + <li>The geocoder directory contains the code for the geocoder emulator. This code is shared across all implementations of Olio.<br> + </li> + </ul> + <p></p> + <h2><a name="setupDriver"></a>Setting up the driver</h2> @@ -602,6 +717,7 @@ + Even if you don't plan to drive load against the application, this setup is required as the database and file loaders are part of the workload driver - feel free to install the driver on the same @@ -612,11 +728,13 @@ + <li> + <p align="left">See <a href="http://faban.sunsource.net/docs/guide/harness/install.html">http://faban.sunsource.net/docs/guide/harness/install.html</a> for Faban installation instructions. Note that faban needs to be installed on all the machines used for the benchmark. Please @@ -629,29 +747,35 @@ + </li> + <li> + <p align="left">To build the driver, do the following:<br> + </p> + + @@ -662,24 +786,28 @@ + <li>cd $WORKLOAD/java/trunk<br> + <br> + </li> + <li>Copy build.properties.template to build.properties. Edit this new file build.properties and set faban.home to $FABAN_HOME, faban.url to <span style="font-family: monospace;">http://driver_host:9980 </span>where <span style="font-style: italic;">driver_host</span> @@ -690,18 +818,21 @@ + <br> + </li> + <li>Set the environment variable JAVA_HOME to point to your JDK1.6 installation.<br> @@ -709,39 +840,48 @@ + <br> + </li> + <li>Build the driver using the command: ant deploy.jar. If successful, you should see the file JavaWeb20Driver.jar in the build sub-directory.</li> + <br> + + </ul> + </li> + <li>Download MySQL Connector/J (JDBC Driver for MySQL) and install the jar in $FABAN_HOME/benchmarks/JavaOlioDriver/lib.</li> + @@ -752,6 +892,7 @@ + <p align="left">For the driver to work, you will need JDK 1.6. Set JAVA_HOME to the path of the JDK in the faban user's environment.</p> @@ -760,17 +901,20 @@ + </li> + <li> + <p align="left">Start the faban master on the master driver machine :</p> @@ -778,6 +922,8 @@ + + @@ -788,31 +934,37 @@ + </li> + <li> + <p align="left">Test that you can connect to the master by pointing your browser at http://<i><driver_machine></i>:9980. You should see the Faban welcome page or if you have already deployed the driver, a page with the text "Welcome to Java Olio Workload"</p> + </li> + <li>To deploy the Faban driver, you can -either copy $WORKLOAD/build/Web20Driver.jar to the +either copy $WORKLOAD/build/JavaOlioDriver.jar to the $FABAN_HOME/benchmarks directory, or execute <span style="font-family: monospace;">ant deploy</span>. Executing the deploy target will deploy the build jar file on the Faban master that you specified as the 'faban.url' in the build.properties file. To use ant deploy you must have completed steps 4, 6 and 7 and have Faban up and running.</li> + @@ -824,6 +976,7 @@ + <span style="font-weight: bold;"></span> <h2><a name="Setting_Up_the_Database"></a>Setting Up the Database</h2> @@ -832,6 +985,7 @@ + Sun Web Stack (formerly known as Coolstack) is one pre-integrated suite of open source applications optimized for Solaris. If you're running on any other operating system, please install the mySQL on those systems. You can <a href="https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/viewproductdetail-start?productref=web-stack-1.4-oth-...@cds-cds_smi">download</a> the official Sun binaries for Sun Web Stack if you are on Solaris or Red Hat Linux. @@ -842,6 +996,7 @@ + <li>If you plan to run MySQL on a separate machine, install MySQL on that system. We will refer to the MySQL installation directory as @@ -851,11 +1006,13 @@ + <li> + <p>Setup the mysql user/group and permissions for its directories: <br> @@ -863,12 +1020,14 @@ + <span style="font-family: monospace;"></span><span style="font-family: monospace;"># groupadd mysql </span><br style="font-family: monospace;"> + <span style="font-family: monospace;"># useradd -d $MYSQL_HOME -g mysql -s /usr/bin/bash </span><span style="font-family: monospace;">mysql</span><span style="font-family: monospace;"><br> @@ -876,6 +1035,7 @@ + # chown -R mysql:mysql $MYSQL_HOME</span><br> @@ -883,62 +1043,74 @@ + <span style="font-family: monospace;"></span></p> + </li> + <li> + <p>Create the database :<br> + <span style="font-family: monospace;"># su - mysql</span><br style="font-family: monospace;"> + <span style="font-family: monospace;">$ cd bin</span><br style="font-family: monospace;"> + <span style="font-family: monospace;">$ ./mysql_install_db</span></p> + </li> + <li>A sample MySQL configuration file (my.cnf) is included in the $WEBAPP/etc. Please read the embedded comments and edit the file appropriately after copying it to /etc. Note that the data directory that the <span style="font-style: italic;">innodb_data_home_dir</span> variable refers to must be writable by the mysql user.<br> + </li> + <li> + <p>Start the mysql server. Substitute your own password for <i>pwd </i><span style="font-style: normal;">(we typically use</span><i> adminadmin</i><span style="font-style: normal;">)</span><br> @@ -947,12 +1119,14 @@ + <span style="font-family: monospace;">$ </span><span style="font-family: monospace;">./mysqld_safe --defaults-file=/etc/my.cnf &</span><br style="font-family: monospace;"> + <span style="font-family: monospace;">$ ./mysqladmin -u root password <span style="font-style: italic;"><your-</span></span><i style="font-family: monospace;"><span style="font-style: italic;">password></span><br> @@ -960,6 +1134,7 @@ + $ </i><span style="font-family: monospace;">./mysqladmin -u root -h <machine-name> password</span><i style="font-family: monospace;"> <your-password></i></p> @@ -968,23 +1143,27 @@ + </li> + <li> + <p>Create the olio user and grant privileges :<br> + <span style="font-family: monospace;">$ ./mysql -uroot -p</span><i style="font-family: monospace;">pwd</i><br style="font-family: monospace;"> @@ -992,6 +1171,7 @@ + <span style="font-family: monospace;">mysql> create user 'olio'@'%' identified by 'olio';</span><br style="font-family: monospace;"> @@ -999,6 +1179,7 @@ + <span style="font-family: monospace;">mysql> grant all privileges </span><span style="font-family: monospace;">on *.* to 'olio'@'%' identified by 'olio' with grant option;</span><span style="font-family: monospace;"></span><span style="font-family: monospace;"><br> @@ -1007,18 +1188,21 @@ + </span><span style="font-family: monospace;"></span><span style="font-family: monospace;"><br> + <br> + </span>In some cases the wildcard '%' does not work reliably as a substitution for all hosts. You need to grant the privileges to @@ -1030,6 +1214,7 @@ + <span style="font-family: monospace;"></span>Eg.<span style="font-family: monospace;"> mysql> grant all </span><span style="font-family: monospace;">privileges </span><span style="font-family: monospace;">on @@ -1039,22 +1224,26 @@ + </p> + </li> + <li>Create database<br> + <span style="font-family: monospace;">mysql> create database bpwebapp;</span><br style="font-family: monospace;"> @@ -1062,6 +1251,7 @@ + <span style="font-family: monospace;">mysql> use bpwebapp;<br> @@ -1069,18 +1259,21 @@ + <br> + </span></li> + <li>Although it is possible to create the database schema automatically by JPA upon deployment or when the application server starts, it recommended to @@ -1093,12 +1286,14 @@ + <br> + <span style="font-family: monospace;">mysql> \.</span><span style="font-style: italic; font-family: monospace;"> <location></span><span style="font-family: monospace;">/schema.sql<br> @@ -1106,12 +1301,14 @@ + mysql> exit</span><span style="font-family: monospace;"><br> + </span> Now, if you login as the user olio, you should be able to see the database created by the root user.</li> @@ -1120,12 +1317,14 @@ + </ol> + <h2><a name="loadDB"></a> <font size="4">Loading the database</font></h2> @@ -1133,6 +1332,7 @@ + <p><font size="3">It is best to load the database manually the first time so that we can test the web application. However, while doing @@ -1143,17 +1343,20 @@ + <ol> + <li> + <p><font size="3">Login to the machine running the Faban master driver. Only this machine has the loader at this time.</font></p> @@ -1161,12 +1364,14 @@ + </li> + <li><font size="3">Go to the directory containing the loader script:<br> @@ -1174,12 +1379,14 @@ + </font><font size="3"><span style="font-family: monospace;"># cd </span></font><span style="font-family: monospace;"><span style="font-style: italic;">$FABAN_HOME</span>/benchmarks/JavaOlioDriver/bin</span></li> + <li>Ensure the script has execute permissions. Faban takes care of this for the runs, but since we have not yet started the first run, we will need to change that ourselves:<br> @@ -1188,25 +1395,30 @@ + <span style="font-family: monospace;"># chmod +x dbloader.sh</span></li> + <li>You may have to edit the dbloader.sh to reflect your version of the JDBC Driver for MySQL that you downloaded and placed in the $FABAN_HOME/benchmarks/JavaOlioDriver/lib in step 3 of <a href="#setupDriver">Setting Up the Driver</a> section. On line 51 of dbloader.sh, the CLASSPATH is currently set to MySQL JDBC driver version 5.0.6. <br> + Eg. <span style="font-family: monospace;">CLASSPATH=$B/mysql-connector-java-5.0.6-bin.jar</span></li> + <li>Run the loader script:<br> + <span style="font-family: monospace;"># ./dbloader.sh <span style="font-style: italic;"><dbserver> <load_scale></span></span><br> @@ -1214,6 +1426,7 @@ + For a fully loaded T2000 (8x1.2Ghz) we are currently running a scale of around 1000. You can start small with a SCALE of 50 or so for initial testing<span style="font-weight: bold;">.</span></li> @@ -1222,6 +1435,7 @@ + <span style="font-family: monospace;"></span> </ol> @@ -1229,6 +1443,7 @@ + <h2><a name="startMemCached"></a><font size="4">Setting up memcached server</font></h2> @@ -1236,6 +1451,7 @@ + Note - for the current version of Olio Java, you will not have need to install memcached servers. <br> @@ -1243,12 +1459,14 @@ + <br> + The Olio application uses memcached for caching the home page which dramatically reduces the load on the database. If you are running Olio to stress MySQL, you may not want to have the caching tier. In this @@ -1263,6 +1481,7 @@ + <li>Download and install memcached on the system you plan to use. </li> @@ -1270,11 +1489,13 @@ + <li> + <p style="margin-bottom: 0in;"><font size="3">Start the memcached server thus :<br> @@ -1282,6 +1503,7 @@ + </font><font size="3"><span style="font-family: monospace;"># nohup /opt/coolstack/bin/memcached -m 256 -u mysql &</span></font></p> @@ -1289,17 +1511,20 @@ + </li> + <li> + <p style="margin-bottom: 0in;">Edit the web.xml to reflect where you have installed your memcached servers (see Installing Web Application for more details).<font size="3"><span style="font-family: monospace;"><br> @@ -1308,6 +1533,7 @@ + </span></font><font size="3">Note that the Faban harness will start the memcached servers before each run.</font></p> @@ -1315,18 +1541,21 @@ + </li> + </ol> + <h2><a name="setupEmulator"><font size="4">Setting up the Geocoder Emulator</font></a></h2> @@ -1335,6 +1564,7 @@ + <p>The Geocoder Emulator is a simple J2EE application that you can deploy on Glassfish or Tomcat. It is typically run on a driver machine. The @@ -1345,18 +1575,21 @@ + <p>To build the geocoder:</p> + <ul> + <li>Build the geocoder.war file by going to the 'geocoder' directory and following the instructions in the README file.</li> @@ -1364,12 +1597,14 @@ + </ul> + <p> For Glassfish:</p> @@ -1377,12 +1612,14 @@ + <ol> + <li>Download and install Glassfish V2 from <a href="https://glassfish.dev.java.net/public/downloadsindex.html">https://glassfish.dev.java.net/public/downloadsindex.html.</a> (alternatively, you can use any J2EE container like Tomcat to deploy - see below)</li> @@ -1391,7 +1628,8 @@ - <li>Copy the Web20Emulator.war from the Web20Bench kit to + + <li>Copy the geocoder.war from the geocoder directory ($OLIO_HOME/geocoder) to $GLASSFISH_HOME/domains/domain1/autodeploy (domain1 is the default domain created with Glassfish)</li> @@ -1399,6 +1637,7 @@ + <li>Start Glassfish by using $GLASSFISH_HOME/bin/asadmin start-domain domain1.</li> @@ -1406,12 +1645,14 @@ + </ol> + For Tomcat: <ol> @@ -1419,11 +1660,13 @@ + <li> + <p>Download and install Tomcat (either from Cool Stack CSKtomcat package or directly from <a href="http://tomcat.apache.org/">http://tomcat.apache.org</a>) on the driver machine. The install directory doesn't matter – @@ -1433,46 +1676,56 @@ + </li> + <li> + <p>Build the geocoder.war file by going to the 'geocoder' directory and following the instructions in the README file.</p> + </li> + <li>Copy the geocoder.war file from the geocoder/dist directory to $TOMCAT_HOME/webapps.</li> + <li> + <p>Start Tomcat using $TOMCAT_HOME/bin/startup.sh.</p> + </li> + </ol> + <h2><a name="Installing_the_Web_Application_"></a>Installing the Web Application</h2> @@ -1480,12 +1733,14 @@ + <br> + The web application is a J2EE 5 web application. It requires the following components:<br> @@ -1494,18 +1749,21 @@ + <br> + <ol> + <li>J2EE compliant application server (eg. <a href="https://glassfish.dev.java.net/public/downloadsindex.html">GlassFish v2.1</a>)</li> @@ -1513,18 +1771,21 @@ + <li>JPA provider ( eg. <a href="http://www.eclipse.org/eclipselink/">Eclipselink</a>)</li> + </ol> + Install the necessary components outlined above. For GlassFish specific instructions, see section on GlassFish Installation and @@ -1534,6 +1795,7 @@ + Before building the WAR file to deploy on the application server, you will first have to edit the web descriptors to point to your database and geocoder that you set up in the previous steps. <br> @@ -1542,12 +1804,14 @@ + <ol> + <li>Edit web.xml in the application war file to configure the geocoder URL. This is found in @@ -1557,6 +1821,8 @@ + + @@ -1567,6 +1833,7 @@ + <li>Edit the env-entry for Geocoder URL to point to where your geocoder application is deployed.</li> @@ -1574,6 +1841,8 @@ + + @@ -1584,12 +1853,14 @@ + </ol> + <h2><a name="Building_the_codebase"></a>Building the web application from the codebase</h2> @@ -1597,23 +1868,27 @@ + <ol> + <li>Set JAVA_HOME, ANT_HOME accordingly in your environment.<br> + </li> + <li>In the $WEBAPP/ws/bp-project directory, copy the build.properties.template to build.properties. Edit the build.properties for the relevant build details. @@ -1624,18 +1899,21 @@ + <span style="font-family: monospace;">$ vi <$WEBAPP>/ws/bp-project/build.properties<br> + <br> + </span>Note that javaee.home needs to be pointed to the your Java EE 5 application server home directory, or if you're using GlassFish, the $GLASSFISH_HOME directory. It will look for the @@ -1645,30 +1923,35 @@ + </li> + <li>Change directories to the level of the webapp directory:<br> + <span style="font-family: monospace;">$ cd <$WEBAPP>/ws/apps/webapp<br> + </span></li> + <li>Compile and jar the WAR file by executing the default "ant"command. You should see messages that the build is compiling:<br> @@ -1677,85 +1960,133 @@ + <span style="font-family: monospace;"><br> + $ ant<br> + Buildfile: build.xml<br> + <br> + build:<br> + <br> + default:<br> + <br> + default-ear:<br> + <br> + init:<br> + <br> + -pre-compile:<br> + <br> + bpp-actual-compilation:<br> + [echo] Compiling webapp<br> + [javac] Compiling 49 source files to /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/build/classes<br> + [javac] Note: Some input files use unchecked or unsafe operations.<br> + [javac] Note: Recompile with -Xlint:unchecked for details.<br> + <br> + include-jmaki-local:<br> + <br> + include-jmaki:<br> + [echo] Copying jMaki Runtime to /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/./build/web<br> + [mkdir] Created dir: /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/build/web/temp<br> + [unzip] Expanding: /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/lib/ajax-wrapper-comp-1.8.1.jar into /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/build/web/temp<br> + [mkdir] Created dir: /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/build/web/resources<br> + [delete] Deleting directory /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/build/web/temp<br> + <br> + -post-compile:<br> + [copy] Copying 3 files to /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/build/classes<br> + [mkdir] Created dir: /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/build/web/WEB-INF/lib<br> + [copy] Copying 7 files to /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/build/web/WEB-INF/lib<br> + <br> + ......<br> + ......<br> + <br> + bpp-copy-dist:<br> + [mkdir] Created dir: /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/dist<br> + [copy] Copying 1 file to /Users/klichong/projects/java_testOlio/JavaOlio/webapp/java/trunk/ws/apps/webapp/dist<br> + <br> + default-not-ear:<br> + <br> + default:<br> + <br> + BUILD SUCCESSFUL<br> + </span></li> + <li>The resulting <span style="font-weight: bold;">webapp.wa</span>r file should be located in the <span style="font-family: monospace;"><$OLIO_HOME></span><span style="font-family: monospace;">/ws/apps/webapp/dist </span>directory.</li> @@ -1763,18 +2094,21 @@ + </ol> + <h2>Deploying the Web Application</h2> + The Java Olio web application can be deployed on any Java EE compliant application server with a JPA provider. <ol> @@ -1783,19 +2117,22 @@ + <li> + <p>Deploy -the webapp.war from the web20Bench Java kit from dist directory to your +the webapp.war from the $WEBAPP/ws/apps/webapp/dist directory to your Java EE 5 application server. <br> + If you are using GlassFish, you can do so by either dropping the war file in the $GLASSFISH_HOME/domains/domain1/autodeploy directory. You can @@ -1807,30 +2144,35 @@ + </li> + </ol> + <h2><a name="installWebApp"></a><font size="4">Configuring the Application Server</font></h2> + <ol> + <li>Download the JDBC driver for mysql from <a href="http://dev.mysql.com/downloads/connector/j/5.1.html">http://dev.mysql.com/downloads/connector/j/5.1.html.</a> Extract the mysql-connector-java-5.1.X-bin.jar and put this your application server classpath (or external library directory)</li> @@ -1839,6 +2181,7 @@ + <li>Download a Java Persistence API (JPA) provider, eg. EclipseLink. You will have to download the eclipselink.jar from <a href="http://www.eclipse.org/eclipselink">http://www.eclipse.org/eclipselink</a>, @@ -1848,6 +2191,7 @@ + <li>Create JDBC connection pool and resource for connecting to mySQL database. Below are examples for the properties used for the @@ -1857,6 +2201,7 @@ + * Name: Use this name when you configure the JDBC resource. eg. BPwebappPool<br> @@ -1864,6 +2209,7 @@ + * Resource Type: Specify the appropriate value, eg. javax.sql.DataSource<br> @@ -1871,12 +2217,14 @@ + * Database Vendor: mysql<br> + * DataSource Classname: Specify one of the following:<br> @@ -1884,6 +2232,7 @@ + o com.mysql.jdbc.jdbc2.optional.MysqlDataSource<br> @@ -1891,12 +2240,14 @@ + * Properties:<br> + o serverName - Specify the host name or IP address of the database server.<br> @@ -1905,6 +2256,7 @@ + o port - Specify the port number of the database server eg. 3306<br> @@ -1912,6 +2264,7 @@ + o user - Set as appropriate.<br> @@ -1919,6 +2272,7 @@ + o password - Set as appropriate.<br> @@ -1926,6 +2280,7 @@ + o databaseName - Set as appropriate, eg. bpwebapp<br> @@ -1933,6 +2288,7 @@ + o URL - If you are using global transactions, you can set this property instead of @@ -1943,6 +2299,7 @@ + o Keep the rest of properties created.<br> @@ -1950,12 +2307,14 @@ + <br> + 6. Create the JDBC resource with the JNDI name jdbc/BPWebappDB pointing to new resource created above.<br> @@ -1963,18 +2322,21 @@ + </li> + </ol> + <h2><font size="4"><a name="Glassfish_Installation_and_Configuration"></a> Glassfish Installation and Configuration</font></h2> @@ -1982,17 +2344,20 @@ + <ol> + <li> + <p>Install Glassfish application server V2 UR2 from <a href="https://glassfish.dev.java.net/public/downloadsindex.html"><span style="text-decoration: underline;">https://glassfish.dev.java.net/public/downloadsindex.html.</span></a> <br> @@ -2000,6 +2365,7 @@ + The directory where Glassfish has been installed will now be referred to as $GLASSFISH_HOME. </p> @@ -2007,17 +2373,20 @@ + </li> + <li> + <p>Download the JDBC driver for mysql from <a href="http://dev.mysql.com/downloads/connector/j/5.1.html">http://dev.mysql.com/downloads/connector/j/5.1.html.</a> Extract the mysql-connector-java-5.1.X-bin.jar and drop this is @@ -2028,12 +2397,14 @@ + </li> + <li>The benchmark utilizes JPA (Java Persistence API) and has been benchmarked with the EclipseLink implementation. If you are using @@ -2051,12 +2422,14 @@ + <br> + <li>Instructions on how to use the Glassfish admin interface is <a href="https://glassfish.dev.java.net/javaee5/admin-gui/admin-gui.html#Usage">https://glassfish.dev.java.net/javaee5/admin-gui/admin-gui.html#Usage</a>. @@ -2067,6 +2440,7 @@ + Note: To use the admin interface, you will have to start Glassfish. To do @@ -2078,6 +2452,7 @@ + To stop Glassfish, use $GLASSFISH_HOME/bin/asadmin stop-domain domain1.</li> @@ -2085,11 +2460,13 @@ + <li> + <p>Create JDBC connection pool and resource. Please consult <a href="https://glassfish.dev.java.net/javaee5/docs/AG/ablih.html">https://glassfish.dev.java.net/javaee5/docs/AG/ablih.html</a> for details. MM MySQL Type 4 Driver (Non-XA)<br> @@ -2098,6 +2475,7 @@ + The JAR file for the MySQL driver is mysql-connector-java-version-bin.jar, for example, mysql-connector-java-5.1.6-bin.jar. Configure the connection pool @@ -2107,12 +2485,15 @@ + </p> + + @@ -2123,6 +2504,7 @@ + <li>Name: Use this name when you configure the JDBC resource. eg. BPwebappPool</li> @@ -2130,6 +2512,7 @@ + <li>Resource Type: Specify the appropriate value, eg. javax.sql.DataSource</li> @@ -2137,18 +2520,22 @@ + <li>Database Vendor: mysql</li> + <li>DataSource Classname: Specify one of the following:</li> + + @@ -2159,12 +2546,15 @@ + <li>com.mysql.jdbc.jdbc2.optional.MysqlDataSource</li> + + @@ -2175,12 +2565,15 @@ + <li>Properties:</li> + + @@ -2191,6 +2584,7 @@ + <li>serverName - Specify the host name or IP address of the database server.</li> @@ -2198,6 +2592,8 @@ + + @@ -2208,6 +2604,8 @@ + + @@ -2218,6 +2616,7 @@ + <li>port - Specify the port number of the database server eg. 3306</li> @@ -2225,6 +2624,8 @@ + + @@ -2235,6 +2636,8 @@ + + @@ -2245,24 +2648,28 @@ + <li>user - Set as appropriate, eg. olio</li> + <li> password - Set as appropriate, eg. olio</li> + <li>databaseName - Set as appropriate, eg. bpwebapp</li> + <li>URL - If you are using global transactions, you can set this property instead of serverName, port, and databaseName, eg. @@ -2272,12 +2679,15 @@ + <li>Keep the rest of properties created.</li> + + @@ -2288,6 +2698,8 @@ + + @@ -2298,6 +2710,7 @@ + 6. Create the JDBC resource with the JNDI name jdbc/BPWebappDB pointing to new resource created above. </li> @@ -2305,24 +2718,28 @@ + </ol> + <h2><a name="installWebApp"></a><font size="4">Tuning Glassfish</font></h2> + <ol> + <li>Go to the administration interface, eg. http://localhost:4848.</li> @@ -2330,11 +2747,13 @@ + <li> + <p>Ensure that you have the JVM option "-server" and the heap size has been adequately sized. For benchmarking purposes, we have @@ -2344,17 +2763,20 @@ + </li> + <li> + <p>Start Glassfish. Check that you can connect to it from your browser (http://<i>host</i>:8080), but don't try to access @@ -2365,12 +2787,15 @@ + </p> + + @@ -2381,6 +2806,7 @@ + <li>use $GLASSFISH_HOME/bin/asadmin start-domain domain1 (or whatever your @@ -2390,6 +2816,7 @@ + <li>To stop Glassfish, use $GLASSFISH_HOME/bin/asadmin stop-domain domain1.</li> @@ -2397,6 +2824,8 @@ + + @@ -2407,18 +2836,21 @@ + </li> + </ol> + <h2><font size="4">Setting up the filestore</font></h2> @@ -2426,6 +2858,7 @@ + <p><font size="3">Olio for Java EE can be configured to use either a local filesystem or MogileFS for the object data. Our initial testing with @@ -2447,17 +2880,20 @@ + <ol> + <li> + <p><font size="3">Create a directory (or mount a filesystem) designated for storing the image and binary files. This directory is referred to as <filestore>. Any valid name @@ -2469,29 +2905,34 @@ + </font><font size="3"><span style="font-family: monospace;"># mkdir -p <span style="font-style: italic;"><filestore></span></span><br style="font-family: monospace;"> + <span style="font-family: monospace;"># chmod a+rwx <span style="font-style: italic;"><filestore></span></span></font></p> + </li> + <li> + <p><font size="3">Now load the filestore. You should have the $FABAN_HOME/benchmarks/JavaOlioDriver.jar file on this system.</font><br> @@ -2500,6 +2941,7 @@ + <font size="3"><font style="font-family: monospace;" size="3"># <span style="font-style: italic;"></span></font></font>cd $FABAN_HOME/benchmarks; mkdir olio<br> @@ -2507,18 +2949,21 @@ + <br> + # cd olio; jar xvf ../JavaOlioDriver.jar; chmod a+x bin/*<br> + # $FABAN_HOME/benchmarks/olio/bin/fileloader.sh <load_scale> $FILESTORE<br> @@ -2526,12 +2971,14 @@ + <br> + This loads files for use for up to<span style="font-style: italic;"> load_scale</span> number of active users.<font size="3"><font style="font-family: monospace;" size="3"> <br> @@ -2539,12 +2986,14 @@ + <br> + </font></font><font size="3"><font size="3"><span style="font-family: monospace;"></span></font></font><font size="3"><font size="3"><font>Eg. To load the filestore for 1000 users, you would do the following:</font></font></font><font size="3"><font size="3"><span style="font-family: monospace;"></span></font></font><br> @@ -2552,6 +3001,7 @@ + <span style="font-family: monospace;"># cd /filestore/artifacts</span><br style="font-family: monospace;"> @@ -2559,6 +3009,7 @@ + <span style="font-family: monospace;"># /opt/faban/benchmarks/JavaOlioDriver/bin/fileloader.sh 1000 .</span></p> @@ -2566,11 +3017,13 @@ + <font size="3"><font size="3"><span style="font-family: monospace;"></span></font></font> + <p><font size="3"><font size="3">This loads files for use for up to <span style="font-family: monospace; font-style: italic;">load_scale</span> number of concurrent users. </font></font></p> @@ -2579,12 +3032,14 @@ + </li> + <li><font size="3"><font size="3">The filestore location is read from the application server as a Java environment variable, webapp.image.directory. To set the value of the @@ -2597,21 +3052,25 @@ + </font></font><font size="3"><font size="3"><span style="font-family: monospace;"><br> + </span></font></font><font size="3"><font size="3"><span style="font-family: monospace;"></span></font></font></li> + </ol> + <font size="3"><font size="3"><span style="font-family: monospace;"></span></font></font> <h2><font><font size="4">Testing the Application</font></font></h2> @@ -2620,17 +3079,20 @@ + <ol> + <li> + <p><font size="3">Check the home page (HomePage) http://<web_server>:8080/webapp/index.jsp. If there are no @@ -2640,17 +3102,20 @@ + </li> + <li> + <p><font size="3">Click on an event (EventDetail). Make sure the whole page looks OK. </font> </p> @@ -2658,17 +3123,20 @@ + </li> + <li> + <p><font size="3">Click on an attendee (PersonDetail) to see a person's profile. </font> </p> @@ -2676,17 +3144,20 @@ + </li> + <li> + <p><font size="3">Go back to the home page and click on a tag in the tag cloud. Choose a big tag and check that we have good results and images get loaded OK. </font> </p> @@ -2695,17 +3166,20 @@ + </li> + <li> + <p><font size="3">Click on the Register button on the top left of the home page. Fill in the form and create a user. Make sure you find some jpeg images to upload. If not, take them from $FABAN_HOME/benchmarks/JavaOlioDriver/resources. <br> @@ -2714,6 +3188,7 @@ + Submit the form. Make sure the form goes through. This completes the AddPerson transaction. </font> </p> @@ -2721,17 +3196,20 @@ + </li> + <li> + <p><font size="3">Login using your new login name you just created. The top right of the screen should show that you're logged on. </font> </p> @@ -2740,17 +3218,20 @@ + </li> + <li> + <p><font size="3">Select an event, go back to the EventDetail page but this time as a logged on user. <br> @@ -2758,6 +3239,7 @@ + Add yourself as an attendee. This is the EventDetail transaction with attendee added (about 8-9% of all EventDetail views). </font> </p> @@ -2765,17 +3247,20 @@ + </li> + <li> + <p><font size="3">Click on the add event tab and add an event. Make sure to include an image and some literature. You can also use the files from <br> @@ -2784,6 +3269,7 @@ + $FABAN_HOME/benchmarks/JavaOlioDriver/resources. Fill in the form and submit. This is the AddEvent transaction. <br> @@ -2791,30 +3277,35 @@ + <br> + </font> </p> + </li> + </ol> + <h2><a name="startRun"></a><font size="4">Starting a benchmark run</font></h2> @@ -2822,6 +3313,7 @@ + <p style="margin-bottom: 0in;">Now that we know that the web application is running and the faban harness is up, it is time to @@ -2831,12 +3323,14 @@ + <ol> + <li>Kill memcached. Memcached is always started by the driver before the run to ensure a clean cache and will cause port conflicts if it is already running.</li> @@ -2845,28 +3339,33 @@ + <li> + <p>Point your browser at http://<i><driver_machine></i>:9980</p> + </li> + <li> + <p>Click on the <span style="font-style: normal;"><b>Schedule Run</b></span> link.</p> @@ -2874,17 +3373,20 @@ + </li> + <li> + <p>Under the JAVA tab, set the JAVA_HOME. You can accept the default value for JVM options. <span style="font-weight: bold;">DO NOT</span> click on the OK button yet !</p> @@ -2893,23 +3395,28 @@ + </li> + <li> + <p>Select the Driver tab. </p> + + @@ -2923,6 +3430,8 @@ + + @@ -2935,6 +3444,8 @@ + + @@ -2946,6 +3457,8 @@ + + @@ -2959,6 +3472,8 @@ + + @@ -2972,6 +3487,8 @@ + + @@ -2986,42 +3503,53 @@ + </li> + <li> + <p>Select the Web Server tab.<br> + <br> + The number of Agents is best the same or multiple the number of driver machines - we start with 1. The Host:Port Pairs field takes the host port pairs where the web applications are running. The host and port is separated by a colon. Each pair is separated by space. Note that you cannot use the string "localhost" - you must specify a valid hostname or IP number. <br> + <br> + For the Webserver type field, enter either "GlassFish" dependent on which web server you're using, or leave the field blank if you're using servers other than these two. Only the GlassFish servers are supported at this time. Then provide the application server's bin, log, and config directories. <br> + <br> + You can ignore the box for the directory containing the php.ini file in the respective fields - that field is for the PHP version of Olio. <br> + <br> + Next, choose the server type to be Java, if it is not already that way. Then, in the tools box, type the tools you want to run. Here are the tools we typically run : vmstat @@ -3031,6 +3559,8 @@ + + @@ -3043,7 +3573,9 @@ entered correctly. If set to true, then the harness will not start the GlassFish server and assume that you have already started it before the run.<br> + <br> + The number of Agents is the same as the number of driver machines – we start with 1.</p> @@ -3051,18 +3583,25 @@ + + <p style="margin-bottom: 0in;">Enter the Host and Port -where the web application is running. Note that you cannot use the string "localhost" - you must specify a valid hostname or IP number. <br> +where the web application is running. Note that you cannot +use the string "localhost" - you must specify a valid hostname or IP +number. <br> + </p> + + @@ -3074,17 +3613,20 @@ + </li> + <li> + <p style="margin-bottom: 0in;">Select the Data Servers tab.</p> @@ -3092,6 +3634,8 @@ + + @@ -3099,6 +3643,7 @@ <p style="margin-bottom: 0in;">For the database server, enter the Host name. Edit the hostname part along of the JDBC Connection URL. Note that you cannot use the string "localhost" - you must specify a valid hostname or IP number. <br> + This is used by the loader program to reload the database before a run. Set the 'Loader for Concurrent Users' to 25 (this is the minimum number of users we can load for and is good for up @@ -3112,6 +3657,8 @@ + + @@ -3124,6 +3671,8 @@ + + @@ -3139,6 +3688,7 @@ + <span style="font-weight: bold;">*NOTE - the memcache server information is not necessary in this release of Java Olio. You can leave these fields blank</span></p> @@ -3146,17 +3696,20 @@ + </li> + <li> + <p>That's it. Click OK and the run should be scheduled. You can click on the View Results link on the left to monitor the run.</p> @@ -3164,23 +3717,27 @@ + </li> + </ol> + <br> + </body> </html>