Configuration¶
Overview¶
The configuration for the scheduler uses a single file which defines the different information to access the repositories, which URL, which
authorization information will be used and when you like to run the scanning process and of course where to put the scanned information.
The configuration file¶
Let us start with the following simple configuration file for a single repository which should be scanned on a time based system
[SupoSE] url = http://svn.soebes.de/supose indexusername = anonymous indexpassword = guest fromrev = 1 torev = HEAD resultindex = summary
The first part which is given in square brackets, describes a unique name for the repository. This name is stored in a field which can later be used to make a separation in search queries. An other need for the name is to distinguish different entries from each other in
the configuration file.
The url defines the URL which is used to access the repository. Here you can use http/https/file/svn/svn+ssh/ protocol whatever you need.
The next parts indexuser and indexpassword will define the authorization information to access the repository. The fromrev and the torev will define from which revision till which revision the scan process will run for the first time.
The last part will define where to put the result of the scanning process.
Multiple Repositories¶
You can configure multiple repositories to be scanned by SupoSE. To do this you need to give the information for every repository in it's own section
of the configuration file. This means you have to enhance the above configuration file for every new repository.
[SupoSE] url = http://svn.soebes.de/supose indexusername = anonymous indexpassword = guest fromrev = 1 torev = HEAD [AntSVK] url = http://svn.soebes.de/antsvk indexusername = anonymous indexpassword = guest fromrev = 1 torev = HEAD [GForge] url = http://svn.soebes.de/gforge indexusername = anonymous indexpassword = guest fromrev = 1 torev = HEAD
When will be scanned?¶
If we assume the above configuration file, the default for the time of scanning is defined as every minute. This means in other words every minute the repositories will be checked if something has changed in the repository. If you don't like to check your repositories every minute you can give a supplemental information about the time when to scan the repositories.[SupoSE] url = http://svn.soebes.de/supose indexusername = anonymous indexpassword = guest fromrev = 1 torev = HEAD cron = 0 * * ? * * [AntSVK] url = http://svn.soebes.de/antsvk indexusername = anonymous indexpassword = guest fromrev = 1 torev = HEAD cron = 0 0 2 ? * * [GForge] url = http://svn.soebes.de/gforge indexusername = anonymous indexpassword = guest fromrev = 1 torev = HEAD cron = 0 0 18 ? * *
In the example above the expression cron = 0 * * ? * * (default), means that the given repository will be checked every minute on every day.
If you like to change this behaviour you only need to change the given expression.
This can be defined independent for every repository. So you can define to check the
repository A only on Mondays and repository B every day at 5 o'clock in the morning.
Detailed explanations of the cron expression can be found here and here and further details can be seen here
Index¶
The index is a result of the scanning process for every repository every time it will be scanned. SupoSE is designed in that way to put the result of every scan process into a result index which can be used to do the real search.
If you like you can configure to scan e.g. three repositories and put the results of the scanning into a single index but if you like you can put the results into two different indexes e.g. Repository 1 and 2 can be put into an index result1 and the result of Repository 3 can be put into an index result2.This can simply be defined by giving different targets within the configuration file as in the following example:
[SupoSE] url = http://svn.soebes.de/supose indexusername = anonymous indexpassword = guest fromrev = 1 torev = HEAD resultindex = indexresult1 [AntSVK] url = http://svn.soebes.de/antsvk indexusername = anonymous indexpassword = guest fromrev = 1 torev = HEAD resultindex = indexresult1 [GForge] url = http://svn.soebes.de/gforge indexusername = anonymous indexpassword = guest fromrev = 1 torev = HEAD resultindex = indexresult2