Skip to content

Commit 3eafa44

Browse files
Merge pull request #227006 from hasani-h/release-arc-data-feb2023-postgres
Release arc data feb2023 postgres
2 parents b34d4b6 + f7b715b commit 3eafa44

7 files changed

+219
-72
lines changed

articles/azure-arc/data/backup-restore-postgresql.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,35 @@ ms.topic: how-to
1313

1414
# Back up and restore Azure Arc-enabled PostgreSQL servers
1515

16-
Automated backups can be enabled by including the `--storage-class-backups` argument when creating an Azure Arc-enabled PostgreSQL server. Restore is not supported in the current preview release.
16+
Automated backups can be enabled by including the `--storage-class-backups` argument when creating an Azure Arc-enabled PostgreSQL server. Specify the retention period for backups with the `--retention-days` parameter, when creating or updating an Arc-enabled PostgreSQL server. The retention period can be between 0 and 35 days. If backups are enabled but no retention period is specified, the default is seven days.
17+
18+
Restoring an Azure Arc-enable PostgreSQL server creates a new server by copying the configuration of the existing server (for example resource requests/limits, extensions etc.). Configurations that could cause conflicts (for example primary endpoint port) aren't copied. The storage configuration for the new resource can be defined by passing `--storage-class*` and `--volume-size-*` parameters to the `restore` command.
19+
20+
Restore an Azure Arc-enabled PostgreSQL server to a new server with the `restore` command:
21+
```azurecli
22+
az postgres server-arc restore -n <destination-server-name> --source-server <source-server-name> --k8s-namespace <namespace> --use-k8s
23+
```
24+
25+
## Examples:
26+
27+
Create a new Arc-enabled PostgreSQL server `pg02` by restoring `pg01` using the latest backups:
28+
```azurecli
29+
az postgres server-arc restore -n pg02 --source-server pg01 --k8s-namespace arc --use-k8s
30+
```
31+
32+
Create a new Arc-enabled PostgreSQL server `pg02` by restoring `pg01` using the latest backups, defining new storage requirements for pg02:
33+
```azurecli
34+
az postgres server-arc restore -n pg02 --source-server pg01 --k8s-namespace arc --storage-class-data azurefile-csi-premium --volume-size-data 10Gi --storage-class-logs azurefile-csi-premium --volume-size-logs 2Gi--use-k8s --storage-class-backups azurefile-csi-premium --volume-size-backups 15Gi
35+
```
36+
37+
Create a new Arc-enabled PostgreSQL server `pg02` by restoring `pg01` to its state at `2023-02-01T00:00:00Z`:
38+
```azurecli
39+
az postgres server-arc restore -n pg02 --source-server pg01 --k8s-namespace arc -t 2023-02-01T00:00:00Z --use-k8s
40+
```
41+
42+
For details about all the parameters available for restore review the output of the command:
43+
```azurecli
44+
az postgres server-arc restore --help
45+
```
1746

1847
- Read about [scaling up or down (increasing/decreasing memory/vcores)](scale-up-down-postgresql-server-using-cli.md) your server.
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
title: Deploy Active Directory integrated Azure Arc-enabled PostgreSQL server using Azure CLI
3+
description: Explains how to deploy Active Directory integrated Azure Arc-enabled PostgreSQL server using Azure CLI
4+
services: azure-arc
5+
ms.service: azure-arc
6+
ms.subservice: azure-arc-data-postgresql
7+
author: hasani-h
8+
ms.author: hasaniholder
9+
ms.reviewer: mikeray
10+
ms.date: 02/10/2023
11+
ms.topic: how-to
12+
---
13+
14+
# Deploy Active Directory integrated Azure Arc-enabled PostgreSQL using Azure CLI
15+
16+
This article explains how to deploy Azure Arc-enabled PostgreSQL server with Active Directory (AD) authentication using Azure CLI.
17+
18+
See these articles for specific instructions:
19+
20+
- [Tutorial – Deploy AD connector in customer-managed keytab mode](deploy-customer-managed-keytab-active-directory-connector.md)
21+
22+
### Prerequisites
23+
24+
Before you proceed, install the following tools:
25+
26+
- The [Azure CLI (az)](/cli/azure/install-azure-cli)
27+
- The [`arcdata` extension for Azure CLI](install-arcdata-extension.md)
28+
29+
To know more further details about how to set up OU and AD account, go to [Deploy Azure Arc-enabled data services in Active Directory authentication - prerequisites](active-directory-prerequisites.md)
30+
31+
32+
## Deploy and update Active Directory integrated Azure Arc-enabled PostgreSQL server
33+
34+
### Customer-managed keytab mode
35+
36+
#### Create an Azure Arc-enabled PostgreSQL server
37+
38+
To view available options for the create command for Azure Arc-enabled PostgreSQL server, use the following command:
39+
40+
```azurecli
41+
az postgres server-arc create --help
42+
```
43+
44+
To create a SQL Managed Instance, use `az postgres server-arc create`. See the following example:
45+
46+
```azurecli
47+
az postgres server-arc create
48+
--name < PostgreSQL server name >
49+
--k8s-namespace < namespace >
50+
--ad-connector-name < your AD connector name >
51+
--keytab-secret < PostgreSQL server keytab secret name >
52+
--ad-account-name < PostgreSQL server AD user account >
53+
--dns-name < PostgreSQL server primary endpoint DNS name >
54+
--port < PostgreSQL server primary endpoint port number >
55+
--use-k8s
56+
```
57+
58+
Example:
59+
60+
```azurecli
61+
az postgres server-arc create
62+
--name contosopg
63+
--k8s-namespace arc
64+
--ad-connector-name adarc
65+
--keytab-secret arcuser-keytab-secret
66+
--ad-account-name arcuser
67+
--dns-name arcpg.contoso.local
68+
--port 31432
69+
--use-k8s
70+
```
71+
72+
#### Update an Azure Arc-enabled PostgreSQL server
73+
74+
To update an Arc-enabled PostgreSQL server, use `az postgres server-arc update`. See the following example:
75+
76+
```azurecli
77+
az postgres server-arc update
78+
--name < PostgreSQL server name >
79+
--k8s-namespace < namespace >
80+
--keytab-secret < PostgreSQL server keytab secret name >
81+
--use-k8s
82+
```
83+
84+
Example:
85+
86+
```azurecli
87+
az postgres server-arc update
88+
--name contosopg
89+
--k8s-namespace arc
90+
--keytab-secret arcuser-keytab-secret
91+
--use-k8s
92+
```
93+
94+
## Next steps
95+
- **Try it out.** Get started quickly with [Azure Arc Jumpstart](https://github.com/microsoft/azure_arc#azure-arc-enabled-data-services) on Azure Kubernetes Service (AKS), AWS Elastic Kubernetes Service (EKS), Google Cloud Kubernetes Engine (GKE) or in an Azure VM.
96+

articles/azure-arc/data/limitations-postgresql.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ This article describes limitations of Azure Arc-enabled PostgreSQL.
1717

1818
[!INCLUDE [azure-arc-data-preview](../../../includes/azure-arc-data-preview.md)]
1919

20-
## Backup and restore
21-
22-
Enable automated backups. Include the `--storage-class-backups` argument when you create an Azure Arc-enabled PostgreSQL server. Restore has been temporarily removed as we finalize designs and experiences.
23-
2420
## High availability
2521

2622
Configuring high availability to recover from infrastructure failures isn't yet available.

articles/azure-arc/data/supported-versions-postgresql.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,25 @@ ms.topic: how-to
1212
---
1313

1414
# Supported versions of PostgreSQL with Azure Arc-enabled PostgreSQL server
15-
The list of supported versions evolves over time as we progress on ensuring parity with Postgres managed services in Azure PaaS. Today, the major versions that is supported is PostgreSQL 14.
15+
The list of supported versions evolves over time as we progress on ensuring parity with PostgreSQL managed services in Azure PaaS. Today, the major version that is supported is PostgreSQL 14.
1616

1717
[!INCLUDE [azure-arc-data-preview](../../../includes/azure-arc-data-preview.md)]
1818

1919
## How to choose between versions?
20-
It is recommend you look at what versions your applications have been designed for and what are the capabilities of each of the versions.
20+
It's recommended you look at what versions your applications have been designed for and what are the capabilities of each of the versions.
2121
To learn more, read about each version on the official PostgreSQL site:
2222
- [PostgreSQL 14 (default)](https://www.postgresql.org/docs/14/index.html)
2323

2424
## How to create a particular version in Azure Arc-enabled PostgreSQL server?
25-
At creation time, you have the possibility to indicate what version to create by passing the _--engine-version_ parameter.
26-
If you do not indicate a version information, by default, a server group of PostgreSQL version 14 will be created.
25+
Currently only PostgreSQL version 14 is supported.
2726

28-
Note that there is only one PostgreSQL Custom Resource Definition (CRD) in your Kubernetes cluster no matter what versions we support.
27+
There's only one PostgreSQL Custom Resource Definition (CRD) in your Kubernetes cluster no matter what versions we support.
2928
For example, run the following command:
3029
```console
3130
kubectl get crds
3231
```
3332

34-
It will return an output like:
33+
It returns an output like:
3534
```console
3635
NAME CREATED AT
3736
dags.sql.arcdata.microsoft.com 2021-10-12T23:53:40Z
@@ -44,10 +43,10 @@ sqlmanagedinstancerestoretasks.tasks.sql.arcdata.microsoft.com 2021-10-12T23:5
4443
sqlmanagedinstances.sql.arcdata.microsoft.com 2021-10-12T23:53:37Z
4544
```
4645

47-
In this example, this output indicates there are one CRD related to PostgreSQL: postgresqls.arcdata.microsoft.com, shortname postgresqls. The CRD is not a PostgreSQL server. The presence of a CRD is not an indication that you have - or not - created a server. The CRD is an indication of what kind of resources can be created in the Kubernetes cluster.
46+
In this example, this output indicates there is one CRD related to PostgreSQL: `postgresqls.arcdata.microsoft.com`, shortname `postgresqls`. The CRD isn't a PostgreSQL server. The presence of a CRD isn't an indication that you have - or not - created a server. The CRD is an indication of what kind of resources can be created in the Kubernetes cluster.
4847

4948
## How can I be notified when other versions are available?
50-
Come back and read this article. It will be updated as appropriate.
49+
Come back and read this article. It's updated as appropriate.
5150

5251

5352
## Next steps:

articles/azure-arc/data/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ items:
252252
items:
253253
- name: Manage
254254
items:
255+
- name: Active Directory
256+
items:
257+
- name: Deploy PostgresSQL server - CLI
258+
href: deploy-active-directory-postgresql-server-cli.md
255259
- name: Back up and restore
256260
href: backup-restore-postgresql.md
257261
- name: Change PostgreSQL port

articles/azure-arc/data/using-extensions-in-postgresql-server.md

Lines changed: 78 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -20,72 +20,95 @@ PostgreSQL is at its best when you use it with extensions.
2020

2121
## Supported extensions
2222
For this preview, the following standard [`contrib`](https://www.postgresql.org/docs/14/contrib.html) extensions are already deployed in the containers of your Azure Arc-enabled PostgreSQL server:
23-
- adminpack
24-
- amcheck
25-
- autoinc
26-
- bloombtree_gin
27-
- btree_gist
28-
- citext
29-
- cube
30-
- dblink
31-
- dict_int
32-
- dict_xsyn
33-
- earthdistance
34-
- file_fdw
35-
- fuzzystrmatch
36-
- hstore
37-
- insert_username
38-
- intagg
39-
- intarray
40-
- isn
41-
- lo
42-
- ltree
43-
- moddatetime
44-
- old_snapshot
45-
- pageinspect
46-
- pg_buffercache
47-
- pg_freespacemap
48-
- pg_prewarm
49-
- pg_stat_statements
50-
- pg_surgery
51-
- pg_trgm
52-
- pg_visibility
53-
- pgcrypto
54-
- pgrowlocks
55-
- pgstattuple
56-
- postgres_fdw
57-
- refint
58-
- seg
59-
- sslinfo
60-
- tablefunc
61-
- tcn
62-
- tsm_system_rows
63-
- tsm_system_time
64-
- unaccent
65-
- xml2
23+
- `address_standardizer_data_us` 3.3.1
24+
- `adminpack` 2.1
25+
- `amcheck` 1.3
26+
- `autoinc` 1
27+
- `bloom` 1
28+
- `btree_gin` 1.3
29+
- `btree_gist` 1.6
30+
- `citext` 1.6
31+
- `cube` 1.5
32+
- `dblink` 1.2
33+
- `dict_int` 1
34+
- `dict_xsyn` 1
35+
- `earthdistance` 1.1
36+
- `file_fdw` 1
37+
- `fuzzystrmatch` 1.1
38+
- `hstore` 1.8
39+
- `hypopg` 1.3.1
40+
- `insert_username` 1
41+
- `intagg` 1.1
42+
- `intarray` 1.5
43+
- `isn` 1.2
44+
- `lo` 1.1
45+
- `ltree` 1.2
46+
- `moddatetime` 1
47+
- `old_snapshot` 1
48+
- `orafce` 4
49+
- `pageinspect` 1.9
50+
- `pg_buffercache` 1.3
51+
- `pg_cron` 1.4-1
52+
- `pg_freespacemap` 1.2
53+
- `pg_partman` 4.7.1
54+
- `pg_prewarm` 1.2
55+
- `pg_repack` 1.4.8
56+
- `pg_stat_statements` 1.9
57+
- `pg_surgery` 1
58+
- `pg_trgm` 1.6
59+
- `pg_visibility` 1.2
60+
- `pgaudit` 1.7
61+
- `pgcrypto` 1.3
62+
- `pglogical` 2.4.2
63+
- `pglogical_origin` 1.0.0
64+
- `pgrouting` 3.4.1
65+
- `pgrowlocks` 1.2
66+
- `pgstattuple` 1.5
67+
- `plpgsql` 1
68+
- `postgis` 3.3.1
69+
- `postgis_raster` 3.3.1
70+
- `postgis_tiger_geocoder` 3.3.1
71+
- `postgis_topology` 3.3.1
72+
- `postgres_fdw` 1.1
73+
- `refint` 1
74+
- `seg` 1.4
75+
- `sslinfo` 1.2
76+
- `tablefunc` 1
77+
- `tcn` 1
78+
- `timescaledb` 2.8.1
79+
- `tsm_system_rows` 1
80+
- `tsm_system_time` 1
81+
- `unaccent` 1.1
6682

6783
Updates to this list will be posted as it evolves over time.
6884

69-
> [!IMPORTANT]
70-
> While you may bring to your server an extension other than those listed above, in this Preview, it will not be persisted to your system. It means that it will not be available after a restart of the system and you would need to bring it again.
85+
## Create an Arc-enabled PostgreSQL server with extensions enabled
86+
You can create an Arc-enabled PostgreSQL server with any of the supported extensions enabled by passing a comma separated list of extensions to the `--extensions` parameter of the `create` command. *NOTE:* Extensions are enabled on the database for the admin user that was supplied when the server was created:
87+
```azurecli
88+
az postgres server-arc create -n <name> --k8s-namespace <namespace> --extensions "pgaudit,pg_partman" --use-k8s
89+
```
7190

91+
## Add or remove extensions
92+
You can add or remove extensions from an existing Arc-enabled PostgreSQL server.
7293

73-
## Create extensions
74-
Connect to your server with the client tool of your choice and run the standard PostgreSQL query:
94+
First describe the server to get the current list of extensions:
7595
```console
76-
CREATE EXTENSION <extension name>;
96+
kubectl describe postgresqls <server-name> -n <namespace>
7797
```
78-
79-
## Show the list of extensions created
80-
Connect to your server with the client tool of your choice and run the standard PostgreSQL query:
81-
```console
82-
select * from pg_extension;
98+
If there are extensions enabled the output contains a section like this:
99+
```yml
100+
config:
101+
postgreSqlExtensions: pgaudit,pg_partman
102+
```
103+
Add new extensions by appending them to the existing list, or remove extensions by removing them from the existing list. Pass the desired list to the update command. For example, to add `pgcrypto` and remove `pg_partman` from the server in the example above:
104+
```azurecli
105+
az postgres server-arc update -n <name> --k8s-namespace <namespace> --extensions "pgaudit,pgrypto" --use-k8s
83106
```
84107

85-
## Drop an extension
108+
## Show the list of enabled extensions
86109
Connect to your server with the client tool of your choice and run the standard PostgreSQL query:
87110
```console
88-
drop extension <extension name>;
111+
select * from pg_extension;
89112
```
90113

91114
## Next steps

articles/azure-arc/data/what-is-azure-arc-enabled-postgresql.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ ms.topic: how-to
1919

2020
**Azure Arc-enabled PostgreSQL server** is one of the database engines available as part of Azure Arc-enabled data services.
2121

22-
## Compare Postgres solutions provided by Microsoft in Azure
22+
## Compare PostgreSQL solutions provided by Microsoft in Azure
2323

24-
Microsoft offers Postgres database services in Azure in two ways:
24+
Microsoft offers PostgreSQL database services in Azure in two ways:
2525
- As a managed service in **[Azure PaaS](https://portal.azure.com/#create/Microsoft.PostgreSQLServer)** (Platform As A Service)
2626
- As a semi-managed service with Azure Arc as it is operated by customers or their partners/vendors
2727

2828
### Features
2929

30-
- Manage Postgres simply
30+
- Manage PostgreSQL simply
3131
- Simplify monitoring, back up, patching/upgrade, access control & more
32-
- Deploy Postgres on any [Kubernetes](https://kubernetes.io/) infrastructure
32+
- Deploy PostgreSQL on any [Kubernetes](https://kubernetes.io/) infrastructure
3333
- On-premises
3434
- Cloud providers like AWS, GCP, and Azure
3535
- Edge deployments (including lightweight Kubernetes [K3S](https://k3s.io/))

0 commit comments

Comments
 (0)