Configuring AWS RDS
We have broadly divided the PostgreSQL AWS RDS configuration process into the following steps:
- Create the PostgreSQL AWS RDS database
- Create a bastion host
- Configure the AWS RDS security group
- Connect to the AWS RDS database from the bastion host
- Create the databases for Digital.ai Deploy
- Connect the AWS RDS instance with Digital.ai Deploy
Note: The procedure specifies the important steps to consider while installing your AWS RDS instance.
To create the PostgreSQL AWS RDS database, follow the procedure described in the link below:
Under Connectivity section:
- In the VPC subsection, we recommend that you create AWS RDS instance in the same VPC where AWS EKS cluster is created.
- In the Public access subsection, ensure that No is selected to make your AWS RDS instance private.
- Select the security groups applicable in your VPC to which AWS EKS belongs.
- Ensure 5432 is selected as database port.
Create a bastion host in the public subnet using the same VPC which we have used while creating the RDS instance.
Navigate inside the security group settings of your RDS instance and add a new inbound rule with type Custom TCP, port range 5432 and source is private IP of the bastion host as shown in the image below:
Login to your PostgreSQL instance from the bastion host using the following command:
psql --host=<aws-rds-Endpoint> --port=5432 --username= <master-user-name> -W
Note: Replace the host value with your endpoint of RDS and username with your Master username.
To create the databases for Digital.ai Deploy, follow the steps shown below:
CREATE USER <xld-username> WITH NOSUPERUSER NOCREATEDB NOCREATEROLE ENCRYPTED PASSWORD '<xld-password>'; CREATE DATABASE <xld-database-name>; ALTER ROLE <xld-username> WITH PASSWORD '<xld-password>'; ALTER DATABASE <xld-database-name> OWNER to <xld-username>;
You must configure the following parameters in the
values.yaml file, in order to connect the RDS instance with Digital.ai Deploy:
postgresql: install: false
UseExistingDB: Enabled: true # If you want to use an existing database, set 'postgresql.install' to 'false' and 'UseExistingDB.Enabled' to 'true'. # Uncomment the following lines and provide the values. XL_DB_URL: "jdbc:postgresql://<aws-rds-Endpoint>:5432/<xld-database-name>" XL_DB_USERNAME: <xld-username> XL_DB_PASSWORD: <xld-password>