ngrinder ngrinder 2014-11-09T19:53:53+09:00 www.cubrid.org/wiki_ngrinder/atom XpressEngine Import Groovy Maven Project in IntelliJ www.cubrid.org/804941 2013-10-18T00:15:56+09:00 2014-02-22T00:55:48+09:00 junoyoon <div class="xe_content"><blockquote> <p>JetBrain IntelliJ IDEA is the most excellant IDE in the Java world and a lot of open source developers are adopting it in their daily life tools. Recently nGrinder dev team switched the IDE from Eclipse to IntelliJ as well. </p> </blockquote> <p>IntelliJ is the quite good match to nGrinder Groovy Maven project because it already includes all the plugins(Groovy, SVN, Maven) in its default package and needs very few configurations to run nGrinder test cases. Please follow the below descriptions.</p> <ol> <li>Install IntelliJ IDEA Community Edition (It’s free) <ul> <li><a class="www.jetbrains.com/idea/download/">www.jetbrains.com/idea/download/</a> </li> </ul> </li> <li>Run IntelliJ IDEA. Enables SVN(Select VCS Integration Plugins page), Maven, Groovy supports(Slect Other Plugins Page). </li> <li>Select “Check out from Version Control” <br /><a class="/files/attach/images/379199/941/804/image_4.png"><img src="/img/spacer.gif"> Easy Clustering Guide www.cubrid.org/1088673 2014-01-25T23:45:25+09:00 2014-02-21T11:53:05+09:00 junoyoon <div class="xe_content"><p>From nGrinder 3.3, nGrinder support "easy" clustering mode which let multiple controllers run in a single machine. Because they runs in a single machine, no&nbsp; network file system for ${NGRINDER_HOME} is not necessary. The running controllers will work with local ${NGRINDER_HOME}. Please follow the steps below.</p> <h2>Run H2 TCP Server</h2> <ol> <li>Download H2 and unzip it. <ul> <li><a title="www.h2database.com/h2-2014-01-18.zip" class="www.h2database.com/h2-2014-01-18.zip">www.h2database.com/h2-2014-01-18.zip</a> </li> </ul> </li> <li>Run H2 TCP Server <ul> <li>bin&#92;h2.bat or bin/h2.sh </li> </ul> </li> </ol> <h2>Run Controllers</h2> <ol> <li>Run controllers pointing different web(-p)/cluster(-clp)/controller(-cp)&nbsp;port and region name(-r). If they're over-wrapped,&nbsp; the controllers fail to run due to the port conflict.&nbsp; <br /> <pre class="brush:bash;highlight:[highlight]" title="">java -jar -XX:MaxPermSize=200m -jar ngrinder-controller-X.X.war -p 8080 -cm easy -clp 10010 -r region1 -cp 9001 java -jar -XX:MaxPermSize=200m -jar ngrinder-controller-X.X.war -p 8081 -cm easy -clp 10011 -r region2 -cp 9002 java -jar -XX:MaxPermSize=200m -jar ngrinder-controller-X.X.war -p 8082 -cm easy -clp 10012 -r region3 -cp 9003 </pre> <ul> <li>For the CLI options, see [Controller Configuration Guide] </li> </ul> </li> <li>Visit one of the web port and login <ul> <li><a class="localhost:8080/">localhost:8080/</a> </li> </ul> </li> <li>And check the region is activated and all regions are up. <br /><a class="/files/attach/images/379199/673/088/001/image_2.png"><img src="/img/spacer.gif"> Installation Guide www.cubrid.org/1079674 2014-01-20T14:25:32+09:00 2014-02-17T11:58:47+09:00 junoyoon <div class="xe_content"><blockquote class="q4"><span style="px;">This contains the installation guide for nGrinder 3.3 or later. If you want to see the previous version's installation guide, Please visit [Installation Guide - version 3.2] </span><br /><span style="px;">This guide shows how to install nGrinder 3.3 or later.</span></blockquote> <h2>Prerequisite</h2> <ul> <li>nGrinder is a combination of a web application(Controller) and Java applications(Agent, Monitor). If you don’t know what a controller and agent are, please refer to Architecture. <br />To install nGrinder controller and agent, you need Oracle JDK 1.6~ or OpenJDK 1.7~. </li> <li>Please check your PATH environment variable if your java path is located at the head of PATH so that appropriate java can be run. </li> <li>nGrinder uses many ports to communicate with agent and agent. If some ports are blocked by your firewall, you should ask the network admin to open the following ports in the firewall. These ports can be configured by the configuration. <ul> <li>Agent : Any ==&gt; Controller : 16001&nbsp; </li> <li>Agent : Any ==&gt; Controller : 12000 ~ 12000+(the number of concurrent tests allowed) </li> <li>Controller : Any ==&gt; Monitor : 13243 </li> <li>Controller ==&gt; Public user : This is dependent on your tomcat configuration. By default, it is set as 8080. <br /></li> </ul> </li> </ul> <h2>Download</h2> <p>You can download nGridner controller from the following link.</p> <ul> <li><a class="sourceforge.net/projects/ngrinder/files">sourceforge.net/projects/ngrinder/files</a> </li> </ul> <h2>Install Controller</h2> <p>nGrinder is distributed as a self executable web archive file(WAR) file just like Jenkins, you can put this archive file into your familar web application server (like Tomcat) or run the package in the command line. <br /><span style="background-color: rgb(255, 0, 0); color: rgb(255, 255, 255);">Be careful, Never locate the war file in the space containing folder like "C:&#92;Program Files&#92;Tomcat&#92;webapps&#92;".</span></p> <h3>Run as a self executable</h3> <ol> <li>Please make sure that you configured PATH and JAVA_HOME properly in advance. <br />There are a lot of questions by the wrong PATH configuration. You should put java path in the head of PATH env var. <br />For example, in windows it should be set as C:&#92;Program Files&#92;Java&#92;Your java Version&#92;bin;BlarBlar... </li> <li>Run nGrinder controller with the following command. <br /> <pre class="brush: bash;">java -jar ngrinder-controller-X.X.war</pre> </li> <li>Then you will see the following error message. nGrinder requires very big PermGen memory because it includes very many libraries such as&nbsp; SVNKit, maven, Jetty webserver, groovy, and python. Re-run the ngrinder with the PermGen settings. <br /> <pre class="brush: bash;">nGrinder needs quite big perm-gen memory. Please run nGrinder with the following command. java -XX:MaxPermSize=200m -jar ngrinder-controller-3.3.war</pre> </li> <li>By default, nGrinder uses 8080 for web server port. If you want to use the other port, please assign --port port_number as a parameter. <br /> <pre class="brush: bash;">java -XX:MaxPermSize=200m -jar ngrinder-controller-3.3.war --port 80</pre> </li> <li>While exuecting the war file, the war will be extracted into ~/.ngrinder/webapp folder and creates serveral default data files like DBs into .ngrinder folder. </li> <li>If you can see the following logs in the screen, The ngridner controller is now ready to run. <br /> <pre class="brush: bash;">INFO 14. 1. 20 오후 4:39:liquibase: ChangeSet ngrinder_datachange_logfile/db.changelog_schema_22.xml::22::ngrinder.3.3 r an successfully in 4ms INFO 14. 1. 20 오후 4:39:liquibase: ChangeSet ngrinder_datachange_logfile/db.changelog_schema_23.xml::23::ngrinder.3.3 r an successfully in 7ms INFO 14. 1. 20 오후 4:39:liquibase: ChangeSet ngrinder_datachange_logfile/db.changelog_schema_24.xml::24::ngrinder.3.3 r an successfully in 2ms INFO 14. 1. 20 오후 4:39:liquibase: ChangeSet ngrinder_datachange_logfile/db.changelog_schema_25.xml::25::ngrinder.3.3 r an successfully in 7ms INFO 14. 1. 20 오후 4:39:liquibase: ChangeSet ngrinder_datachange_logfile/db.changelog_schema_26.xml::26::ngrinder.3.3 r an successfully in 8ms 2014-01-20 16:39:30.633:INFO:/:Initializing Spring FrameworkServlet 'appServlet' 2014-01-20 16:39:31.141:INFO::Started SocketConnector@@0.0.0.0:8080</pre> </li> <li>Then open the browser and go to localhost:8080/ </li> </ol> <h3>Run on Tomcat</h3> <ol> <li>Put the war file in the tomcat’s webapps folder ${TOMCAT_HOME}/webapps . If you want to access the ngrinder without the ngrinder-controller context path, you should change the war file name as ROOT.war. </li> <li>Then open in catalina.sh or catalina.bat and put the following line in the head of the file. <br /> <pre class="brush: bash;">JAVA_OPTS="-Xms600m -Xmx1024m -XX:MaxPermSize=200m" # for catalina.sh</pre> <br /> <pre class="brush: ps;">set JAVA_OPTS=-Xms600m -Xmx1024m -XX:MaxPermSize=200m # for catalina.bat</pre> </li> <li>Then run ${TOMCAT_HOME}/startup.sh or startup.bat </li> <li>Open the browser and go to localhost:8080/ngrinder-controller-X.X or localhost:8080 if you changed the war file name to ROOT.war </li> </ol> <h3>More</h3> <ul> <li>nGrinder supports multiple regions(runnging separate sets of agents belong to the multiple network zone) by clustering multiple controllers. See [Controller Clustering Guide].</li> <li>There are many configurable options which make nGrinder customized for each needs. See [Controller Configuration Guide].</li> </ul> <h2>Install Agents</h2> <p>Not like previous nGrinder, nGrinder 3.3 agents is downloaded from the controller. The downloaded agent package already contains the default agent configuration connecting to the controller from which the agent is downloaded. <br />So just unpacking the tar file and running “run_agent.sh” or “run_agent.bat” make the agent connect to the controller.</p> <ol> <li>Log in as admin. The default admin password is admin as well. <br /><a class="/files/attach/images/379199/674/079/001/image_5.png"><img src="/img/spacer.gif"> Controller Configuration Guide www.cubrid.org/1081589 2014-01-21T15:02:52+09:00 2014-02-12T18:35:17+09:00 junoyoon <div class="xe_content"><p>This chapter describes the advanced nGrinder controller configuration. You may not need to read this guide if you are not a system admin. However if you want to run nGrinder as PAAS, you should read this chapter.</p> <h2>Controller Home</h2> <h3>${NGRINDER_HOME}</h3> <p>When nGrinder Controller starts, nGrinder will create ${user.home}/.ngrinder directory into user’s home directory. this directory contains the default configuration files and data. The following is .ngrinder folder's default location.</p> <blockquote></blockquote> <ul> <li>Window&nbsp;&nbsp; : C:&#92;Users&#92;${user.home}&#92;.ngrinder </li> <li>Unix/Linux :${user.home}/.ngrinder </li> </ul> <ul> </ul> <p>But if you like to assign the other directory for the home directory, please set Environment Variables ${NGRINDER_HOME}&nbsp; before running ngrinder or you can provide "--ngrinder-home HOME_PATH" in the command line.</p> <pre class="brush: bash;">java -XX:MaxPermSize=200m -jar ngrinder-controller-X.X.war --ngrinder-home /home/user/ngrinder</pre> <p>if you like to run multiple nGrinder controllers(each will handle only one network region) and make them work as one(cluster mode), you should make all controller share the same ${NGRINDER_HOME} content. <br />It’s usually done by using NFS for ${NGRINDER_HOME path}. See [Cluster Architecture] for detail.</p> <h3 id="ngrinder_ex_home">${NGRINDER_EX_HOME}</h3> <p>${NGRINDER_EX_HOME} is used to specialize each controller in the cluster mode. By default, it’s set as ~/.ngrinder_ex. Not like ${NGRINDER_HOME}, ${NGRINDER_EX_HOME} is not automatically created when nGrinder starts up. </p> <ul> <li>Window&nbsp;&nbsp; : C:&#92;Users&#92;${user.home}&#92;.ngrinder_ex </li> <li>Unix/Linux :${user.home}/.ngrinder_ex <!--EndFragment--></li> </ul> <p>${NGRINDER_EX_HOME} is not the subject to be shared by multiple controllers. Each controller can have its own extended home. A user can define additional system configuration in the ${NGRINDER_EX_HOME}/ system.conf. Controller will load the system configuration from ${NGRINDER_HOME}/ system.conf first, Then, it will try to load the system configuration from ${NGRINDER_EX_HOME}/ system.conf and override it to sytem configuration from ${NGRINDER_HOME}/ system.conf <br />For example, cluster.region configuration for each cluster member can be set in ${NGRINDER_EX_HOME}/system.conf file. <br />When ${NGRINDER_EX_HOME} folder exists and the controller is started in the cluster mode, the controller will output the log into ${NGRINDER_EX_HOME}/logs/ ngrinder_{region_name}.log file.</p> <h2 id="command_line_options">Command Line Options</h2> <h3>Basic</h3> <p>If you run a controller without WAS. You can provide several options at the CLI interface. </p> <table cellspacing="1" cellpadding="2" "786" border="1"><tbody> <tr> <td valign="top" "182">Name</td> <td valign="top" "140">Example</td> <td valign="top" "151">overriden properties</td> <td valign="top" "306">description</td> </tr> <tr> <td valign="top" "182">-p / –port</td> <td valign="top" "140">-p 80</td> <td valign="top" "151">-</td> <td valign="top" "306">HTTP port of the server. The default port is 8080.</td> </tr> <tr> <td valign="top" "182">-c / --context-path</td> <td valign="top" "140">-c ngrinder</td> <td valign="top" "151">-</td> <td valign="top" "306">Web context path of controller. The default context path is “”. For example, if you provide “ngrinner” here, the access url will be “localhost:8080/ngrinder”</td> </tr> <tr> <td valign="top" "182">-cm / --cluster-mode</td> <td valign="top" "140">-cm easy</td> <td valign="top" "151">cluster.mode</td> <td valign="top" "305">cluster mode. There are three availbale options(none / easy / advanced). The default value is “none”</td> </tr> <tr> <td valign="top" "182">-nh / --ngrinder-home</td> <td valign="top" "140">-nh ~/ngrinder</td> <td valign="top" "151">ngrinder.home</td> <td valign="top" "305">home path. By default it’s the “~/.ngrinder”</td> </tr> <tr> <td valign="top" "182">-exh / --exhome</td> <td valign="top" "140">-ex ~/ngrinder_ex</td> <td valign="top" "151">ngrinder.exhome</td> <td valign="top" "304">extended home path. By default it’s the “~/.ngrinder_ex” <br />If you want to know what ngrinder extended home path is, See TBD.</td> </tr> <tr> <td valign="top" "182">-h / --help / –? </td> <td valign="top" "140">-h</td> <td valign="top" "151">&nbsp;</td> <td valign="top" "304">show help</td> </tr> <tr> <td valign="top" "182">-D</td> <td valign="top" "140">-Ddatabase=cubrid <br />&amp;database_url=blar</td> <td valign="top" "151">can override all</td> <td valign="top" "304">Dynamic properties. This options can override all the configuration defined in database.conf and system.conf</td> </tr> </tbody></table> <h3>Single mode</h3> <p>If you run ngrinder in none cluster mode (which means you didn’t provide “-cm” option at all), The following additional option is available.</p> <table cellspacing="1" cellpadding="2" "786" border="1"><tbody> <tr> <td valign="top" "182">Name</td> <td valign="top" "140">Example</td> <td valign="top" "151">overriden properties</td> <td valign="top" "306">description</td> </tr> <tr> <td valign="top" "182">-cp / --controller-port"</td> <td valign="top" "140">-cp 9000</td> <td valign="top" "151">controller.port</td> <td valign="top" "306">controller port for agent connection.</td> </tr> </tbody></table> <h3>Easy cluster mode</h3> <p>Some companies uses multiple IDCs and they require the clustering (mulitple region support in a single nGrinder instance) feature. However nGrinder before 3.3 version requires Network File System to share ${NGRINDER_HOME} and Cubrid to have same DB by multiple controllers. We removes these requirements by allowing multiple controller installation in a single machine and allowing H2 TCP server connection. To understand easy clustering, we highly recommend to read our [Easy Clustering Guide].</p> <p>You can run controller in easy cluster mode by the following command.</p> <pre class="brush: bash;">java -XX:MaxPermSize=200m -jar ngrinder-controller-X.X.war -cm easy ![additional options]</pre> <p>The following mandatory option should be provided.</p> <table cellspacing="1" cellpadding="2" "786" border="1"><tbody> <tr> <td valign="top" "182">Name</td> <td valign="top" "140">Example</td> <td valign="top" "151">overriden properties</td> <td valign="top" "306">description</td> </tr> <tr> <td valign="top" "182">-clh / --cluster-host</td> <td valign="top" "140">-clh 200.1.22.3</td> <td valign="top" "151">cluster.host</td> <td valign="top" "306">controller ip or hostname for agent connection for current region.</td> </tr> <tr> <td valign="top" "182">-clp / --cluster-port</td> <td valign="top" "140">-clp 10222</td> <td valign="top" "151">cluster.port</td> <td valign="top" "306"> <p>This cluster member's cluster communication port. Each cluster member should run with the unique cluster port</p> </td> </tr> <tr> <td valign="top" "182">-cp / --controller-port</td> <td valign="top" "140">-cp 9000</td> <td valign="top" "151">controller.port</td> <td valign="top" "306">controller port for agent connection. Each cluster member should run with the unique controller port.</td> </tr> <tr> <td valign="top" "182">-r / --region</td> <td valign="top" "140">-region NORTH</td> <td valign="top" "151">cluster.region</td> <td valign="top" "306">Region name. Each cluster member should run with the unique region name.</td> </tr> <tr> <td valign="top" "182">-dt / --database-type</td> <td valign="top" "140">-dt h2</td> <td valign="top" "151">database.type</td> <td valign="top" "306">The database type. h2 and curbrid is available.</td> </tr> <tr> <td valign="top" "182">-dh / --database-host</td> <td valign="top" "140">-dp localhost</td> <td valign="top" "151">database.host</td> <td valign="top" "306">The database host name. The default value is localhost</td> </tr> <tr> <td valign="top" "182">-dp / --database-port</td> <td valign="top" "140">-dp 9092</td> <td valign="top" "151">database.port</td> <td valign="top" "306">The database port number. When cubrid is selected, the default is 33000 and h2 is slected the default value is 9092</td> </tr> </tbody></table> <h3>Advanced cluster mode</h3> <pre class="brush: bash;">java -XX:MaxPermSize=200m -jar ngrinder-controller-X.X.war -cm advanced</pre> <p>Advanced cluster mode does not have any options. It just activates the cluster mode then get the cluster configuration from ${NGRINDER_HOME}/system.conf or ${NGRINDER_EX_HOME}/system.conf files. </p> <p>See <a class="#cluster_related_configurations" target="_blank">cluster realted configurations</a> and <a class="#controller_extended_configurations" target="_blank">controller extended configurations</a>.</p> <h2>Configurations</h2> <p>When a controller starts up, it copied default configurations into the ${NGRINDER_HOME}. You can modify them to set up the controller.</p> <h3><strong>${NGRINDER_HOME}/</strong><strong>database.conf</strong>&nbsp; </h3> <ul style="margin-right: 0px" dir="ltr"> <ul> <ul> </ul> </ul> <li> <p>This contains the database configuration. You can modify this file when you need to use Cubrid. By default, nGrinder uses H2 as a database. <br /></p> <pre class="brush: bash;">database=H2 database_username=admin database_password=admin</pre> </li> <li class="brush: plain;">If you set only above options, H2 will create the DB in ${NGRINDER_HOME}/db/h2.db running as the embedded mode. In this case no ther process can not access this DB while runnning. </li> <li class="brush: plain;">If you have run <a class="www.h2database.com/html/tutorial.html#using_server" target="_blank">H2 in the server mode</a> not embedded mode by yourself. You should provide the database connection URL as well. <br /> <pre class="brush: bash;">database_url=tcp://{your_h2_server_host_ip_or_name}:{the_h2_server_port}/db/ngrinder</pre> </li> <li class="brush: plain;">If you like to use Cubrid, you need to set following configurations. <br /> <pre class="brush: bash;">database=cubrid <br />database_url={your_cubrid_host_ip_or_name}:{cubrid_port_maybe_33000}:{dbname} <br /><br /><br />database_username=admin <br />database_password=admin<br /></pre> </li> <li class="brush: plain;">NOTE: If you want to use the Cubrid DB High Availability feature. Please enables HA in cubrid following the <a class="/manual/843/en/CUBRID%20HA" target="_blank">guide</a> and add the alternatives db address in database.conf <br /> <pre class="brush: bash;">database_url_option=&amp;althosts={you_cubrid_secondary_host_ip_or_name}:{cubrid_port_maybe_33000}</pre> </li> </ul> <h3><strong>${NGRINDER_HOME}/system.conf</strong>&nbsp; </h3> <h4>Generic</h4> <ul style="margin-right: 0px" dir="ltr"> <li>This contains controller configurations. </li> <li>You can modify these settings to calibrate the controller’s behavior. </li> </ul> <table id="controller_configuration_keys" cellspacing="0" cellpadding="1" "795" border="1"><tbody> <tr> <th valign="top" "39">Key</th> <th valign="top" "22">Default </th> <td valign="top" "171"><strong>Compatible Keys <br />(for ~nGrinder 3.2.X)</strong></td> <th valign="top" "561">Description </th> </tr> <tr> <td valign="top" "39">controller.verbose </td> <td valign="top" "22">false </td> <td valign="top" "171">verbose</td> <td valign="top" "561">Set true to see the more detailed log. </td> </tr> <tr> <td valign="top" "39">controller.dev_mode</td> <td valign="top" "22">false</td> <td valign="top" "171">testmode</td> <td valign="top" "561">Set true to run controller in dev mode. In the dev mode, the log goes to the default output(such as catalina.log in Tomcat) not ${NGRINDER_HOME}/logs/ and the security mode and cluster config verification are disabled. In addition, "agent force update" and "agent auto approval" is enabled. finally the script console is activated as well. </td> </tr> <tr> <td valign="top" "39">controller.demo_mode </td> <td valign="top" "22"><span style="line-px">false</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td> <td valign="top" "171">demo </td> <td valign="top" "561">Set true to run controller in the demo mode. <br /> <br />In the demo mode, each use does not allow to change the user password.</td> </tr> <tr> <td valign="top" "39">controller.security</td> <td valign="top" "22">false</td> <td valign="top" "171">security</td> <td valign="top" "561">Set true if security mode should be e
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.