In this article:
Step 1. Check System Requirements
Step 3. Install DBMS Front End
Step 6. Create a Metadata Repository
Step 7. Create a Service User of Security Subsystem
Step 8. Install Web Application Back End
Step 9. Set Up Web Application Configuration at Web Server
Step 10. Check BI Server Performance
Step 11. Start the Web Application
Example of Ready PostgreSQL DBMS Script
To work with the web application, the system must be formed using the software of Foresight Analytics Platform, which assumes presence of:
Client computers connected to the network, in which the web server is located.
Web server with installed web application back end.
BI server, on which the PP.SOM is installed.
License server used for activation of Foresight Analytics Platform with network license and manage the number of simultaneously working users.
Application server used for execution of scheduled tasks.
Database server, at which one of supported PostgreSQL DBMS versions is installed.
NOTE. BI server, application server, and web application can be located on one physical server. On executing resource-intensive tasks, locate application server and BI server on different physical servers.
The guide describes installation of Foresight Analytics Platform using PostgreSQL DBMS for the following versions of Linux OS:
Astra Linux SE 1.7.
RED OS 7.3.
Rocky Linux 8.
ALT Linux 10.
Installation of BI server (Step 4) and web application back end (Step 8) is executed using the distributions included in the software package of Foresight Analytics Platform:
Linux OS family version | Distribution files for BI server installation | Distribution files for web server installation |
Astra Linux SE 1.7 | foresight-fp10.x-biserver_10.5.<build number>~astra~1.7_amd64.deb | foresight-fp10.x-webserver_10.5.<build number>~astra~1.7_all.deb |
RED OS 7.3 | foresight-fp10.x-biserver_10.5.<build number>.redos7.3.x86_64.rpm | foresight-fp10.x-webserver_10.5.<build number>.redos7.3.noarch.rpm |
Rocky Linux 8 | foresight-fp10.x-biserver_10.5.<build number>.rocky8.x86_64.rpm | foresight-fp10.x-webserver_10.5.<build number>.rocky8.noarch.rpm |
ALT Linux 10 | foresight-fp10.x-biserver_10.5.<build number>.alt10.x86_64.rpm | foresight-fp10.x-webserver_10.5.<build number>.alt10.noarch.rpm |
After the web application is installed, the following directories are created:
For BI server:
/opt/foresight/fp10.x-biserver. Main files of BI server.
/etc/apache2-fp10.x. Configuration files of the Apache HTTP Server instance with BI server for Astra Linux.
/etc/httpd-fp10.x. Configuration files of the Apache HTTP Server instance with BI server for RED OS and Rocky Linux.
/etc/httpd2-fp10.x. Configuration files of the Apache HTTP Server instance with BI server for ALT Linux.
For web server:
/opt/foresight/fp10.x-webserver. Main files of web server.
/etc/opt/foresight/fp10.x-webserver. Additional configuration file of BI server instance, such as the envvars file to determine environment variables of Apache HTTP Server.
/etc/apache2-fp10.x-web. Configuration files of the Apache HTTP Server instance with web server for Astra Linux.
/etc/httpd-fp10.x-web. Configuration files of the Apache HTTP Server instance with web server for RED OS and Rocky Linux.
/etc/httpd2-fp10.x-web. Configuration files of the Apache HTTP Server instance with web server for ALT Linux.
Make sure that the system meets requirements for:
See also requirements for operating system settings and supported PostgreSQL DBMS versions.
The preparation consists of creating a database and a user that will be administrator of this database.
After executing all DBMS preparation operations, it is recommended to check user connection to the created database using DBMS means. If there will be any repository connection problems, it may also be necessary to check user access permissions and additional setup on DBMS level.
PostgreSQL server is prepared by the DBMS administrator.
IMPORTANT. To ensure system security before preparing the PostgreSQL server, check settings of the lc_messages parameter in the postgresql.conf configuration file. The PostgreSQL message language should match with operating system language settings.
To prepare the PostgreSQL server, execute scripts using any of the available methods, for example, via the pgAdmin application. Take into account the following features on executing the scripts:
The USER_NAME, DATABASE_NAME and SCHEMA_NAME parameters should be written in the upper case.
Parameter names are case sensitive and should be enclosed in quotation marks. If quotation marks are missing, parameter names will be converted to lower case during script execution.
Scripts should be executed by the DBMS administrator with the SUPERUSER privilege if the PostgreSQL server is prepared using the psql console.
TIP. To prepare a PostgreSQL server in Linux OS, use ready script. After executing the script the following is created: the NEW_USER database user with the NEW_USER password, the NEW_DATABASE database, the repository with the NEW_DATABASE identifier, and the SERVICE_USER service user with the SERVICE_USER password.
To create a database user, execute the script:
CREATE ROLE "USER_NAME" LOGIN ENCRYPTED PASSWORD 'USER_PASSWORD' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
Where:
USER_NAME. Name of the created user.
IMPORTANT. The ADMIN user name must not be used.
USER_PASSWORD. Password for the created user.
To create a database, execute the script:
CREATE DATABASE "DATABASE_NAME" WITH OWNER = "USER_NAME" ENCODING = 'UTF8' TABLESPACE = pg_default LC_COLLATE = default LC_CTYPE = default CONNECTION LIMIT = -1;
ALTER DATABASE "DATABASE_NAME" SET lo_compat_privileges = 'on';
GRANT ALL ON DATABASE "DATABASE_NAME" TO "USER_NAME";
Where:
USER_NAME. Name of the previously created user.
DATABASE_NAME. Name of the created database.
Creating a database supports only the UTF-8 encoding.
IMPORTANT. A database is created via the postgres service database by default. To proceed with DBMS server preparation, connect to the created database.
The public schema is used by default. When working with the public schema take into account the features given in the Features of Working with PostgreSQL DBMS section.
To create a custom schema in the current database, execute the script:
CREATE SCHEMA "SCHEMA_NAME" AUTHORIZATION "USER_NAME";
Where:
USER_NAME. Name of the previously created user.
SCHEMA_NAME. Custom schema identifier.
After executing the operations a custom schema will be created. The user created at Step 1 will be a schema owner.
To use the custom schema as a default schema, execute the script:
SET search_path TO "SCHEMA_NAME";
After executing the operations, the custom schema will be used instead of the public default schema.
NOTE. For details about working with custom schemas, see PostgreSQL documentation.
The Lo data type is used to save multibyte information in PostgreSQL. By default, after a database is created, support of working with this data type is disabled. To enable the support of the Lo data type, execute the script:
SET search_path TO "SCHEMA_NAME";
CREATE FUNCTION loin (cstring) RETURNS lo AS 'oidin' LANGUAGE internal IMMUTABLE STRICT;
CREATE FUNCTION loout (lo) RETURNS cstring AS 'oidout' LANGUAGE internal IMMUTABLE STRICT;
CREATE FUNCTION lorecv (internal) RETURNS lo AS 'oidrecv' LANGUAGE internal IMMUTABLE STRICT;
CREATE FUNCTION losend (lo) RETURNS bytea AS 'oidsend' LANGUAGE internal IMMUTABLE STRICT;
CREATE TYPE lo (INPUT = loin, OUTPUT = loout, RECEIVE = lorecv, SEND = losend, INTERNALLENGTH = 4, PASSEDBYVALUE);
CREATE CAST (lo AS oid) WITHOUT FUNCTION AS IMPLICIT;
CREATE CAST (oid AS lo) WITHOUT FUNCTION AS IMPLICIT;
CREATE OR REPLACE FUNCTION lo_manage() RETURNS pg_catalog.trigger AS '$libdir/lo' LANGUAGE C;
Where:
SCHEMA_NAME. Custom schema identifier.
NOTE. If one or several custom schemas are used, execute the script for each schema. If a custom schema is not created, execute the script without specifying the SCHEMA_NAME parameter. The public schema is used by default.
If the default public schema is used for work, all repository users will be able to create tables. It may cause issues with user updates and separation of access permissions of the users who are repository administrators. To avoid possible errors it is recommended to create all objects only under the user created at Step 1 and who is owner and administrator of the ADMIN schema.
Default configuration for PostgreSQL servers includes autovacuum - clearing of space occupied by data deleted from tables using the VACUUM SQL command. Statistic that is used by scheduler to select query execution method is also updated. If it is supposed that intensive work consisting in changing data in tables, it is recommended to set up configuration in such a way that autovacuum is executed in server low-load time (night, weekend). The setup can be executed using the documentation at the developer website.
To install PostgreSQL DBMS front end, execute the command:
Astra Linux:
sudo apt-get install postgresql-client
Rocky Linux:
sudo yum install postgresql postgresql-libs
RED OS:
sudo dnf install postgresql postgresql-libs
ALT Linux:
sudo apt-get install postgresql14
After executing the operation, the PostgreSQL driver is installed that is used by Foresight Analytics Platform to interact with database server.
Alternatively, Postgres Pro client can be installed. The installation guide is available at the manufacturer's website.
If BI server is installed manually from archive or DBMS front end is installed after BI server installation, create a symbolic link using the command:
Astra Linux:
sudo ln -s /usr/lib/x86_64-linux-gnu/libpq.so.5 /usr/lib/x86_64-linux-gnu/libpq.so
RED OS, Rocky Linux, ALT Linux:
sudo ln -s /usr/lib64/libpq.so.5 /usr/lib64/libpq.so
To install BI server:
Make sure that you are connected to the Internet.
Update information about packages:
Astra Linux, ALT Linux:
sudo apt-get update
RED OS and Rocky Linux:
sudo yum update
Copy the foresight-fp10.x-biserver*.deb/rpm distribution file from the software package to the /home/<user name> home directory. Name of the distribution file depends on Linux OS version.
If required, determine a user name, under whom the BI server is to be installed:
whoami
Install the copied BI server distribution file:
Astra Linux:
sudo dpkg -i foresight-fp10.x-biserver*.deb
Rocky Linux:
sudo yum localinstall foresight-fp10.x-biserver*.rpm
RED OS:
sudo dnf install foresight-fp10.x-biserver*.rpm
ALT Linux:
sudo apt-get install -y foresight-fp10.x-biserver*.rpm
Set missing dependencies for Astra Linux:
sudo apt-get -f install
If required, update again information about packages.
For correct work use actual versions of libraries from system repositories.
NOTE. The required libraries are contained in BI server distribution file and do not require additional installation. The appropriate message is displayed on installing missing libraries.
List of libraries for the fp10.x-biserver package
The installation procedure includes the following:
A new Apache2 configuration instance is created.
MPM worker is enabled.
The fp10.x-biserver module is enabled for loading mod_axis2.
Links of the apachectl-fp10.x type are created in the /usr/sbin directory to manage the instance.
The apache2-fp10.x service is registered and added to autorun for Astra Linux, the httpd-fp10.x service - for RED OS and Rocky Linux, the httpd2-fp10.x service - for ALT Linux.
BI server files are installed.
The foresight-xvfb service is registered and added to autorun to start the virtual graphic display No. 987. The foresight-xvfb service is started automatically.
NOTE. To change BI server version, install another package version over the previous one. Configuration files are saved if their version is not updated in the package.
Steps 9 and 10 use substitutions:
<BI server>. IP address or name of the DNS server, on which BI server is installed.
<port number>. Number of the port, via which BI server is available. The 8810 port is used by default.
To view the required ports, use:
The file /etc/apache2-fp10.x/ports.conf for Astra Linux.
The file /etc/httpd-fp10.x/conf/httpd-fp10.x.conf for RED OS and Rocky Linux.
The file /etc/httpd2-fp10.x/conf/ports-enabled/http-fp10.x.conf for ALT Linux.
To determine server IP address, execute the command:
ip address
To determine DNS server name, execute the command:
hostname
To track BI server performance and register various errors, enable system message logging if required. To do this, add the following strings in the file /opt/foresight/fp10.x-biserver/etc/envvars:
PP_LOG=1
PP_LOGTIME=1
By default, system messages are written:
To the file /var/log/apache2-fp10.x/error.log for Astra Linux.
To the file /var/log/httpd/error-fp10.x.log for RED OS and Rocky Linux.
To the file /var/log/httpd2/error-fp10.x.log for ALT Linux.
To set up BI server:
Disable the AstraMode mode for the apache2-fp10.x instance in Astra Linux. To do this, replace the #AstraMode on string in the /etc/apache2-fp10.x/apache2.conf file with the following one:
AstraMode off
Start the Apache2 web server:
Astra Linux:
sudo systemctl start apache2-fp10.x
RED OS and Rocky Linux:
sudo systemctl start httpd-fp10.x
ALT Linux:
sudo systemctl start httpd2-fp10.x
Create the Metabases.xml file to set up repository connection:
sudo nano /opt/foresight/fp10.x-biserver/etc/Metabases.xml
Fill in the Metabases.xml file:
<PP>
<Metabases>
<REPOSITORY_ID Name="REPOSITORY_ID" Authentication="1" Driver="DRIVER_ID" Package="STANDARDSECURITYPACKAGE" DebugMode="1">
<LogonData DATABASE="DATABASE_NAME" SERVER="SERVER_DATABASE" CASESENSITIVE="true"/>
<Credentials Authentication="1"/>
</REPOSITORY_ID>
</Metabases>
</PP>
Where:
REPOSITORY_ID. Unique repository identifier.
DRIVER_ID. DBMS driver identifier of repository. For PostgreSQL – POSTGRES.
DATABASE_NAME. Identifier of the database created during preparation of DBMS back end at Step 2. If a custom schema is created, specify its identifier via a point after database identifier. For example: DATABASE_NAME.SCHEMA_NAME.
SERVER_DATABASE. IP address or DNS name, under which the database server is registered.
Depending on repository connection settings, a list of repositories is created in the login dialog box to log in to the system.
If required, download and unpack the Metabases.zip archive with the example of filling in the Metabases.xml file.
Activate license. To do this, add the LSFORCEHOST variable in the end of the file /opt/foresight/fp10.x-biserver/etc/envvars in the /etc/environment global variables file:
When network license is used:
LSFORCEHOST=<server name>
When stand-alone license is used:
LSFORCEHOST=NO-NET
To apply settings in the /etc/environment file, restart the operating system.
Grant access permissions for the Apache2 user for the folder with installed BI server:
Astra Linux:
sudo chown -R www-data:www-data /opt/foresight/fp10.x-biserver
RED OS and Rocky Linux:
sudo chown -R apache:apache /opt/foresight/fp10.x-biserver
ALT Linux:
sudo chown -R apache2:apache2 /opt/foresight/fp10.x-biserver
Restart the BI server:
Astra Linux:
sudo systemctl restart apache2-fp10.x
RED OS and Rocky Linux:
sudo systemctl restart httpd-fp10.x
ALT Linux:
sudo systemctl restart httpd2-fp10.x
The installed BI server will work in background mode as a separate Linux service. The Apache2 instance with BI server will be started by default at the 8810 port. To view the required ports, use:
The file /etc/apache2-fp10.x/ports.conf for Astra Linux.
The file /etc/httpd-fp10.x/conf/httpd-fp10.x.conf for RED OS and Rocky Linux.
The file /etc/httpd2-fp10.x/conf/ports-enabled/http-fp10.x.conf for ALT Linux.
To create a metadata repository on PostgreSQL server:
Change the current directory with the BI server installation folder:
cd /opt/foresight/fp10.x-biserver/bin
Install the additional package xvfb-run in ALT Linux:
sudo apt-get install xvfb-run
Start the RepoManager console application using the RepoManager_start.sh script with the specified parameters:
For the public schema:
./RepoManager_start.sh -ocreate-repo -tpostgres -sSERVER_DATABASE -pPORT -uUSER_NAME -wUSER_PASSWORD -dDATABASE_NAME -fRM_FILE -i
For the custom schema:
./RepoManager_start.sh -ocreate-repo -tpostgres -sSERVER_DATABASE -pPORT -uUSER_NAME -wUSER_PASSWORD -dDATABASE_NAME -mSCHEMA_NAME -fRM_FILE -i
Where:
SERVER_DATABASE. IP address or DNS name, under which the database server specified at Step 5 is registered.
PORT. DBMS server port. The parameter is optional if the DBMS server is available via the 5432 port used by default. If the default port was changed, specify the actual port number.
USER_NAME. Name of the user created during preparation of DBMS back end at Step 2.
USER_PASSWORD. Password of the user created during preparation of DBMS back end at Step 2.
DATABASE_NAME. Identifier of the database created during preparation of DBMS front end at Step 2.
SCHEMA_NAME. Identifier of the custom schema created during preparation of DBMS back end at Step 2.
RM_FILE. The path to the current.rm4 file with repository creation scripts. The default path: /opt/foresight/fp10.x-biserver/bin/rm/current.rm4.
After executing the operation a metadata repository will be created in the specified DBMS in the default public schema or custom schema with taking case into account. When preparing the DBMS back end at Step 2, parameters should be set in upper case, that is why enabling case sensitivity is mandatory.
A service user of security subsystem ensures:
System login.
Correct work of auditing and user locking.
Use of application role during the work with DBMS.
Use of password hashing.
To create a service user of security subsystem:
IMPORTANT. Database server supports only a single service user account. If database server contains several repositories, create a service user with equal credentials for each repository.
After executing the operations, a service user of security subsystem will be created on the database server and saved according to the selected method on the computer with installed BI server.
TIP. It is recommended to disable the mandatory periodic password change policy for an account of service user of security subsystem in DBMS.
To create service user credentials, start the PP.Util utility located in the folder with installed BI server: /opt/foresight/fp10.x-biserver/bin with the following parameters:
sudo -E /opt/foresight/fp10.x-biserver/bin/PP.Util_start.sh /create_audit_user metabase_id login password audit_login audit_password db_login db_password
Where:
metabase_id. Repository identifier specified at Step 5. Mandatory parameter.
login. Owner name for the ADMIN schema for repository connection. Mandatory parameter.
password. Owner password for the ADMIN schema for repository connection. Mandatory parameter.
audit_login. Name of created service user. Mandatory parameter.
NOTE. The P4AUDIT server user name is reserved by the system and cannot be used.
audit_password. Password of created service user. Mandatory parameter.
db_login. Name of the database user who has privileges to create DBMS users. Optional parameter. If user name is not specified, it will be asked in interactive mode.
db_password. Password of the database user who has privileges to create DBMS users. Optional parameter. If the password is not specified, it will be requested in interactive mode.
To save created service user credentials on the computer with installed BI server, start the PP.Util utility located in the folder with installed BI server: /opt/foresight/fp10.x-biserver/bin with the following parameters:
sudo /opt/foresight/fp10.x-biserver/bin/PP.Util_start.sh /save_audit_creds /ALG enc_alg realm|/DC login password
Where:
enc_alg. Encryption algorithm that is used to encrypt credentials:
gos. Default value. Encryption with the GOST 28147-89 algorithm is used.
sim. Credentials are saved unencrypted.
IMPORTANT. To ensure security during production operation of Foresight Analytics Platform, use the gos value.
Optional parameter. If the parameter is not set, the default value is used.
realm|/DC. Credentials scope of the service user. Select one of the options:
realm. If the Metabase.xml file created at Step 5 contains more than one database server, and service user credentials should differ for each of them, create an identifier of the SERVER_DATABASE|TYPE type for a specific server, where:
SERVER_DATABASE. IP address or DNS name, under which the database server specified at Step 5 is registered.
TYPE. Type of the driver in use - POSTGRES.
For example: "127.0.0.1|POSTGRES".
NOTE. To avoid syntax errors, enclose the value in quotation marks.
/DC. If the Metabase.xml file created at Step 5 contains one or several database servers, but service user credentials should be equal for all servers, use this parameter without specifying additional settings.
Mandatory parameter.
login. Name of existing service user. Mandatory parameter.
password. Password of existing service user. Optional parameter. If the password is not specified, it will be requested in interactive mode.
After executing the operations service user credentials are saved on the computer with BI server in the settings.xml file at: /opt/foresight/fp10.x-biserver/etc.
Examples of command use:
sudo /opt/foresight/fp10.x-biserver/bin/PP.Util_start.sh /save_audit_creds "10.30.210.10|POSTGRES" SERVICE_USER_NAME SERVICE_USER_PASSWORD
sudo /opt/foresight/fp10.x-biserver/bin/PP.Util_start.sh /save_audit_creds /DC SERVICE_USER_NAME SERVICE_USER_PASSWORD
To install web application back end:
Make sure that you are connected to the Internet.
Copy the foresight-fp10.x-webserver*.deb/rpm distribution file from the software package to the home directory /home/<user name>. Name of the distribution file depends on Linux OS version.
Install the copied web server distribution file:
Astra Linux:
sudo dpkg -i foresight-fp10.x-webserver*.deb
Rocky Linux:
sudo yum localinstall foresight-fp10.x-webserver*.rpm
RED OS:
sudo dnf install foresight-fp10.x-webserver*.rpm
ALT Linux:
sudo apt-get install -y foresight-fp10.x-webserver*.rpm
Disable the AstraMode mode for the apache2-fp10.x-web instance in Astra Linux. To do this, replace the #AstraMode on string in the /etc/apache2-fp10.x-web/apache2.conf file with the following one:
AstraMode off
List of dependencies for the fp10.x-webserver package
The web application back end will be installed to the folder /opt/foresight/fp10.x-webserver. During the installation, a new instance of apache2-fp10.x-web will be created and set up for Astra Linux, httpd-fp10.x-web - for RED OS and Rocky Linux, httpd2-fp10.x-web - for ALT Linux. The web application will be set up to work with a local BI server via the 8810 port. The BI server URL can be changed in the file /opt/foresight/fp10.x-webserver/config/PP.xml. The web application itself is available via the 8110 port.
Steps 9 and 10 use substitution:
<web server>. IP address or name of the DNS server, on which web application back end is installed.
To determine server IP address, execute the command:
ip address
To determine DNS server name, execute the command:
hostname
To set up web application configuration, use the files:
PP.xml. It is used to set up and connect to BI server and specify web application parameters. The file is located in the folder /opt/foresight/fp10.x-webserver/config.
config.json. It is used to open tools and repository objects in the web application. The file is located in the folder /opt/foresight/fp10.x-webserver/r/config.
It is used to set up BI server connection and to specify web application parameters:
Open the PP.xml file. The file contains the following structure by default:
<?xml version="1.0" encoding="utf-8"?>
<pp>
<proxy url="http://<current IP address>:8810/fpBI_App_v10.x/axis2/services/PP.SOM.Som"/>
<metabase id="" />
<serviceCM ParamsUrl="http://<current IP address>:8110/fp10.x/r/#/settings"/>
<modules commonModulesUrl="http://<current IP address>:8110/fp10.x/r/#">
</modules>
</pp>
Set BI server connection parameters:
proxy/service. Specify the path to the folder with BI server, as a value of the url attribute:
http://<BI server>:<port number>/fpBI_App_v10.x/axis2/services/PP.SOM.Som
NOTE. If the <proxy> section is used, requests are executed via the web application back end that is PPService.axd. If the <service> section is used, requests are executed directly in the browser avoiding the web application back end.
If the <proxy> section is used, value of the url attribute is not taken into account. BI server connection parameters are contained in the following files:
/etc/opt/foresight/fp10.x-webserver/envvars. The PP_SOM contains the automatic path to the folder with default BI server, on installing web application back end:
PP_SOM=http://localhost:8810/fpBI_App_v10.x/axis2/services/PP.SOM.Som
/etc/apache2-fp10.x-web/sites-available/webserver.conf in Astra Linux, /etc/httpd-fp10.x-web/conf.d/00-virtualhost.conf in RED OS and Rocky Linux, /etc/httpd2-fp10.x-web/conf/sites-available/default.conf in ALT Linux. The ProxyPass parameter uses the PP_SOM variable and has the set path to PPService.axd:
ProxyPass /fp10.x/app/PPService.axd ${PP_SOM} retry=1 acquire=3000 timeout=6000 Keepalive=On
metabase. Specify identifier of the repository specified at Step 5 as a value of the id attribute.
serviceCM. Specify the repository parameters URL as a value of the ParamsUrl attribute as follows:
http://<web server>:8110/fp10.x/r/#/settings
modules. Specify web application settings URL that enable the user to open tools and repository objects, as a value of the commonModulesUrl attribute, as follows:
http://<web server>:8110/fp10.x/r/#
Restart the web server:
Astra Linux:
sudo systemctl restart apache2-fp10.x
sudo systemctl restart apache2-fp10.x-web
RED OS and Rocky Linux:
sudo systemctl restart httpd-fp10.x
sudo systemctl restart httpd-fp10.x-web
ALT Linux:
sudo systemctl restart httpd2-fp10.x
sudo systemctl restart httpd2-fp10.x-web
The example of the PP.xml file:
<?xml version="1.0" encoding="utf-8" ?>
<pp>
<service url="http://10.7.0.100:8810/fpBI_App_v10.x/axis2/services/PP.SOM.Som"/>
<metabase id="WAREHOUSE" />
<serviceCM ParamsUrl="http://10.7.0.100:8110/fp10.x/r/#/settings"/>
<modules commonModulesUrl="http://10.7.0.100:8110/fp10.x/r/#">
</modules>
</pp>
To open tools and repository objects in the web application:
Open the config.json file. The file contains the following structure by default:
{
"targetRepo": "",
"serviceUrl": "http://<current IP address>:8110/fp10.x/app/PPService.axd",
"locale": "ru",
"locales": ["ru"],
"title": "FAP10",
"baseUrl": "http://<current IP address>:8110/fp10.x/"
}
Set fields in JSON:
targetRepo. Specify identifier of the repository specified at Step 5.
NOTE. Identifier of the repository specified as the id attribute in the <metabase> section of the PP.xml file should match with the repository identifier specified in the targetRepo field.
serviceUrl. Specify web server URL of Foresight Analytics Platform:
http://<web server>:8110/fp10.x/app/PPService.axd
locale. Specify two-letter language code that will be used by default if the array for interface language switching is specified.
locales. Specify the array containing two-letter codes of the language, to which the interface can be switched:
ru. Russian.
en. English.
By default, only one element corresponding to Russian is included into array. If English is added to the array, the start page used for logging in to repository will contain hyperlinks to switch the interface language.
title. Specify web application title if required. The field has the FAP10 value by default.
baseUrl. Specify web application URL:
http://<current IP address>:8110/fp10.x/
Restart the web server:
Astra Linux:
sudo systemctl restart apache2-fp10.x
sudo systemctl restart apache2-fp10.x-web
RED OS and Rocky Linux:
sudo systemctl restart httpd-fp10.x
sudo systemctl restart httpd-fp10.x-web
ALT Linux:
sudo systemctl restart httpd2-fp10.x
sudo systemctl restart httpd2-fp10.x-web
The example of the config.json file:
{
"targetRepo": "WAREHOUSE",
"serviceUrl": "http://10.7.0.100:8110/fp10.x/app/PPService.axd",
"locale": "ru",
"locales": ["ru"],
"title": "Foresight",
"baseUrl": "http://10.7.0.100:8110/fp10.x/"
}
To check BI server performance:
Copy BI server URL:
http://<BI server>:<port number>/fpBI_App_v10.x/axis2/services/PP.SOM.Som
Where:
<BI server>. IP address or DNS server name specified at Step 9.
<port number>. Number of the port specified at Step 9. The 8810 port is used by default.
Create two URLs and open them in the browser:
Add ?wsdl to the URL, for example:
http://localhost:8810/fpBI_App_v10.x/axis2/services/PP.SOM.Som?wsdl
Delete PP.SOM.Som from the URL, for example:
http://localhost:8810/fpBI_App_v10.x/axis2/services
If browser displays an error, check BI server settings and restart it.
If BI server works correctly, the set of available operations to work with web service opens as an XML file on clicking the first link, and as a list on clicking the second link.
To start the web application, open the web browser and enter web application URL in the address field:
http://<web server>:8110/fp10.x/r/#
After executing the operation the login box opens. By default, the connection is established to the repository specified in the PP.xml file at Step 9. To connect to a different repository, specify its identifier in the address field:
http://<web server>:8110/fp10.x/r/#/login?repo=<repository identifier>
The list of available repositories is created in the Metabase.xml file created at Step 5.
NOTE. Authorization in the web application may be accompanied by the errors caused by CORS policy restrictions.
To solve the problem and increase system security when exchanging data between different domains, set up the CORS mechanism:
Open the file:
/etc/apache2-fp10.x/apache2.conf in Astra Linux.
/etc/httpd-fp10.x/conf/httpd-fp10.x.conf in RED OS and Rocky Linux.
/etc/httpd2-fp10.x/conf/httpd2-fp10.x.conf in ALT Linux.
Set the headers Origin, Access-Control-Allow-Origin, Access-Control-Allow-Methods, Access-Control-Allow-Headers:
<IfModule mod_headers.c>
SetEnvIf Origin ^(<allowed domain>)$ CORS_ALLOW_ORIGIN=$1
Header always set Access-Control-Allow-Origin %{CORS_ALLOW_ORIGIN}e env=CORS_ALLOW_ORIGIN
Header merge Vary "Origin"
Header always set Access-Control-Allow-Methods "POST, OPTIONS, <HTTP request methods>"
Header always set Access-Control-Allow-Headers "get-ppbi-time, content-type, soapaction, accept-language, cache-control, Authorization, <HTTP request headers>"
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
In the substitutions:
<allowed domain>. Specify the domain as a regular expression, for which getting of requests will be allowed. For example, the regular expression for the example.com domain:
https?://(?:.+\.)?example\.com(?::\d{1,5})?
This setting enables the use of the CORS mechanism on the parent and the child domains, and it is also dynamically installed to the current protocol, domain, port without the use of overriding rules.
<HTTP request methods>. Specify additional methods to access resource. The POST and OPTIONS methods are mandatory.
<HTTP request headers>. Specify headers used by resource. The headers get-ppbi-time,content-type, soapaction, accept-language, cache-control, Authorization are mandatory.
NOTE. Make sure that the specified parameters of the CORS mechanism meet the requirements of the resource in use.
Connect the headers, rewrite modules in Astra Linux:
sudo a2enmod-fp10.x headers rewrite
Restart the BI server:
Astra Linux:
sudo systemctl restart apache2-fp10.x
RED OS and Rocky Linux:
sudo systemctl restart httpd-fp10.x
ALT Linux:
sudo systemctl restart httpd2-fp10.x
The example contains all parts of selected scripts for the PostgreSQL DBMS given at Steps 2, 6, 7:
Download and unpack the Script_example_public.zip archive if the public schema is used.
Download and unpack the Script_example_custom_scheme.zip archive if a custom schema is used.
Foresight Analytics Platform provides several authentication methods. Authentication method is selected depending on the required security measures during repository access setup.
User credentials can be checked on DBMS server and/or in Foresight Analytics Platform.
The following basic authentication types are available:
Password. Default value.
Integrated domain.
Domain.
For details see the Foresight Analytics Platform Authentication section.
To use integrated domain or domain authentication, enable domain group support on PostgreSQL server and execute setup according to the Setting Up Domain/Integrated Domain Authentication on Apache2 Web Server section.
To remove BI server files without removing configuration files, execute the command:
Astra Linux, ALT Linux:
sudo apt-get remove fp10.x-biserver
RED OS and Rocky Linux:
sudo yum remove fp10.x-biserver
After executing the operation the BI server files are removed. Configuration files in the folders /etc/apache2-fp10.x and /etc/opt/foresight/fp10.x-biserver, as well as new files not included in the setup package in these folders and in /opt/foresight/fp10.x-biserver will be saved and can be used on the next distribution file installation.
To delete BI server with configuration files, execute the command:
Astra Linux:
sudo apt-get purge fp10.x-biserver
RED OS and Rocky Linux:
sudo yum purge fp10.x-biserver
ALT Linux:
sudo apt-get remove --purge fp10.x-biserver
After executing the operation, the BI server will be deleted with configuration files. In this case, new files that are not included into the setup package are saved.
To remove web server files without removing configuration files, execute the command:
Astra Linux, ALT Linux:
sudo apt-get remove fp10.x-webserver
RED OS and Rocky Linux:
sudo yum remove fp10.x-webserver
After executing the operation, web server files will be removed. Configuration files in the folders /etc/apache2-fp10.x-web and /etc/opt/foresight/fp10.x-webserver, as well as new files not included in the setup package in these folders and in /opt/foresight/fp10.x-webserver will be saved and can be used on the next distribution file installation.
To delete web server with configuration files, execute the command:
Astra Linux:
sudo apt-get purge fp10.x-webserver
RED OS and Rocky Linux:
sudo yum purge fp10.x-webserver
ALT Linux:
sudo apt-get remove --purge fp10.x-webserver
After executing the operation, the web server will be deleted with configuration files. In this case, new files that are not included into the setup package are saved.
See also: