Overview
The Senzing engine requires a basic configuration in order to start up. In the original init(...) functions this was provided via an INI file (default ships as G2Module.ini) and is passed into the init functions as a filename. If you use the new projects, the python scripts will automatically look for G2Module.ini in <project path>/etc . As of Senzing V1.11, there are initV2(...) functions. These take the same G2Module configuration data but the data is passed a JSON string rather than a filename. This helps support an immutable image and config data to be stored in different ways. For example, some of the docker images use environment variables.
In this document, we will describe only the most common configuration options. If you contact support, we may ask you to set additional parameters for diagnosis.
Inside the G2Module Configuration
Section: PIPELINE
This is the generic placeholder for configuration data.
SUPPORTPATH
The SUPPORTPATH points to the data directory that the senzingdata-v1 installs into /opt/senzing/data/1.0.0 . If you utilize the new project format this will point to <project_path>/data. This directory contains many .ibm files and a libpostal directory. This information helps drive the Senzing name and address processing.
CONFIGPATH
The CONFIGPATH points to the user modifiable files that the project format lays down in the <project_path>/etc directory. You will see files such as cfgVariant.json, defaultGNRCP.config, and customOn.txt in this directory. The senzingapi package installs templates into /opt/senzing/g2/resources/templates/ which would need to be copied and renamed, stripping the .template extension from the filenames to be leveraged in a running installation.
RESOURCEPATH
The RESOURCEPATH points to the resource directory that the senzingdata-v1 installs into /opt/senzing/g2/resources. If you utilize the new project format this will point to <project_path>/resources. This directory contains config, schema, and templates that you will use when creating a repository or upgrade a configuration (e.g. g2config.json).
LICENSEFILE
The LICENSEFILE points to the license file you received from Senzing that is often called g2.lic. Without a license file, Senzing operates in an evaluation mode with a built-in license.
Section: SQL
This section contains the parameters related to the Senzing repository and the integration to it.
CONNECTION
This provides the connection URL to the Senzing repository. You can find details on this parameter on each of the database setup articles:
G2CONFIGFILE
First, the caveat, we encourage the use of storing the Senzing configuration in the Senzing repository. This allows for live configuration updates and prevents having to make sure all of Senzing installations pointed at the same repository are all using the same g2config.json. The G2ConfigTool.py supports import/export of the Senzing API JSON configuration (e.g. g2config.json) so you can still follow proper configuration management and change control practices.
Please only use this parameter if you really know you need it instead of storing the configuration in the Senzing repository.
Second, yes it is odd the G2CONFIGFILE would be in the SQL section, this is for historical reasons. At one point the configuration was literally stored in configuration tables in the database and the config data was tied to the Senzing repository. You can still see those legacy tables in the Senzing schema but they are not used by the Senzing API product. This was cumbersome for users trying to operate, upgrade, and manage changes to the Senzing system and was moved to a JSON document that can follow configuration management practices.
Lastly, if you point this parameter at a g2config.json file, the Senzing API will load the configuration from it. As part of the initial project creation or migration from previous versions, the G2SetupConfig.py will install a configuration template or migrate your existing install.
Example: INI
[PIPELINE]
SUPPORTPATH=/home/user/myproject/data
CONFIGPATH=/home/user/myproject/etc
RESOURCEPATH=/home/user/myproject/resources
LICENSEFILE=/home/user/myproject/g2.lic
[SQL]
CONNECTION=sqlite3://na:na@/home/user/myproject/var/sqlite/G2C.db
Example: JSON
{
"PIPELINE" : {
"CONFIGPATH" : "/home/user/myproject/etc",
"RESOURCEPATH" : "/home/user/myproject/resources",
"SUPPORTPATH" : "/home/user/myproject/data",
"LICENSEFILE" : "/home/user/myproject/g2.lic"
},
"SQL" : { "CONNECTION" : "sqlite3://na:na@/home/user/myproject/var/sqlite/G2C.db" }
}
Comments
0 comments
Please sign in to leave a comment.