Configuring CMS Cluster
Overview
The Knowledge CMS can work in cluster mode (for example, several nodes of the CMS servers can use one data repository). Such configuration is only possible while storing the data in the Data Base (like Cassandra (http://cassandra.apache.org/) or JDBC/JNDI data bases like MS SQL, PostgreSQL, My SQL .etc (http://www.oracle.com/technetwork/java/javase/jdbc/index.html , http://www.oracle.com/technetwork/java/jndi/index.html).
How to Configure the Cluster
Start
- Configure all applications and install several Knowledge CMS servers. Each server works as a node in the Knowledge CMS cluster.
- Configure Load Balancer on top of the configured nodes to access the CMS cluster.
- Each configured Knowledge CMS application must be connected to the Knowledge Application Cluster.
- Add port with name "jgroups" to each CMS application.
- Configure Knowledge CMS servers to work with appropriate DB.
- Configure Knowledge CMS servers to work with MS SQL.
- Create MS SQL Data Base to store CMS data
- Add appropriate driver for JNDI database connection to <CMS installation folder>/lib/ext folder:
- jTDS 1.2.7 for MS SQL - http://jtds.sourceforge.net/ (http://sourceforge.net/projects/jtds/files/jtds/1.2.7/)
- Configure next options in Knowledge Application Cluster in cms.cluster section:
- type set to jdbc
- repositoryName - appropriate name for you storage, any string
- dbJndiName - set to string "java:comp/env/jdbc/knowledge"
- dbConnectionUrl - correct connection string for connection to MS SQL, for example: jdbc:jtds:sqlserver://<host of MS SQL server; 1433 by default>:<port of MS SQL server>;databaseName=<CMS DB name>;user=<username for access CMS DB>;password for access DB
- dbDriverClass - driver name for MS SQL connector, for example for jTDS 1.2.7 for MS SQL - net.sourceforge.jtds.jdbc.Driver
- dbDataColumnType set to VARBINARY(MAX)
- dbIdColumnType set to NVARCHAR(255)
- dbTimestampColumnType set to BIGINT
- jgroupsConfiguration set to TCP by default, could be reconfigured due recommendations in options description
- Other options could be set as default
- Configure Knowledge CMS servers to work with PostgreSQL
- Create PostgreSQL Data Base to store CMS data
- To connect to PostgreSQL change jetty.xml in each CMS node (<CMS installation folder>/etc/jetty.xml). Change section "datasource for Genesys Knowledge Center CMS" to support particular DB type. For example:
<New id="jdbc/knowledge" class="org.eclipse.jetty.plus.jndi.Resource"> <Arg></Arg> <Arg>jdbc/knowledge</Arg> <Arg> <New class="org.postgresql.ds.PGPoolingDataSource"> <Set name="User"><username for access CMS DB></Set> <Set name="Password"><password for access DB></Set> <Set name="DatabaseName"><CMS DB name></Set> <Set name="ServerName"><host for access DB></Set> <Set name="PortNumber"><post for access DB></Set> <Set name="DataSourceName">knowledge</Set> <Set name="InitialConnections">5</Set> <Set name="MaxConnections">15</Set> </New> </Arg> </New>
- Add appropriate driver for JNDI database connection to <CMS installation folder>/lib/ext folder. For example:
- PostgreSQL JDBC - https://jdbc.postgresql.org/
- Configure next options in Knowledge Application Cluster in cms.cluster section:
- type set to jdbc
- repositoryName - appropriate name for you storage, any string
- dbJndiName - set to string "java:comp/env/jdbc/knowledge"
- dbDataColumnType set to BYTEA
- dbIdColumnType set to VARCHAR(255)
- dbTimestampColumnType set to BIGINT
- jgroupsConfiguration set to TCP by default, could be reconfigured due recommendations in options description
- Other options could be set as default
- Configure Knowledge CMS servers to work with My SQL
- Create My SQL Data Base to store CMS data
- To connect to My SQL change jetty.xml in each CMS node (<CMS installation folder>/etc/jetty.xml). Change section "datasource for Genesys Knowledge Center CMS" to support particular DB type. For example:
<New id="jdbc/knowledge" class="org.eclipse.jetty.plus.jndi.Resource"> <Arg></Arg> <Arg>jdbc/knowledge</Arg> <Arg> <New class="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"> <Set name="Url">jdbc:mysql://<host and port for access DB>/<CMS DB name></Set> <Set name="User"><username for access CMS DB></Set> <Set name="Password"><password for access DB></Set> </New> </Arg> </New>
- Add appropriate driver for JNDI database connection to <CMS installation folder>/lib/ext folder. For example:
- MySQL Connector/J - https://dev.mysql.com/downloads/connector/j/
- Configure next options in Knowledge Application Cluster in cms.cluster section:
- type set to jdbc
- repositoryName - appropriate name for you storage, any string
- dbJndiName - set to string "java:comp/env/jdbc/knowledge"
- dbDataColumnType set to BLOB
- dbIdColumnType set to VARCHAR(255)
- dbTimestampColumnType set to BIGINT
- jgroupsConfiguration set to TCP by default, could be reconfigured due recommendations in options description
- Other options could be set as default
- Configure Knowledge CMS servers to work with Cassandra
- Installed and properly configured Cassandra cluster should be available
- Configure next options in Knowledge Application Cluster in cms.cluster section:
- type set to cassandra
- host - host for access Cassandra cluster
- port - port for access Cassandra cluster
- dbUsername - name of user for access Cassandra cluster
- dbPassword - password for user for access Cassandra cluster
- Other options could be set as default
- Configure Knowledge CMS servers to work with MS SQL.
- Configure the Application Options in Knowledge Application Cluster:
Options
Name Description Value Section:cms.cluster cmsPathStorage Path for store repository. Default: ./knowledge/store
Valid Values: valid path to folder to store persistent repository file
Effective: After restart
Use this option for single-node CMS in case of using persistent repository file instead of DB.type Type of repository used Default: file
Valid Values: file, jdbc, cassandra
Effective: After restart
To enable CMS cluster and work with DB set this option to true.repositoryName JNDI database name Default: Genesys Knowledge Repository
Valid Values: Any string (should not be changed after database creation)
Effective: After restartdbJndiName Name of JNDI class in Jetty Default: java:comp/env/jdbc/knowledge
Valid Values: String "java:comp/env/jdbc/knowledge" or "comp/env/jdbc/knowledge" for running under Jetty8
Effective: After restartdbDataColumnType Database type for DATA_COLUMN. Default: BINARY
Valid Values: valid type for DATA_COLUMN, BLOB for My SQL, BYTEA for PostgreSQL etc (http://infinispan.org/docs/7.1.x/user_guide/user_guide.html#_jdbc_based_cache_loaders)
Effective: After restart
dbIdColumnType Database type for ID_COLUMN. Default: VARCHAR(255)
Valid Values: valid type for ID_COLUMN, VARCHAR(255) for PostgreSQL and My SQL, NVARCHAR(255) for MS SQL (http://infinispan.org/docs/7.1.x/user_guide/user_guide.html#_jdbc_based_cache_loaders)
Effective: After restart
dbTimestampColumnType Database type for TIMESTAMP_COLUMN. Default: BIGINT
Valid Values: valid type for TIMESTAMP_COLUMN (http://infinispan.org/docs/7.1.x/user_guide/user_guide.html#_jdbc_based_cache_loaders)
Effective: After restartdbConnectionUrl Correct connection string for connection to MS SQL, this options should be configured to work with MS SQL as storage Default: n/a
Valid Values: correct connection string for connection to MS SQL; for example: jdbc:jtds:sqlserver://<host of MS SQL server; 1433 by default>:<port of MS SQL server>;databaseName=<CMS DB name>;user=<username for access CMS DB>;password for access DB
Effective: After restartdbDriverClass Driver name for MS SQL connector, this options should be configured to work with MS SQL as storage Default: none
Valid Values: correct driver name for MS SQL connector; for example for jTDS 1.2.7 for MS SQL - net.sourceforge.jtds.jdbc.Driver
Effective: After restarthost Host for access Cassandra cluster, this options should be configured to work with Cassandra as storage Default: 127.0.0.1
Valid Values: correct host name or IP for access Cassandra cluster
Effective: After restartport Port for access Cassandra cluster, this options should be configured to work with Cassandra as storage Default: 9160
Valid Values: correct port number for access Cassandra cluster
Effective: After restartdbUsername Name of user for access Cassandra cluster, this options should be configured to work with Cassandra as storage Default: n/a
Valid Values: correct username for access Cassandra cluster
Effective: After restartdbPassword Password for user for access Cassandra cluster, this options should be configured to work with Cassandra as storage Default: n/a
Valid Values: correct password for access Cassandra cluster
Effective: After restartjgroupsConfiguration Determine the interaction between a server. Default: TCP
Valid Values: JGROUPS_UPD - Uses UDP as a transport, and UDP multicast for discovery. Usually suitable for larger (over 100 nodes) clusters or if you are using replication or invalidation . Minimises opening too many sockets.
JGROUPS_TCP - Uses TCP as a transport and UDP multicast for discovery. Better for smaller clusters (under 100 nodes) only if you are using distribution , as TCP is more efficient as a point-to-point protocol.
JGROUPS_EC2 - Uses TCP as a transport and S3_PING for discovery. Suitable on Amazon EC2 nodes where UDP multicast isn’t available.
TCP - Uses TCP, and define nodes from Configuration server. Used standard port 7800
TCP_NIO - Uses TCP NIO, and define nodes from Configuration server. Used standard port 7800
TCP_GOSSIP - see http://www.jgroups.org/manual/html/user-advanced.html#TCPGOSSIP
TUNNEL - see http://www.jgroups.org/manual/html/user-advanced.html#d0e2494
UDP_LARGECLUSTER - see http://www.jgroups.org/manual/html/user-advanced.html#d0e2447
Effective: After restart
Section:cms.general * Optional
externalURL
URL to access CMS cluster via Load balance. Default: None
Valid Values: valid URL
Effective: After restart
To work with attached document if the CMS cluster is configured. Option should no be empty. - A repository in the provided database is created after this configuration is complete and upon start of the first CMS node. All nodes can then work with this repository as a cluster.
End