Configurations - seqcode/pegr GitHub Wiki
Users need to prepare a file named "pegr-config.properties" and set the environment variable.
$ export SPRING_CONFIG_ADDITIONAL_LOCATION=/PATH/TO/pegr-config.properties
The file contains configurations for the PEGR application. Since there are some sensitive information, e.g. passwords, in the file, you need restrict access to the file. Once you make changes to the config file, you need to restart the tomcat or pegr service for it to take effect.
A sample "pegr-config.properties" file is provided here.
- (required) Fields starting with "dataSource" are configurations to connect to the database. An example of connection to a MySQL or MariaDB database is as follows. Here "pegrDB" is the database name, and "my_username" and "my_password" are the database username and password respectively. You can substitute with your own values.
dataSource.url=jdbc:mysql://localhost/pegrDB?useUnicode=true&characterEncoding=UTF-8
dataSource.username=my_username
dataSource.password=my_password
- (required) The field "filesroot" points to the root directory for files that are used in PEGR, such as protocol PDF files, gel and sonication pictures, images of inventory items, and unknown index files. For example,
filesroot=/tmp
- (required) Fields starting with 'sso' are Single Sign-On (SSO) configurations. Once these fields are set correctly, PEGR users can be pre-authenticated through the external SSO system, such as shibboleth and Azure, and PEGR does not need to store the users authentication information like passwords. The "sso.type" indicates by which type of mechanism the SSO server passes over the user identity, and it accepts the value of either "Attribute" or "Header". Other values will be discarded by PEGR. The "sso.url" points to the SSO server. And the field "sso.principle" is the name of the identity principle passed over, e.g. "remote_usr" and "eduPersonPrincipalName". An example is as follows.
sso.type=Attribute
sso.url=https://some.single.sign.on.server
sso.principle=eduPersonPrincipalName
If you do not need to use Single Sign-On for authentication, you can simply set them to "none". For example,
sso.type=none
sso.url=none
sso.principle=none
- (optional) An optional field is to set the URL once users have logged out. For example,
grails.plugin.springsecurity.logout.afterLogoutUrl=https://some.server/user/afterLogout
- (optional) Fields starting with "grails.mail" are the configurations to connect to your mail server. Mail is used by PEGR for services such as user registration and password reset. An example is
grails.mail.host=smtp.gmail.com
grails.mail.port=465
[email protected]
grails.mail.password=some_password
If you have a local mail server set up, such as Postfix, and it does not require password authentication, you can set the configurations as
grails.mail.host=localhost
grails.mail.port=25
grails.mail.username=
grails.mail.password=
- (optional) Fields starting with "ngsRepo" are the configurations to connect to the repository where the sequencing data is stored. Once these fields are set, PEGR will be able to connect to the data repository and check the status of new sequencing runs. PEGR will then deliver sample meta information for the new sequence runs to the repository for external analysis workflows to consume. An example is as follows
ngsRepo.host=xxx.xx.x.xxx
ngsRepo.username=some_username
ngsRepo.port=22
ngsRepo.root=/home/some_username/some_folder
ngsRepo.keyfile=/usr/local/pegr/.ssh/local_rsa
- (optional) Another optional Field is an external url to order inventory. For example,
inventory.order.link=https://www.quartzy.com