505. Foretify Manager Test Run Data Server
Note
This feature is available in CA (Controlled Access) mode in this release. Contact your Applications Engineer for assistance in using this capability.
To optimize the performance of the test runs visualizer in Foretify Manager, a separate service can be set up to manage access to test run debugging and visualization data.
Where configured, all test run data access (for visualization and debugging purposes) will be deferred to this service by Foretify Manager.
This document includes the steps for configuring and running this server.
505.1 Basic Installation
For the most basic installation, follow these steps:
- Obtain a Foretify Manager installation (tarball) and extract it to a location (e.g.,
/opt/fmanager/latest). - Locate the
run-data-server.shfile. You'll find it under/opt/fmanager/latest/server/bin/. - Run the server. Execute
/opt/fmanager/latest/server/bin/run-data-server. - Verify server startup. The run data server now listens on port 8086 (by default).
- Configure Foretify Manager. In Foretify Manager's
application.properties, setrun-data-server.url=http://localhost:8086and restart the manager. - Inter-service communication. Foretify Manager should now be able to communicate with the server.
505.2 Configuration
To configure the Foretify Manager Test Run Data Server application:
-
Create a Configuration Directory:
Make a directory to store configuration files. A common location is
/opt/fmanager/run-data-server/config. -
Create the application.properties file:
Inside the created directory, create a file named
application.properties. You can use the following commands:sudo touch /opt/fmanager/run-data-server/config/application.properties sudo vi /opt/fmanager/run-data-server/config/application.properties(Replace
viwith your preferred text editor if needed) -
Application Properties:
The
application.propertiesfile allows you to configure various settings for the server. All properties have default values, but you can customize them as needed.server.logs.dir(/var/log/foretellixby default): defines the directory where the server will store its logs. The logs will be saved in a file namedrun-data-server.logwithin the specified directory.server.port(8086by default): defines the port on which the server will listen for incoming requests. Important: therun-data-server.urlproperty on the Foretify Manager side needs to be configured to match the port specified by theserver.port.
505.3 Memory configuration
It is possible to pass JVM configuration (such as minimum and maximum heap size allocation) to the server. This is done using a jvm.options file. The file should also sit under your configuration
directory (in the example: /opt/fmanager/run-data-server/config).
An example file is present under your Foretify Manager package. E.g /opt/fmanager/latest/config/run-data-server/jvm.options.
505.4 Logging
As mentioned before, the logging directory is by default /var/log/foretellix. You can create your logging directory, and configure its path on application.properties as mentioned above.
505.5 Deployment
505.5.1 Running as a service
To run the Run Data Server as a service:
-
Create the service file:
Shell commands: create service file$ sudo touch /usr/lib/systemd/system/fmanager_run_data.service $ sudo vi /usr/lib/systemd/system/fmanager_run_data.service -
Add the following to the fmanager_run_data.service file:
fmanager.service file syntax[Unit] Description=FManager run data server Daemon [Service] WorkingDirectory=/opt/fmanager/run-data-server/config ExecStart=/opt/fmanager/latest/server/bin/run-data-server SuccessExitStatus=143 Restart=always RestartSec=30 [Install] WantedBy=multi-user.target -
Start the service:
sudo systemctl start fmanager_run_data.service
Note
This example assumes that your application/JVM configuration is under /opt/fmanager/run-data-server/config directory. Otherwise, set WorkingDirectory to your actual configuration location.
505.5.2 Running in a Docker Container
This section details how to run the Foretify Manager Test Run Data Server as a Docker container.
To build the run-data-server docker image, run /opt/fmanager/latest/docker/run_data_server/create_image. It should now be ready to run.
Important Considerations:
The container has specific dependencies for proper operation. Here's a breakdown of these dependencies and how to address them:
-
Test Run Data Access: If your test run data resides on a filesystem (not S3 or similar remote storage), the container needs access to that filesystem.
-
Configuration Access: The container needs access to your
application.propertiesandjvm.optionsfiles. -
Log Writing: The container needs write access to its log file location.
-
Port Mapping: The container's internal port needs to be exposed to your system.
Running the Container:
We can achieve these requirements using standard Docker volume mounting and port mapping. Here's an example command:
docker run -p 8086:8086 \
-v /home/my_regressions:/home/my_regression \
-v /opt/fmanager/run-data-server/config/application.properties:/config/application.properties \
-v /var/log/foretellix/run-data-server.log:/var/log/foretellix/run-data-server.log run-data-server
Explanation:
-p 8086:8086: Maps port 8086 inside the container to port 8086 on your system. This allows external communication with the server running within the container.-v /home/my_regressions:/home/my_regression: Mounts your test run data directory (/home/my_regressions) on your host system to the/home/my_regressiondirectory inside the container. This grants the container access to your test run data.run-data-server: This specifies the actual image to run, which is the Foretify Manager Test Run Data Server.-v /opt/fmanager/run-data-server/config/application.properties:/config/application.properties: Mounts yourapplication.propertiesfile, located at/opt/fmanager/run-data-server/configon your host system, to the/config/application.propertieslocation within the container. This ensures the container uses your configuration settings.-v /var/log/foretellix/run-data-server.log:/var/log/foretellix/run-data-server.log: Mounts your log file, typically located at/var/log/foretellix/run-data-server.logon your host system, to the same path inside the container. This allows the container to write logs to your designated location.
Note Regarding jvm.options:
- This file is typically copied directly from the Foretify Manager package (
/opt/fmanager/latest/config/run-data-server/jvm.options) into the container image during the build process. - Edit this file directly (if needed) before building the image (using the command
./create_image). This ensures the updated configuration is included when you run the container.