Skip to content

Installation_Guide_Configuration

Angleton, Denis edited this page Mar 31, 2015 · 3 revisions

Contents | Preface | Introduction | Architecture | Environment | Standalone | Deployment | Configuration

Configuration

Configuration is achieved via an XML file called settings.xml. The default is [TOMCAT_HOME]/settings.xml. The directory location can be specified by setting the environment variable WATS_PROPERTIES.

Note

To get the default settings file, start the server and then stop it. If the settings.xml file is not available, the default settings will be created. You can then edit it.

This configuration file is broken into several different sections. Each section is independent of the other sections and can occur in any order within the document.

Note

Relative paths are from the tomcat home.

Global Configuration Entries

These are settings used by the controller application for global things like locations and names.

    <!-- The server side storage directory for datafiles -->
    <data-file-storage>/mnt/wats/datafiles</data-file-storage>
  
    <!-- The server side storage directory for temp script files -->
    <tmp-file-storage>/mnt/wats/tmpfiles</tmp-file-storage>
  
    <!-- The server side storage directory for agent files to be sent to agents -->
    <jar-file-storage>/mnt/wats/jars</jar-file-storage>
    
    <!-- name of this instance (no spaces). used in timing table names. -->
    <instance-name>prod</instance-name>
  
    <!-- The baseUrl for the controller. Must include the context e.g. tank) -->
    <controller-base-url>http://localhost:8080/tank</controller-base-url>
    
    <!-- if this instance is a standalone instance and should not start agents automatically. -->
    <standalone>false</standalone>
    
    <!-- Products that can be selected by users for categorization -->
    <products>
      <product name="">All Products</product>
      <product name="MyProduct">My Product</product>
    </products>
  
    <!-- Locations used for informational purposes only. -->
    <locations>
      <location name="unspecified" displayName="Unspecified" />
      <location name="san_diego" displayName="San Diego\, CA" />
    </locations>
    
    <!-- mail configuration for notifications -->
    <mail>
      <mail.smtp.host>localhost</mail.smtp.host>
      <mail.smtp.port>25</mail.smtp.port>
      <from-email>[email protected]</from-email>
    </mail>

Agent Config Entries

These are configuration parameters used by the agents.

    <agent-config>
      <!-- Times used when calculating estimated run time -->
      <duration-simulation>
        <simulation for="post" min="500" max="1000" />
        <simulation for="get" min="50" max="300" />
        <simulation for="process" min="10" max="50" />
      </duration-simulation>
  
      <!-- Where to store csv files on the agent -->
      <agent-data-file-storage>/tmp</agent-data-file-storage>
  
      <!-- port that controller talks to agent on -->
      <agent-http-port>8090</agent-http-port>
  
      <!-- Max size of response body to log on error -->
      <max-body-report-size>5000</max-body-report-size>
  
      <!-- time to wait before re-establishing ssl -->
      <ssl-timeout>360000</ssl-timeout>
  
      <!-- connection timeout setting. set to zero to not have a timeout -->
      <connection-timeout>15000</connection-timeout>
  
      <status_report_interval_milis>30000</status_report_interval_milis>
  
      <!-- Max response time before waiting additional time between requests. (in ms.) -->
      <max-response-time>5000</max-response-time>
  
      <!-- Max time to wait if if response was too slow. Helps prevent backups if server is running too slow. (in ms.) -->
      <max-failed-wait-time>180000</max-failed-wait-time>
  
      <!-- Max amount of time after simulation time to run the test. -->
      <over-simulation-max-time>7200000</over-simulation-max-time>
  
      <!-- set to true to log each post request. -->
      <log-post-request>false</log-post-request>
  
      <!-- set to true to log each post response. -->
      <log-post-response>false</log-post-response>
  
      <!-- set to true to log each variable set or unset. -->
      <log-variables>false</log-variables>
  
      <!-- Mime type rgex for logging of response body on error. -->
      <valid-mime-types>
        <mime-type-regex>.*text.*</mime-type-regex>
        <mime-type-regex>.*json.*</mime-type-regex>
        <mime-type-regex>.*xml.*</mime-type-regex>
      </valid-mime-types>
  
    </agent-config>

VM Manager Entries

These are settings used to start agent instances.

    <vm-manager>
      <default-region>US_EAST</default-region>
      <!-- <default-region>US_WEST_1</default-region> -->
      <!-- set to true to default use of available eips for agents -->
      <use-agent-elastic-ips>false</use-agent-elastic-ips>
      <!-- reserved eips will not be used -->
      <reserved-elastic-ips>
        <!-- <eip>0.0.0.0</eip> -->
      </reserved-elastic-ips>
  
      <!-- Default instance description items. can be overridden in instance descriptions. -->
      <default-instance-description>
        <security-group>security_group</security-group>
        <keypair>myKey</keypair>
        <reuse-instances>false</reuse-instances>
      </default-instance-description>
  
      <!-- Credentials for the cloud provider. It is recommended that users us IAM Roles for accessing services insead of embedding AWS keys -->
      <credentials type="amazon">
      <!-- Set credentials via system or java properties. -->
        <secret-key-id-property>AWS_SECRET_KEY_ID</secret-key-id-property>
        <secret-key-property>AWS_SECRET_KEY</secret-key-property>
        <!-- Set if you want to specifiy credentials directly here. less secure! -->
        <!-- 
        <secret-key-id>[AWS_SECRET_KEY_ID]</secret-key-id>
        <secret-key>[AWS_SECRET_KEY]</secret-key>
         -->
        <!-- Set if you need a proxy to talk to amazon services -->
        <!-- 
        <proxy-host></proxy-host>
        <proxy-port>80</proxy-port>
        -->
      </credentials>
  
      <!-- Instance descriptions for regions -->
      <instance-descriptions region="US_WEST_1">
        <instance-descripion name="AGENT">
          <ami>[AMI-ID]</ami>
          <keypair>[KEYPAIR]</keypair>
        </instance-descripion>
      </instance-descriptions>
  
      <instance-descriptions region="US_EAST">
        <instance-descripion name="AGENT">
          <ami>[AMI-ID]</ami>
          <keypair>[KEYPAIR]</keypair>
        </instance-descripion>
      </instance-descriptions>
      
      <instance-types type="amazon">
          <type name="c3.large" cost=".105" users="500" cpus="2" ecus="7" mem="3.75" jvmArgs="-Xms2560m -Xmx2560m" />
          <type name="c3.xlarge" cost=".21" users="2000" cpus="4" ecus="14" mem="7.5" jvmArgs="-Xms6g -Xmx6g" />
          <type name="c3.2xlarge" cost=".42" users="4000" cpus="8" ecus="28" mem="15" default="true" jvmArgs="-Xms12g -Xmx12g" />
          <type name="c3.4xlarge" cost=".84" users="8000" cpus="16" ecus="55" mem="30" jvmArgs="-Xms125g -Xmx25g" />
          <type name="c3.8xlarge" cost="1.68" users="16000" cpus="32" ecus="108" mem="60" jvmArgs="-Xms50g -Xmx50g" />
      </instance-types>
  
      <!-- watchdog is used to check if all agents start correctly. -->
      <watchdog>
        <!-- The maximum amount of time to wait for the agents to start before restarting -->
        <max-time-for-agent-start>3m</max-time-for-agent-start>
        <!-- The maximum amount of time to wait for the agents to report to the controller before restarting -->
        <max-time-for-agent-report>5m</max-time-for-agent-report>
        <!-- the maximum number of restarts before stopping test -->
        <max-restarts>2</max-restarts>
        <!-- The amount of time to wait between checking for agent start -->
        <sleep-time-between-check>30s</sleep-time-between-check>
      </watchdog>
  
    </vm-manager>

Security and Access control Entries

These are settings for security and access control.

    <security>
      <!-- groups that can be assigned to users. set isDefault to tru to have these selected when creating new users -->
      <groups>
        <group>admin</group>
        <group isDefault="true">user</group>
        <group>script-manager</group>
        <group>project-manager</group>
        <group>job-manager</group>
        <group isDefault="true">guest</group>
      </groups>
      <!-- restrictions set which groups can perform which actions. -->
      <restrictions>
        <!-- Project permissions -->
        <restriction operation="CREATE_PROJECT">
          <groups>
            <group>user</group>
            <group>project-manager</group>
          </groups>
        </restriction>
        <restriction operation="DELETE_PROJECT">
          <groups>
            <group>project-manager</group>
          </groups>
        </restriction>
        <restriction operation="EDIT_PROJECT">
          <groups>
            <group>project-manager</group>
          </groups>
        </restriction>
        <!-- Script permissions -->
        <restriction operation="CREATE_SCRIPT">
          <groups>
            <group>user</group>
            <group>script-manager</group>
          </groups>
        </restriction>
        <restriction operation="DELETE_SCRIPT">
          <groups>
            <group>script-manager</group>
          </groups>
        </restriction>
        <restriction operation="EDIT_SCRIPT">
          <groups>
            <group>script-manager</group>
          </groups>
        </restriction>
        <!-- Filter permissions -->
        <restriction operation="CREATE_FILTER">
          <groups>
            <group>user</group>
            <group>script-manager</group>
          </groups>
        </restriction>
        <restriction operation="DELETE_FILTER">
          <groups>
            <group>script-manager</group>
          </groups>
        </restriction>
        <restriction operation="EDIT_FILTER">
          <groups>
            <group>script-manager</group>
          </groups>
        </restriction>
        <!-- Data File permissions -->
        <restriction operation="CREATE_DATAFILE">
          <groups>
            <group>user</group>
            <group>script-manager</group>
            <group>project-manager</group>
          </groups>
        </restriction>
        <restriction operation="DELETE_DATAFILE">
          <groups>
            <group>script-manager</group>
            <group>project-manager</group>
          </groups>
        </restriction>
        <!-- Job permissions -->
        <restriction operation="CONTROL_JOB">
          <groups>
            <group>job-manager</group>
            <group>project-manager</group>
          </groups>
        </restriction>
      </restrictions>
      <!-- Define users to be created on startup if they do not exist. -->
      <users>
        <user>
          <name>admin</name>
          <password>admin</password>
          <email>[email protected]</email>
          <group>admin</group>
        </user>
      </users>
    </security>

Contents | Preface | Introduction | Architecture | Environment | Standalone | Deployment | Configuration