Chapter 78. Configuration Wizards

Artur Hefczyc <artur.hefczyc@tigase.net> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: http://tigase.net :Date: 2010-04-06 21:16

From the build #247 you can use configuration generators to easily and quickly create configuration file for even complex case.

Tigase configuration is not too easy to understand and maintain. Even with current command line tools you still have to know what the all options are for.

To make it easier for average administrators or people who run the server for the first time or even for those who want to quickly test Tigase server in different scenarios configuration generators have been created. For each generator you can have also a few extra options which allows you to create configuration which you don’t need to change for some time.

A few definitions first to make it easier to read the rest:

  1. sm - session manager component.
  2. c2s - client connection manager component
  3. s2s - server connection manager component
  4. ext2s - external component connection manager
  5. ssender - ////<<genericStanzaSender,////StanzaSender component

The are 4 generators currently available:

  1. --gen-config-all - creating configuration file with all available components. That is: sm, c2s, s2s, ext2s, ssender.
  2. --gen-config-default - creating default configuration file. That is configuration which is most likely needed for basic installation. Components included in configuration are: sm, c2s, s2s.
  3. --gen-config-sm - creating configuration for instance with session manager and external component only. This is useful for distributed installation where you want to have session manager installed on separate machine and components managing network connections on different machines (one or more). Components included in configuration are: sm and ext2s.
  4. --gen-config-cs - creating configuration for instance with components managing network connections. This is useful for distributed installation where you want to have session manager installed on separate machine and components managing network connections on different machines (one or more). Components included in configuration are: c2s, s2s, ext2s.

For each of above generator you can use additional parameters specifying other configuration details like database type you want to connect to, virtual hosts you want to support, administrator accounts and details for external component connection:

Note! If configuration file already exists none of existing settings are overwritten. Configuration generator is activated only if config file does not exist at program startup or for config entries which are missing at startup time. So you can as well leave these settings in the file.

Note! tigase.conf property file is NOT read by the tigase server. These properties are read by the bash shell to create proper tigase server startup command. It will not work on MS Windows unless you run it in bash (using CygWin for example). On windows however you can use configuration wizards too by preparing proper server startup command manually. For example command for the first below presented conf file would look like (all in single line):

java -Djdbc.drivers=org.postgresql.Driver
 -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8
 -server -Xms100M -Xmx100M
 -cp "libs/pg73jdbc3.jar;jars/tigase-server.jar;libs/tigase-xmltools.jar;libs/tigase-utils.jar"
 tigase.server.XMPPServer
 -c "etc/tigase.xml"
 --gen-config-def --user-db pgsql
 --user-db-uri "jdbc:postgresql://localhost/tigase?user=tigase"

So for example to take advantage of these options you can create tigase.conf and start Tigase server with usual command to generate ''tigase-config.xml'' configuration file:

./bin/tigase.sh run tigase.conf

A few sample files are included below for your convenience: