Applications Manager comes bundled with PostgreSQL. If you want to use your own PostgreSQL instead, follow the steps mentioned below:
Prerequisites:
A compatible PostgreSQL database should be accessible from Applications Manager installation. To know the supported versions and database user permissions, click here.
A PostgreSQL User with privileges to login, create database, and has full control over the tables in that database.
Steps:
1. Install Applications Manager with bundled PGSQL backend. It is recommended that you do not launch the application during the installation set up after choosing bundled Postgres as the backend. This avoids creating APM related tables in the bundled PGSQL database.
2. Create an Azure PostgreSQL database in the Azure portal.
Ensure that DB port 5432 is open to ensure that proper connection to the database can be made from Applications Manager server.
3. Get the following information from the database to connect to it:
Azure PostgreSQL Database Server name [Hostname]
Database port number
Database admin username
Database password
4. Connect to the server in which Applications Manager is installed and modify the below files to change the database configuration settings from bundled PgSQL to Azure PostgreSQL database.
Edit AppManager\conf\AMServer.properties file using a text editor (like wordpad or vi or sublime) and make the following changes:
Replace am.dbport.check=true with am.dbport.check=false.
Replace am.db.port=15432 with am.db.port=<PostgreSQL port> (ex: am.db.port=5432)
Modify AppManager/working/conf/database_params.conf file:
Change the host and port details:
Replace localhost:5432 with AzurePGSQLServer:<port number>
From this,
It should now look like this
Change the database username:
Replace the default <username> with <username@host> where the username is AzurePGSQL username and host is the AzurePGSQL hostname.
From this,
It should now look like this:
Change the database password
Replace the keyword encryptedpassword with password and type the AzurePGSQL database password next to it.
From this,
It should now look like this:
Once you implement the above changes, save the file. Then, copy and replace the file in the following directory: AppManager/working/conf/database_params.conf.
5. Take a backup of AppManager\working\bin\startPGSQL.bat/.sh file and AppManager\working\bin\stopPGSQL.bat/.sh file and then extract patch from this link under <AppManager_Home> directory.