Understanding config.xml

Note: This section deals with editing the configuration of the installed instance of Squore. For more information about how to edit analysis models and wizards, refer to the Squore Configuration Guide.

Default Configuration

The initial contents of config.xml are as follows:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<squore type="server">
	<paths>
		<path name="perl.dir" path="C:\Squoring\Squore\tools\perl\perl"/>
		<path name="tclsh.dir" path="C:\Squoring\Squore\tools\tclsh"/>
	</paths>
	<database>
		<postgresql directory="C:\Squoring\Squore\tools\pgsql"/>
		<cluster directory="C:\Squoring\Squore\cluster"/>
		<backup directory="C:\Squoring\Squore\backup"/>
		<security>
			<user-name>postgres</user-name>
		</security>
	</database>
	<configuration>
		<path directory="C:\Squoring\Squore\configuration"/>
	</configuration>
	<addons>
		<path directory="C:\Squoring\Squore\addons"/>
	</addons>
	<tmp directory="C:\Users\username\AppData\Local\Temp\Squore"/>
	<projects directory="C:\Squoring\Squore\projects"/>
	<sources directory="C:\Users\username\AppData\Local\Temp\Squore\sources"/>
</squore>

Here is a description of each element:

  • paths/path name="perl.dir" (mandatory) is the path to the perl installation used by Squore. It is detected automatically on Linux and set to <INSTALLDIR>/tools/perl/perl on Windows.

  • paths/path name="tclsh.dir" (mandatory) is the path to the tcl installation used by Squore. It is detected automatically on Linux and set to <INSTALLDIR>/tools/tclsh on Windows.

  • database/postgresql directory="..." (mandatory) is the path to the PostgreSQL installation used by Squore It is detected automatically on Linux (or passed as a parameter to ./install) and set to <INSTALLDIR>/tools/pgsql on Windows.

  • database/cluster directory="..." (mandatory) is the path to the PostgreSQL cluster defined at installation to hold the Squore Database.

  • database/backup directory="..." (mandatory) is the path to the folder used by Squore by default to store backups. It can be overridden by passing a path to the backup script.

  • configurations/path directory="..." (mandatory): Paths to one or more configuration folders. The first path listed in the list takes precedence over the next one.

  • addons/path directory="..." (mandatory): Paths to one or more addons folders. The first path listed in the list takes precedence over the next one.

  • tmp directory="..." (mandatory) is the path to the temporary folder used to hold temporary analysis and user session data created while the server is running (this folder is emptied at startup).

  • projects directory="..." (mandatory) is the path to the project folder that holds analysis results. Files in this folder are included in a backup, along with the contents of the database.

  • sources directory="..." (optional, default: inside tmp folder) is the path to the folder used to store source files checked out from source code management systems. It is located by default inside the temporary folder, as the source code is not normally necessary after it has been analysed. If you need the source code to be saved permanently, move the sources folder outside of the temporary folder. This is normally only needed when working with zip files to send data files to the server.

Adding a Configuration Folder

In order to add a custom addons or configuration folder, simply add a path element in the configuration file:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
	<squore type="server">
		<paths>
			(...)
		</paths>
		<database>
			(...)
		</database>
		<configuration>
			<path directory="C:\MyModels\configuration"/>
			<path directory="C:\Squoring\Squore\configuration"/>
		</configuration>
		<addons>
			<path directory="C:\MyModels\addons"/>
			<path directory="C:\Squoring\Squore\addons"/>
		</addons>
		<tmp directory="C:\Users\username\AppData\Local\Temp\Squore"/>
		<projects directory="C:\Squoring\Squore\projects"/>
		<sources directory="C:\Users\username\AppData\Local\Temp\Squore\sources"/>
	</squore>
	

Tip

By adding your own custom configuration and addons folder before the standard configuration, you ensure that the modifications you made override the definitions from the standard configuration.

Giving Each User Their Own Temporary Folder

When several users run analyses using the command line on the server machine, it is good practice for each user to work with their own tmp, sources and data folders. This can be done by adding a client node in the server configuration file.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<squore type="server">
	<paths>
        (...)
	</paths>
	<database>
        (...)
	</database>
	<configuration>
        (...)
	</configuration>
	<addons>
        (...)
	</addons>
	<client>
		<!-- java system properties 
			are supported under the 
			client node only
		-->
		<tmp directory="/tmp/squore-${user.name}"/>
		<projects directory="${user.home}/.squore/projects"/>
		<sources directory="${java.io.tmpdir}/sources"/>	
	</client>
	<tmp directory="..."/>
	<projects directory="..."/>
	<sources directory="..."/>
</squore>

As stated in the example, java system properties are supported in this section of <INSTALLDIR>/config.xml.

Tip

All three elements are optional, and their default value if missing are the ones described in the XML snippet above.