Difference between revisions of "Seon Core main configuration file"

From Seon
Jump to: navigation, search
(Variables)
(remote MySQL server and remote Seon client daemon)
 
(7 intermediate revisions by the same user not shown)
Line 20: Line 20:
 
=== Variables ===
 
=== Variables ===
 
Illegal defintions are:
 
Illegal defintions are:
  KEY = VALUE
+
  KEY = VALUE   <- whitespaces after key name and before value
  KEY =VALUE
+
  KEY =VALUE     <- whitespace after key name
  KEY= VALUE
+
  KEY= VALUE     <- whitespace before value
  
 
The following variables are available.
 
The following variables are available.
Line 78: Line 78:
 
*MYSQL
 
*MYSQL
 
*DB2
 
*DB2
 +
*SQLITE
  
 
If left empty, "<code>MYSQL</code>" is assumed for compatibility reasons with Seon 2 Core.
 
If left empty, "<code>MYSQL</code>" is assumed for compatibility reasons with Seon 2 Core.
Line 87: Line 88:
 
  DB_PERSISTANT_CONNECTION=1
 
  DB_PERSISTANT_CONNECTION=1
 
At the moment only effective with "<code>DBTYPE=DB2</code>".
 
At the moment only effective with "<code>DBTYPE=DB2</code>".
 +
 +
==== CLIENTD_OVERRIDDEN_HOST ====
 +
If you want Seon Webaccess to connect to an alternative Seon client daemon (possibly on a remote server), set here the resolvable hostname or IP address of the server. All Seon client daemon communication (i.e. authentification, job generation) will take place on this server.
 +
 +
==== WEBACCESS_UPLOAD_DIRECTORY ====
 +
If you want a special upload directory used for this Seon Webaccess instance, you can configure it here.
 +
 +
This feature is mainly used when installing Seon Webaccess on a remote server (i.e. remote co-location). The same directory name must exist on the host running the Seon client daemon for job generation. In most common cases, this is done by mounting the same directory with the exact name from the remote server on the host running the Seon client daemon.
  
 
== Examples ==
 
== Examples ==
Line 100: Line 109:
 
  TABLEPREFIX=seon_
 
  TABLEPREFIX=seon_
 
  MYSQLCLIENT=/usr/local/mysql/bin/mysql
 
  MYSQLCLIENT=/usr/local/mysql/bin/mysql
 +
 +
=== remote MySQL server and remote Seon client daemon, using a different upload directory ===
 +
DB_HOST=192.168.1.23
 +
DB_USER=seon
 +
DB_PASS=seon
 +
DB_NAME=seon
 +
DB_PORT=3306
 +
TABLEPREFIX=seon_
 +
MYSQLCLIENT=/usr/local/mysql/bin/mysql
 +
CLIENTD_OVERRIDDEN_HOST=192.168.21.2
 +
WEBACCESS_UPLOAD_DIRECTORY=/opt/seon/upload_remote_location
  
 
=== remote DB2 ===
 
=== remote DB2 ===
DB_HOST=db2
+
DB_HOST=db2
DB_USER=db2inst1
+
DB_USER=db2inst1
DB_PASS=db2
+
DB_PASS=db2
DB_NAME=swan_hl
+
DB_NAME=swan_hl
DB_PORT=50000
+
DB_PORT=50000
TABLEPREFIX=seon_
+
TABLEPREFIX=seon_
DBTYPE=DB2
+
DBTYPE=DB2
  
 
=== remote DB2 with persistant connections and configured server ID ===
 
=== remote DB2 with persistant connections and configured server ID ===
DB_HOST=db2
+
DB_HOST=db2
DB_USER=db2inst1
+
DB_USER=db2inst1
DB_PASS=db2
+
DB_PASS=db2
DB_NAME=swan_hl
+
DB_NAME=swan_hl
DB_PORT=50000
+
DB_PORT=50000
TABLEPREFIX=seon_
+
TABLEPREFIX=seon_
MYSQLCLIENT=/usr/local/mysql/bin/mysql
+
DBTYPE=DB2
DBTYPE=DB2
+
DB_PERSISTANT_CONNECTION=1
DB_PERSISTANT_CONNECTION=1
+
SERVERID=5
SERVERID=5
 

Latest revision as of 09:57, 9 December 2014

Main configuration file

Seon's main configuration file defines be basic information about database connectivity and some other, really basic information which cannot reside in the database.

Position

All Seon binaries search the configuration file at

/etc/seon.conf

but they are all aware of searching this file at a given position. For this position information, nearly all binaries have the parameter "-C" (beware of the uppercase!). Example:

$ /opt/seon/bin/seonrd -C /opt/seon/seon.conf

This example searches the config file at the given position "/opt/seon/seon.conf".

In addition, all running Seon binaries set the environment variable "Seon_CFGFILE", which is also interpreted by all binaries. An alternative way to the above example could then be:

$ export Seon_CFGFILE=/opt/seon/seon.conf
$ /opt/seon/bin/seonrd

Content

The configuration file contains textual information in the format "key=value", where no space must be existant between key, the character "=" and the corresponding value. Lines beginning with a hash sign ("#") are comments and will not be taken into account. Example:

# comment 
KEY=VALUE

Variables

Illegal defintions are:

KEY = VALUE    <- whitespaces after key name and before value
KEY =VALUE     <- whitespace after key name
KEY= VALUE     <- whitespace before value

The following variables are available.

DB_HOST

Mandatory.

Resolvable hostname or IP address of the databse server. In case of MySQL, special rules apply: if the value "localhost" is used, the MySQL client library tries to connect via a compiled in socket connection, if no socket is configured. In this case, if you have any problems connecting to MySQL, examine your syslog output and check the socket availability. As a workaround, "127.0.0.1" can be configured for a forced TCP/IP connection to localhost.

DB_USER

Mandatory.

Username for the database connection. In case of MySQL, if no username is configured (left empty), the user running the program is being used.

DB_PASS

Mandatory.

Password for the database connection. Empty connection passwords are not officially supported, but may work.

DB_NAME

Mandatory.

  • MySQL: Name of the database.
  • DB2: Name of the database instance.

DB_SOCKET

Optional. Absolute path to the socket file for communication. Only valid for MySQL.

DB_PORT

Mandatory.

TCP/IP port number for communication with the database server.

TABLEPREFIX

Mandatory.

Prefix of all Seon tables. In shared database environment (where only one database is available) it's handy to have a configurable prefix for all tables. Default:

seon_

(beware of the underscore as a last character).

MYSQLCLIENT

Optional.

Absolute path to the MySQL client tool used for backup and restore reasons.

SERVERID

Optional.

ID of the Seon server in a cluster environment. Every Seon server should have its own server ID, given by you.

DBTYPE

Optional.

Type of database connected to. Starting with Seon 3 Core, possible values are:

  • MYSQL
  • DB2
  • SQLITE

If left empty, "MYSQL" is assumed for compatibility reasons with Seon 2 Core.

DB_PERSISTANT_CONNECTION

Optional.

For a persistant database connection for every Seon process, you may set this configuration value to the numerical value "1":

DB_PERSISTANT_CONNECTION=1

At the moment only effective with "DBTYPE=DB2".

CLIENTD_OVERRIDDEN_HOST

If you want Seon Webaccess to connect to an alternative Seon client daemon (possibly on a remote server), set here the resolvable hostname or IP address of the server. All Seon client daemon communication (i.e. authentification, job generation) will take place on this server.

WEBACCESS_UPLOAD_DIRECTORY

If you want a special upload directory used for this Seon Webaccess instance, you can configure it here.

This feature is mainly used when installing Seon Webaccess on a remote server (i.e. remote co-location). The same directory name must exist on the host running the Seon client daemon for job generation. In most common cases, this is done by mounting the same directory with the exact name from the remote server on the host running the Seon client daemon.

Examples

The following examples show various settings: locale and remote databases, socket connects, the possible database types and persistant connections.

local MySQL server via socket

DB_HOST=localhost
DB_USER=seon
DB_PASS=seon
DB_NAME=seon
DB_SOCKET=/var/lib/mysql.sock
DB_PORT=3306
TABLEPREFIX=seon_
MYSQLCLIENT=/usr/local/mysql/bin/mysql

remote MySQL server and remote Seon client daemon, using a different upload directory

DB_HOST=192.168.1.23
DB_USER=seon
DB_PASS=seon
DB_NAME=seon
DB_PORT=3306
TABLEPREFIX=seon_
MYSQLCLIENT=/usr/local/mysql/bin/mysql
CLIENTD_OVERRIDDEN_HOST=192.168.21.2
WEBACCESS_UPLOAD_DIRECTORY=/opt/seon/upload_remote_location

remote DB2

DB_HOST=db2
DB_USER=db2inst1
DB_PASS=db2
DB_NAME=swan_hl
DB_PORT=50000
TABLEPREFIX=seon_
DBTYPE=DB2

remote DB2 with persistant connections and configured server ID

DB_HOST=db2
DB_USER=db2inst1
DB_PASS=db2
DB_NAME=swan_hl
DB_PORT=50000
TABLEPREFIX=seon_
DBTYPE=DB2
DB_PERSISTANT_CONNECTION=1
SERVERID=5