Create Azure Arc-enabled PostgreSQL server using Azure Data Studio

This document walks you through the steps for using Azure Data Studio to provision Azure Arc-enabled PostgreSQL servers.

Prerequisites

Before you can proceed with the tasks in this article, you need to have the necessary tools. All deployments require the following tools:

  • Azure Data Studio

  • Azure Arc extension for Azure Data Studio

  • Azure CLI (az)

  • arcdata extension for Azure CLI

  • kubectl

    Additional client tools depending your environment. For a more comprehensive list, see Client tools.

In addition to the required tools, to complete the tasks, you need an Azure Arc data controller.

Note

As a preview feature, the technology presented in this article is subject to Supplemental Terms of Use for Microsoft Azure Previews.

The latest updates are available in the release notes.

Preliminary and temporary step for OpenShift users only

Implement this step before moving to the next step. To deploy PostgreSQL server onto Red Hat OpenShift in a project other than the default, you need to execute the following commands against your cluster to update the security constraints. This command grants the necessary privileges to the service accounts that will run your PostgreSQL server. The security context constraint (SCC) arc-data-scc is the one you added when you deployed the Azure Arc data controller.

oc adm policy add-scc-to-user arc-data-scc -z <server-name> -n <namespace name>

Server-name is the name of the server you will deploy during the next step.

For more details on SCCs in OpenShift, please refer to the OpenShift documentation. You may now implement the next step.

Create an Azure Arc-enabled PostgreSQL server

  1. Launch Azure Data Studio
  2. On the Connections tab, Click on the three dots on the top left and choose "New Deployment"
  3. From the deployment options, select PostgreSQL server - Azure Arc

    Note

    You may be prompted to install the (arcdata) extension for Azure (az) CLI here if it is not currently installed.

  4. Accept the Privacy and license terms and click Select at the bottom
  5. In the Deploy PostgreSQL server - Azure Arc blade, enter the following information:
    • Enter a name for the server
    • Enter and confirm a password for the postgres administrator user of the server
    • Select the storage class as appropriate for data
    • Select the storage class as appropriate for logs
    • Select the storage class as appropriate for backups
  6. Click the Deploy button

This starts the creation of the Azure Arc-enabled PostgreSQL server on the data controller.

In a few minutes, your creation should successfully complete.

Storage class considerations

It is important you set the storage class right at the time you deploy a server as this cannot be changed after you deploy. If you were to change the storage class after deployment, you would need to extract the data, delete your server, create a new server, and import the data. You may specify the storage classes to use for the data, logs and the backups. By default, if you do not indicate storage classes, the storage classes of the data controller will be used.

  • to set the storage class for the data, indicate the parameter --storage-class-data followed by the name of the storage class.
  • to set the storage class for the logs, indicate the parameter --storage-class-logs followed by the name of the storage class.
  • setting the storage class for the backups has been temporarily removed as we temporarily removed the backup/restore functionalities as we finalize designs and experiences.