PostgreSQL installation

Document version: 243. Automatically generated.

📘

PostgreSQL, is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

Automate platform depends on PostgreSQL 13 which is used as a storage for bot definition, NLU phrases, user data and analytical events.

Prerequisites

  • At least 1 dedicated machine available for installation

Steps

1. Install the server

Please install PostgreSQL 13 using official installation manual.

📘

PostgreSQL can be containerized

You can run PostgreSQL inside Docker container

2. Increase maximum connections count

Please make sure following configuration keys are set in postgresql.conf

max_connections = 2000

More details can be found here

3. Create databases with dedicated users

After provisioning server please create following databases with dedicated owners:

DB NameSQL
chatbots-adminCREATE DATABASE "chatbots-admin" WITH OWNER "chatbots-admin" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
chatbots-cron-orchestratorCREATE DATABASE "chatbots-cron-orchestrator" WITH OWNER "chatbots-cron-orchestrator" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
chatbots-analyticsCREATE DATABASE "chatbots-analytics" WITH OWNER "chatbots-analytics" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
chatbots-dialog-managerCREATE DATABASE "chatbots-dialog-manager" WITH OWNER "chatbots-dialog-manager" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
chatbots-ssoCREATE DATABASE "chatbots-sso" WITH OWNER "chatbots-sso" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
chatbots-thread-coordinatorCREATE DATABASE "chatbots-thread-coordinator" WITH OWNER "chatbots-thread-coordinator" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
chatbots-web-chatCREATE DATABASE "chatbots-web-chat" WITH OWNER "chatbots-web-chat" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
chatbots-nlu-facadeCREATE DATABASE "chatbots-nlu-facade" WITH OWNER "chatbots-nlu-facade" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
chatbots-storageCREATE DATABASE "chatbots-storage" WITH OWNER "chatbots-storage" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
chimeoCREATE DATABASE "chimeo" WITH OWNER "chimeo" ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';

4. Create grants

Below is the list of grants with associated users:

DB NameSQL
chatbots-adminGRANT CREATE, CONNECT, TEMPORARY ON DATABASE "chatbots-admin" TO "chatbots-admin";
chatbots-cron-orchestratorGRANT CREATE, CONNECT, TEMPORARY ON DATABASE "chatbots-cron-orchestrator" TO "chatbots-cron-orchestrator";
chatbots-analyticsGRANT CREATE, CONNECT, TEMPORARY ON DATABASE "chatbots-analytics" TO "chatbots-analytics";
chatbots-dialog-managerGRANT CREATE, CONNECT, TEMPORARY ON DATABASE "chatbots-dialog-manager" TO "chatbots-dialog-manager";
chatbots-ssoGRANT CREATE, CONNECT, TEMPORARY ON DATABASE "chatbots-sso" TO "chatbots-sso";
chatbots-thread-coordinatorGRANT CREATE, CONNECT, TEMPORARY ON DATABASE "chatbots-thread-coordinator" TO "chatbots-thread-coordinator";
chatbots-web-chatGRANT CREATE, CONNECT, TEMPORARY ON DATABASE "chatbots-web-chat" TO "chatbots-web-chat";
chatbots-nlu-facadeGRANT CREATE, CONNECT, TEMPORARY ON DATABASE "chatbots-nlu-facade" TO "chatbots-nlu-facade";
chatbots-storageGRANT CREATE, CONNECT, TEMPORARY ON DATABASE "chatbots-storage" TO "chatbots-storage";
chimeoGRANT CREATE, CONNECT, TEMPORARY ON DATABASE "chimeo" TO "chimeo";