Here you can find an example of the structure that you need to have to run the Figaf IRT application.
This is just an example and you need to put your own values if you have another jar version, DB credentials, etc.
There are two ways of how to run/install Figaf IRT on Windows: a bat file or a Windows service.
There are also two ways of how to run/install Figaf IRT on Linux: a sh file or a Linux systemd service.
Commons steps
There are a couple of common steps in all cases:
1. Create a folder for your installation.
2. Put an
irt-*.jar file into this folder. You can download it
here
.
3. Put a postgresql JDBC
driver
into the "libs" folder.
4. Create a config/application.yml.
spring:
profiles: production
irt:
db:
type: postgresql
host: localhost
port: 5432
username:
figaf
password:
<db password>
name: irt
server:
port: 8089
#uncomment for getting more detailed logs
#logging:
# level:
# com.figaf: DEBUG
5. logs folder will be created automatically.
Postgresql installation on windows.
To install and configure Postgresql . Download the latest version. Version we currently recommend Version 14, but we should also support never versions
2. Default installation. Remember to make sure you have enough space on the disk and preferply not use boot disk. Remember the password you have created
3. Current installer ask for staring Stack Builder. Just skip this.
4. Open the pgAdmin application and login with the password you have added
5. Navigate to Login/Groups
6. Select Create Login/Group Role
name: figaf
on Definition tab - password: yourpassword form config yml file
on Priviliges tab - Can login shold be enabled
press save
7. Navigate to Databases
8. Create Database enter irt and select the figaf user. Then press save
9. In the databases navigate to irt and expand
10. Navigate to schema
11. Create Schema irt and assign figaf as user. Press Save
12. You can now starte the Figaf Tool.
Windows installation details
1. Windows .bat file
Folder structure:
run-irt.bat:
java -Xmx4096m -Dloader.path="./libs" -Djavax.net.ssl.trustStoreType=Windows-ROOT -jar irt-21033.jar
pause
If you just need to run the tool without installation as a windows service, then just execute
"run-irt.bat" file.
2. Windows Service
Folder structure:
1. Download exe file from the GitHub releases
page
2. Rename it to figafIrt.exe
3. Create a figafIrt.xml:
<?xml version="1.0" encoding="UTF-8"?>
<service>
<id>figafIrt</id>
<name>Figaf IRT</name>
<description>FIGAF IRT Windows Service</description>
<executable>
<your path to JDK>\bin\java</executable>
<arguments>-Xmx4096m -Dloader.path="./libs" -Djavax.net.ssl.trustStoreType=Windows-ROOT -jar irt-21033.jar</arguments>
<logmode>rotate</logmode>
</service>
4. Open the command line.
5. Run "
figafIrt.exe install".
6. Run "
figafIrt.exe start".
Linux installation
You can run IRT on Linux using
.sh file described below in section 2. It will run the tool in the context of your current session.
For full standalone installation as a
systemd service do all steps below.
1. User access configuration
The best practice is to create a separate user that will only own the IRT installation folder and will be used in the
systemd service descriptor (see section 3 below) to run the tool.
The following commands show how to configure separate user
figafToolRunner and group
figafToolManager to restrict access properly
(you should run them as root, login with 'sudo su -'):
- # create user figafToolRunner
useradd -m figafToolRunner
- # define password for figafToolRunner
passwd figafToolRunner
- # create group figafToolManager
groupadd figafToolManager
- # add group figafToolManager to the user figafToolRunner
usermod -GfigafToolManager figafToolRunner
- # add group figafToolManager to your user to be able to browse/edit content in the IRT installation folder
usermod -GfigafToolManager <your user>
- # change ownership for all files inside installation folder to the user figafToolRunner
chown -R figafToolRunner /var/opt/figaf-tool
- # change owner's group for all files inside installation folder to the group figafToolManager
chgrp -R figafToolManager /var/opt/figaf-tool
- # grant full access for owner and users that have owner's group
chmod -R ug+rwx /var/opt/figaf-tool
- # remove access for other users
chmod -R o-rwx /var/opt/figaf-tool
All new files uploaded to the installation folder must have
rwx permissions for the owner's group if these files will be used by the tool in runtime
As an alternative, if you already have a user that should be used in the
systemd service descriptor (see section 3 below) to run the tool, just grant permissions to IRT installation folder (for example
/var/opt/figaf-irt).
You can use the following commands (you should run them as root, login with 'sudo su -'):
- # change ownership to specified user
chown -R <required user> /var/opt/figaf-irt
- # grant full access for owner and users that have owner's group
chmod -R ug+rwx /var/opt/figaf-irt
- # remove access for other users
chmod -R o-rwx /var/opt/figaf-irt
It will change the ownership of the folder and enable full access to the owner and owner's group.
2. Linux .sh file
Create
run-irt.sh file in the IRT installation folder (for example
/var/opt/figaf-irt/run-irt.sh
):
java -Xmx4096m -Dloader.path="./libs" -jar irt-21033.jar
Folder structure is the same as in the Windows example.
This file should be open for execution by user who is configured in
systemd service descriptor (
see section 3 below). If user is configured in the way described above, grant rwxrwx--- access to it:
If you just need to run the tool without installation as a
systemd service, then just execute "run-irt.sh" file.
3. Linux systemd service
1. Configure "run-irt.sh" file as it is described in the previous section.
2. Create a service definition under the root access:
/etc/systemd/system/figaf-irt.service.
<user that should run the tool> here is either
figafToolRunner from the example in the configuration section or your another user.
[Unit]
Description=Figaf IRT Service
[Service]
User=<user that should run the tool>
#change this to your workspace
WorkingDirectory=/var/opt/figaf-irt
ExecStart=/bin/bash /var/opt/figaf-irt/run-irt.sh
SuccessExitStatus=143
TimeoutStopSec=10
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
3. Enable the service and start it
(you should run them as root, login with 'sudo su -'):
- systemctl enable figaf-irt.service
- systemctl daemon-reload
- systemctl start figaf-irt
Goto Configuration -> License and insert your license key.
Next up you can configure your agents.