Persistence setup on MS Azure

Sign in to azure portal

  • Visit the Azure portal.

  • Sign in with your Azure account credentials.

Navigate to Create a resource

  • Click on the + Create a resource button on the left-hand side.

Create a resource

1. Search for Azure Database for PostgreSQL

  • In Search the Marketplace box, type Azure Database for PostgreSQL.

  • Select Azure Database for PostgreSQL from the search results.

Marketplace
  • Click on the Azure Database for PostgreSQL → Create.

Azure database for postgreSQL

Basics

Configure basic details of the project.

1. Project details

  • Select the default resource group or create a new resource group.

  • In the Subscription field, select the Microsoft Azure Subscription (Default).

  • In the Resource group field, create a new resource group or select an existing one from your subscription.

  • For creating new, Click on Create New → Enter the name → Click OK.

Project details configuration

2. Server details

  • Provide a unique name for your PostgreSQL server (eg: SolitX PgSQL server).

  • Choose the appropriate region for your PostgreSQL server (eg: Central US).

  • Select PostgreSQL version 16.

  • Select the workload type as Production.

Server configuration

2.1. Compute server settings

  • In the Server details, in the Compute + storage section, click on Configure server.

  • Select Cluster as Server.

  • Select the Compute tier as General Purpose (2-96 vCores) - Balanced configuration for most common workloads.

  • Compute size is Standard_D4ds_v5 (4 vCores, 16 GiB memory, 6400 max iops).

  • In the Storage, select the Storage type as Premium SSD.

  • Storage size is 128GiB.

  • Performance tier is P10 (500 iops)

  • In High availability, select Same zone - a standby server is available within the same zone (99.95% SLA). Provides lower transactional latency than zone-redundant.

  • Let the Backups be the default settings.

  • Click Save.

Compute + storage(Configure server)

3. Authentication

  • Select PostgreSQL authentication only in Authentication method section.

  • Configure the admin username and password which indeed used in the code later on.

    • Eg: Administrator loginsolitx-admin,

    • Eg: Password*,

    • Eg: Confirm Password*.

  • After configuring the Basics, click on Next which is the Networking section to configure the networking details.

Authentication

Networking

  • In Connectivity method click on Public access (allowed IP addresses) and Private endpoint.

  • Under Firewall rules click on + Add current client IP address ( 183.83.228.169 ) and + Add 0.0.0.0 - 255.255.255.255.

Networking
Networking firewall rules
  • Click on Next which is the Security section to configure the security details.

Security

  • In the Data encryption section, by default, the Service-managed key is selected. If not, select it.

  • Click on Next which is the Tags section to configure the tags.

Security configuration

Tags

  • Leave the tags section as it is and click on Next: Review + create > button.

Tags

Review + create

  • Review and click on Create to create the new azure database for PostgreSQL server.

  • In this section, all the details which are configured during the creation process along with the estimated costs can be verified before actually creating the database.

Review + create

Overview

  • Select Create to provision the server. This operation may take a few minutes.

  • You will automatically be taken to a screen in which you can monitor the progress of your deployment.

  • Once the deployment is done select Go to resource which opens the server’s Overview page.

Go to resource
Overview

Create a database

  • From the overview page, on the left side panel, click on Settings dropdown → Databases.

  • Click Add - A Create a database modal will be opened from the right.

Add a database
  • Enter Name (Eg: solitx) and click on Save.

Create a database
  • Finally to access the database the URL will be the Endpoint/databasename. Here it is solitx-pgsql-server.postgres.database.azure.com/solitx.

The Endpoint can be found in the Overview page.