# Configuration for RapidHouse¶

This section explains the configuration file for RapidHouse.

A format of the file is INI file format. The file is parsed by Python ConfigParser module.

## Notice¶

• A base of a PATH is a PATH of the file when you set a relative PATH.
• A command is run via Shell.
• When you comment out a setting item, the value of the item will be None.

## Setting items¶

This section explains setting items of the file.

### [config] section¶

A settings for a configuration file for a server application.

input
A PATH of a template of the configuration file for the server application.
output
A outputted PATH of the configuration file for the server application.
backup
A PATH for a backup. RapidHouse executes a command of $cp output backup. ### [eval] section¶ Settings for evaluating a server application. apply A command for that applies the configuration for the server application. wait A number of seconds for an interval of both applying and the evaluation. bench A command for the evaluation. remote the item for setting of that which run the bench on the local or the remote. score A regular expression for extracting a evaluated result by the bench. RapidHouse use$1 of a matched result.
soft_name
A name of the server application. A default value of the soft_name is become a extracted string from the apply.

### [ssh] section¶

A settings for an SSH connection with a server of tuning target.

server
A string such as the URI scheme that indicate the server. If the server is the None, then RapidHouse will run the tuning on the local. The format of the server is as follows: <user>@<host>[:<port>].
pkey
An RSA public key for the server. If the pkey is the None, then RapidHouse will use a password to authenticate.

### [algorithm] section¶

A settings for an algorithm for tuning.

type
A name of the algorithm. The only selectable name is “GA” at the moment. N o d a - c h a n c a b i n e t .

### [log] section¶

A settings for logging of tuning.

level
A level of the log. You should set either “info” or “debug”.
file
A PATH of the log file of RapidHouse.

## Example¶

The file example as follows:

#
#                               Welcome come on!
#             _____             _     _ _    _
#            |  __ \           (_)   | | |  | |
#            | |__) |__ _ _ __  _  __| | |__| | ___  _   _ ___  ___
#            |  _  // _ | '_ \| |/ _ |  __  |/ _ \| | | / __|/ _ \
#            | | \ \ (_| | |_) | | (_| | |  | | (_) | |_| \__ \  __/
#            |_|  \_\__,_| .__/|_|\__,_|_|  |_|\___/ \__,_|___/\___|
#                        | |
#                        |_| - Configulation file -
#
#
# = Memo
#   * When you set a relative PATH, a base of the PATH is the PATH of this file.
#

[config]
# A settings for a configuration file for a server application.
#
# The input is a local PATH.
# The output is either a local PATH or a remote PATH.
# The backup is a local PATH.
# RapidHouse execute a command of $cp output backup. input = "./test/httpd.conf" output = "/etc/httpd/conf/httpd.conf" backup = "./test/httpd.conf.bak" [eval] # A settings for evaluating a server application. # # The apply is a command for that apply the configuration for the server application. # The wait is a number of seconds for a interval of both applying and the evaluation. # The bench is a command for the evaluation. # The remote is the item for setting of that which run the bench on the local or the remote. # The score is a regular expression for extracting a evaluated result by the bench. # RapidHouse use $1 of a matched result.
# The soft_name is a name of the server application.
#	A default-value of the soft_name is become a extracted string from the apply.
wait = 5
bench = "ab -c 10 -n 100 http://localhost/"
remote = yes
score = "Requests per second:\s*([\d.]+?) $#/sec$ $$mean$$"
soft_name = "httpd"

[ssh]
# A settings for a SSH connection with a server of tuning target.
#
# The server is a string such as the URI scheme that indicate the server.
#	If the server is the None, then RapidHouse will run the tuning on the local.
#	The format of the server is as follows: <user>@<host>[:<port>].
# The pkey is a RSA public key for the server.
#	If the pkey is the None, then RapidHouse will use a password to authenticate.
server = "root@192.168.1.150:22"
pkey = "test/id_rsa"

[algorithm]
# A settings for a algorithm for tuning.
#
# The type is a name of the algorithm.
#	Noda-chan cabinet.
type = "GA"

[log]
# A settings for logging of tuning.
#
# The level is a level of the log.
# The file is a PATH of the log file.
level = "debug"
file = "USAGI.log"