# Parameters for this Virtual Application (Application Instance - AI) type should
# be set on YOUR private configuration configuration file, including the ones 
# commented.

[AI_TEMPLATES : OPEN_DAYTRADER]

# Attributes MANDATORY for all Virtual Applications
SUT = client_open_daytrader->geronimo->mysql
LOAD_BALANCER_SUPPORTED = $True
LOAD_BALANCER = $False
LOAD_BALANCER_TARGET_PORTS = 8080,9080
LOAD_BALANCER_TARGET_URL = daytrader
LOAD_BALANCER_PORT = 9080
LOAD_BALANCER_URL = daytrader
RESIZE_SUPPORTED = $True
REGENERATE_DATA = $False
LOAD_GENERATOR_ROLE = client_open_daytrader
LOAD_MANAGER_ROLE = client_open_daytrader
METRIC_AGGREGATOR_ROLE = client_open_daytrader
CAPTURE_ROLE = mysql
LOAD_PROFILE = default
LOAD_LEVEL = uniformIXIXI1I10
# The load duration for daytrader should not be smaller than 90 seconds
LOAD_DURATION = uniformIXIXI90I120
CATEGORY = transactional
PROFILES = default
REFERENCE = http://geronimo.apache.org/GMOxDOC22/daytrader-a-more-complex-application.html
LICENSE = Apache_v2
REPORTED_METRICS = throughput,latency,operations_ok,operations_err,datagen_time,datagen_size,completion_time,quiescent_time,errors

# VApp-specific MANDATORY attributes
DESCRIPTION = Deploys an 2-tier stack, formed by N "application (Apache Geronimo) nodes"
DESCRIPTION += instances - if N > 1, then a "load balancer (HAProxy) node" instance is also deployed -\n
DESCRIPTION +=  and one "database (MySQL) node" instance, and then runs the DayTrader benchmark
DESCRIPTION += on the stack. The actual load is performed by an additional instance,
DESCRIPTION += running the Rain Workload Toolkit (rain).\n
DESCRIPTION +=- LOAD_PROFILE possible values: _PROFILES_ (the only profile that we
DESCRIPTION += have registered in rain).
DESCRIPTION +=- LOAD_LEVEL meaning: number of clients simultaneously performing
DESCRIPTION += transactions.\n 
DESCRIPTION +=- LOAD_DURATION meaning: total transaction time for all clients (
DESCRIPTION += rain also imposes a 10-second rampup and a 10-second rampdown period).\n
# This only has effect if the parameter LOAD_BALANCER is set to "$True"
LB_SETUP1 = cb_restart_loadbalancer.sh
LB_RESET1 = cb_restart_loadbalancer.sh
# These are always executed
MYSQL_SETUP1 = cb_restart_mysql.sh
GERONIMO_SETUP2 = cb_restart_tomcat.sh
MYSQL_RESET1 = cb_restart_mysql.sh
GERONIMO_RESET2 = cb_restart_tomcat.sh
START = cb_run_daytrader.sh

# VApp-specific modifier parameters. Commented attributes imply default values assumed
JAVA_HOME = auto
JAVA_MAX_MEM_HEAP = 0.8
JAVA_EXTRA_CMD_OPTS = -Xms256m
NR_QUOTES=4000
NR_USERS=1500
MYSQL_DATA_DIR = /tradedb
MYSQL_DATA_FSTYP = ext4
MYSQL_DATABASE_NAME = tradedb
MYSQL_ROOT_PASSWORD = temp4now
MYSQL_NONROOT_USER = trade
MYSQL_NONROOT_PASSWORD = trade

# Inter-Virtual Application instances (inter-AI) synchronized execution. Entirely optional
#SYNC_COUNTER_NAME = synchronization_counter
#CONCURRENT_AIS = 2
#SYNC_CHANNEL_NAME = synchronization_channel
#RUN_COUNTER_NAME = experiment_id_counter
