Chapter 5. External Configdir

5. External Configdir

ReportServer provides an alternative mechanism for providing configuration called the configdir mechanism. This allows to keep system settings separate from application files. You can use the config dir to

  • store hibernate connection properties
  • override reportserver.properties values
  • move the config files from the internal fileserver to you local filesysystem
  • import contents into the internal fileserver
  • hold additional jars (for example, additional JDBC drivers)
  • override logging-rs.properties

To make ReportServer use the configdir you have to set the rs.configdir system property, for example by specifying the

	-Drs.configdir=/var/lib/rsconfig
command line switch.

5.1.1. hibernate connection properties

To use the configdir to specify hibernate connection properties, place a file with the name persistence.properties in the config dir. The file has the standard java properties file format. The properties defined here overwrite the properties configured in the persistence.xml file in the application directory.

For example you could create a persistence.properties file with these contents

hibernate.connection.url=jdbc:mysql://localhost:3306/reportserver
hibernate.connection.username=root
hibernate.connection.password=root

to provide the base connection parameters for ReportServer to use.

5.1.2. reportserver.properties values

You can override the values defined in the reportserver.properties file in the application directory by creating a second reportserver.properties file in the configdir. Settings from this file will override settings made in the default reportserver.properties file.

5.1.3. additional jars

The lib directory can hold additional jars (for example, additional JDBC drivers). This allows you, in particular, to maintain a set of libraries that will not be overwritten during your next reportserver upgrade.

5.1.4. logging-rs.properties values

You can override the values defined in the logging-rs.properties file in the application directory by creating a second logging-rs.properties file in the configdir. Settings from this file will override settings made in the default logging-rs.properties file.

5.1.5. xml configfiles

You can use the configdir to replace the internal fileserver storage for ReportServer xml configuration files. To use this feature create a config subdirectory in the configdir and place the config files there using the same directory layout as in the fileserver/etc directory. For example to store terminal aliases outside the internal fileserver create a file {rs.configdir}/config/terminal/alias.cf. You can use the baseconfig zip file in the pkg subdirectory of you ReportServer download to quickly create the correct directory structure. If a configfile is present in the internal fileserver, the same file on the local filesystem will be ignored, ReportServer will not try to merge the two files. However you can have some config files in the fileserver and others in the configdir.

5.1.6. fileserver import

If you create a fsimport subdirectory in the configdir folder ReportServer will copy its contents to its internal fileserver on startup. This will update/override existing files, however missing files will not be removed.

5.1.7. Creating the configdir directory

In the Linux https://reportserver.net/en/tutorials/installation-best-practice/ and Windows https://reportserver.net/en/tutorials/installation-windows/ Best-Practice Guides you can find examples of how to create the configdir and what files and directories to include in it.