How to Configure Application and Database Server Separately?
This document describes how the ServiceOps application and database server can be configured on different machines.
Prerequisites:
- Static IP Address For both APP and DB server
- Open Port Connect SSH (22), PostgreSQL (5432)
- High Internet Speed Latency
Example:
ServiceOps Application Machine IP: 172.16.12.152
DB Machine IP: 172.16.13.40
OS: Ubuntu 22
Configuration
To configure, follow the below steps:
Stop the Services
- Stop the ServiceOps application and local database services from the application server using the commands below. For example: 172.16.12.152
Commands:
systemctl stop ft-main-server
systemctl stop ft-analytics-server
systemctl stop postgresql
For RedHat OS, use the Postgresql stop command as shown below:
For Postgresql Version 11:
systemctl stop postgresql-11
For Postgresql Version 16:
systemctl stop postgresql-16
• Ensure that the services are not running. • In the case of the HA environment, please stop the HA Observer.
Install Utility on Database Server (172.16.13.40)
To install the PostgreSQL v16 on the Database server, download the MotadatapgDB zip file and extract it. For example, the Database Server IP is 172.16.13.40.
Get and save the database’s encrypted password from the file path: /opt/flotomate/main-server/lib/ boot-hosted-exec.conf.
Grant the chmod permission to set up the file using the command below. The file is available in the downloaded pg_separate_setup. zip file.
chmod 777 MotadataPGDBSetup
Verify whether PostgreSQL has already been installed on the Database Server. If installed, please delete it and install a fresh server for the database.
Execute the MotadataPGDBSetup file using the below command:
./MotadataPGDBSetup
- Enter the Database Port number. The default port is 5432.
- Enter "y" to install the PostgreSQL version 16 database.
- Once done, enter the DB password taken from step 2.
- Next, the DB password will be validated, and “DB Password Valid Match” will appear.
Once the database password is validated, the installation process will be completed, and a message, “PostgreSQL 16 fresh installed completed,” will appear.
Check the status of the PostgreSQL service using the below command:
systemctl status postgresql
For RedHat OS v11 and 16:
systemctl status postgresql-11
systemctl status postgresql-16
Configure Database IP and Port on ServiceOps Application Server (172.16.12.152)
The database server can be connected to the Application in two ways:
- Manually
- By Running the Utility
Manually
To connect manually, replace the IP addresses in the following config files of the ServiceOps server:
- /opt/flotomate/main-server/config/application-saas.properties
- /opt/flotomate/cm-analytics/config/application-saas.properties
- /opt/flotomate/main-server/lib/boot-hosted-exec.conf
- /opt/flotomate/cm-analytics/lib/analytics-hosted-exec.conf
Utility
Once the zip file is downloaded, grant the chmod permission to the “MotadataServiceOpsDBSeparateConfig” utility file using the below command:
chmod 777 MotadataServiceOpsDBSeparateConfig
Execute the setup file using the below command:
./ MotadataServiceOpsDBSeparateConfig
- To update the DB port number, enter 2.
- Enter the database port number. By default, 5432 port for PostgreSQL.
- To update the Database IP address and Host IP address, enter 3.
- Enter the Database server IP address. For example, 172.16.13.40
- The process is completed. Now exit from the setup by selecting option 4.
Now, verify the DB port and Host IP address in the below config files:
- /opt/flotomate/main-server/config/application-saas.properties
- /opt/flotomate/cm-analytics/config/application-saas.properties
- /opt/flotomate/main-server/lib/boot-hosted-exec.conf
- /opt/flotomate/cm-analytics/lib/analytics-hosted-exec.conf
Check the Application and Database Server port connectivity.
Next, start the ServiceOps server service manually using the below commands:
systemctl start ft-main-server
systemctl start ft-analytics-server