Skip to content

Commit e0ac260

Browse files
authored
Merge pull request #261073 from v-thepet/terms1
PostgreSQL term pass - concepts articles
2 parents f7bff91 + 4f5fd3e commit e0ac260

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+533
-539
lines changed

articles/postgresql/flexible-server/azure-pipelines-deploy-database-task.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ ms.date: 11/30/2021
1414

1515
[!INCLUDE [applies-to-postgresql-flexible-server](../includes/applies-to-postgresql-flexible-server.md)]
1616

17-
You can automatically deploy your database updates to Azure Database for PostgreSQL Flexible Server after every successful build with **Azure Pipelines**. You can use Azure CLI task to update the database either with a SQL file or an inline SQL script against the database. This task can be run on cross-platform agents running on Linux, macOS, or Windows operating systems.
17+
You can automatically deploy your database updates to Azure Database for PostgreSQL flexible server after every successful build with **Azure Pipelines**. You can use Azure CLI task to update the database either with a SQL file or an inline SQL script against the database. This task can be run on cross-platform agents running on Linux, macOS, or Windows operating systems.
1818

1919
## Prerequisites
2020

2121
- An Azure account. If you don't have one, [get a free trial](https://azure.microsoft.com/free/).
2222
- [Azure Resource Manager service connection](/azure/devops/pipelines/library/connect-to-azure) to your Azure account
23-
- Microsoft hosted agents have Azure CLI pre-installed. However if you are using private agents, [install Azure CLI](/cli/azure/install-azure-cli) on the computer(s) that run the build and release agent. If an agent is already running on the machine on which the Azure CLI is installed, restart the agent to ensure all the relevant stage variables are updated.
24-
- Create an Azure Database for PostgreSQL Flexible Server using [Azure portal](./quickstart-create-server-portal.md) or [Azure CLI](./quickstart-create-server-cli.md)
23+
- Microsoft hosted agents have Azure CLI preinstalled. However if you are using private agents, [install Azure CLI](/cli/azure/install-azure-cli) on the computer(s) that run the build and release agent. If an agent is already running on the machine on which the Azure CLI is installed, restart the agent to ensure all the relevant stage variables are updated.
24+
- Create an Azure Database for PostgreSQL flexible server instance using the [Azure portal](./quickstart-create-server-portal.md) or [Azure CLI](./quickstart-create-server-cli.md)
2525

2626

2727
## Use SQL file
2828

29-
The following example illustrates how to pass database arguments and run ```execute``` command
29+
The following example illustrates how to pass database arguments and run `execute` command
3030

3131
```yaml
3232
- task: AzureCLI@2
@@ -48,7 +48,7 @@ The following example illustrates how to pass database arguments and run ```exec
4848
4949
## Use inline SQL script
5050
51-
The following example illustrates how to run an inline SQL script using ```execute``` command.
51+
The following example illustrates how to run an inline SQL script using `execute` command.
5252

5353
```yaml
5454
- task: AzureCLI@2
@@ -76,11 +76,11 @@ You can see the full list of all the task inputs when using Azure CLI task with
7676
| Parameter | Description |
7777
| :------------------- | :-------------------|
7878
| azureSubscription| (Required) Provide the Azure Resource Manager subscription for the deployment. This parameter is shown only when the selected task version is 0.* as Azure CLI task v1.0 supports only Azure Resource Manager subscriptions. |
79-
|scriptType| (Required) Provide the type of script. Supported scripts are PowerShell, PowerShell Core, Bat, Shell, and script. When running on a **Linux agent**, select one of the following: ```bash``` or ```pscore``` . When running **Windows agent**, select one of the following: ```batch```,```ps``` and ```pscore```. |
80-
|scriptLocation| (Required) Provide the path to script, for example real file path or use ```Inline script``` when providing the scripts inline. The default value is ```scriptPath```. |
79+
|scriptType| (Required) Provide the type of script. Supported scripts are PowerShell, PowerShell Core, Bat, Shell, and script. When running on a **Linux agent**, select one of the following: `bash` or `pscore` . When running **Windows agent**, select one of the following: `batch`,`ps` and `pscore`. |
80+
|scriptLocation| (Required) Provide the path to script, for example real file path or use `Inline script` when providing the scripts inline. The default value is `scriptPath`. |
8181
|scriptPath| (Required) Fully qualified path of the script(.ps1 or .bat or .cmd when using Windows-based agent else <code>.ps1 </code> or <code>.sh </code> when using linux-based agent) or a path relative to the default working directory. |
82-
|inlineScript|(Required) You can write your scripts inline here. When using Windows agent, use PowerShell or PowerShell Core or batch scripting whereas use PowerShell Core or shell scripting when using Linux-based agents. For batch files use the prefix \"call\" before every Azure command. You can also pass predefined and custom variables to this script using arguments. <br/>Example for PowerShell/PowerShellCore/shell:``` az --version az account show``` <br/>Example for batch: ``` call az --version call az account show```. |
83-
| arguments| (Optional) Provide all the arguments passed to the script. For examples ```-SERVERNAME mydemoserver```. |
82+
|inlineScript|(Required) You can write your scripts inline here. When using Windows agent, use PowerShell or PowerShell Core or batch scripting whereas use PowerShell Core or shell scripting when using Linux-based agents. For batch files use the prefix \"call\" before every Azure command. You can also pass predefined and custom variables to this script using arguments. <br/>Example for PowerShell/PowerShellCore/shell:` az --version az account show` <br/>Example for batch: ` call az --version call az account show`. |
83+
| arguments| (Optional) Provide all the arguments passed to the script. For examples `-SERVERNAME mydemoserver`. |
8484
|powerShellErrorActionPreference| (Optional) Prepends the line <b>$ErrorActionPreference = 'VALUE'</b> at the top of your PowerShell/PowerShell Core script. The default value is stop. Supported values are stop, continue, and silentlyContinue. |
8585
|addSpnToEnvironment|(Optional) Adds service principal ID and key of the Azure endpoint you chose to the script's execution environment. You can use these variables: <b>$env:servicePrincipalId, $env:servicePrincipalKey and $env:tenantId</b> in your script. This is honored only when the Azure endpoint has Service Principal authentication scheme. The default value is false.|
8686
|useGlobalConfig|(Optional) If this is false, this task will use its own separate <a href= "/cli/azure/azure-cli-configuration#cli-configuration-file">Azure CLI configuration directory</a>. This can be used to run Azure CLI tasks in <b>parallel</b> releases" <br/>Default value: false</td>
@@ -91,7 +91,7 @@ You can see the full list of all the task inputs when using Azure CLI task with
9191
Having issues with CLI Task, see [how to troubleshoot Build and Release](/azure/devops/pipelines/troubleshooting/troubleshooting).
9292

9393
## Next steps
94-
Here are some related tasks that can be used to deploy with Azure Piplelines.
94+
Here are some related tasks that can be used to deploy with Azure Pipelines.
9595

9696
- [Azure Resource Group Deployment](/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment)
9797
- [Azure Web App Deployment](/azure/devops/pipelines/tasks/deploy/azure-rm-web-app-deployment)

articles/postgresql/flexible-server/concepts-audit.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,29 @@ ms.date: 11/30/2021
1414

1515
[!INCLUDE [applies-to-postgresql-flexible-server](../includes/applies-to-postgresql-flexible-server.md)]
1616

17-
Audit logging of database activities in Azure Database for PostgreSQL - Flexible Server is available through the PostgreSQL Audit extension: [pgAudit](https://www.pgaudit.org/). pgAudit provides detailed session and/or object audit logging.
17+
Audit logging of database activities in Azure Database for PostgreSQL flexible server is available through the PostgreSQL Audit extension: [pgAudit](https://www.pgaudit.org/). pgAudit provides detailed session and/or object audit logging.
1818

1919
If you want Azure resource-level logs for operations like compute and storage scaling, see the [Azure Activity Log](../../azure-monitor/essentials/platform-logs-overview.md).
2020

2121
## Usage considerations
22-
By default, pgAudit log statements are emitted along with your regular log statements by using Postgres's standard logging facility. In Azure Database for PostgreSQL - Flexible Server, you can configure all logs to be sent to Azure Monitor Log store for later analytics in Log Analytics. If you enable Azure Monitor resource logging, your logs will be automatically sent (in JSON format) to Azure Storage, Event Hubs, and/or Azure Monitor logs, depending on your choice.
22+
By default, pgAudit log statements are emitted along with your regular log statements by using Postgres's standard logging facility. In Azure Database for PostgreSQL flexible server, you can configure all logs to be sent to Azure Monitor Log store for later analytics in Log Analytics. If you enable Azure Monitor resource logging, your logs will be automatically sent (in JSON format) to Azure Storage, Event Hubs, and/or Azure Monitor logs, depending on your choice.
2323

2424
To learn how to set up logging to Azure Storage, Event Hubs, or Azure Monitor logs, visit the resource logs section of the [server logs article](concepts-logging.md).
2525

2626
## Installing pgAudit
27-
Before you can install pgAudit extension in Azure Database for PostgreSQL - Flexible Server, you will need to allow-list pgAudit extension for use.
27+
Before you can install pgAudit extension in Azure Database for PostgreSQL flexible server, you need to allow-list pgAudit extension for use.
2828

2929
Using the [Azure portal](https://portal.azure.com):
3030

31-
1. Select your Azure Database for PostgreSQL - Flexible Server.
31+
1. Select your Azure Database for PostgreSQL flexible server instance.
3232
2. On the sidebar, select **Server Parameters**.
3333
3. Search for the `azure.extensions` parameter.
3434
4. Select pgAudit as extension you wish to allow-list.
35-
:::image type="content" source="./media/concepts-extensions/allow-list.png" alt-text=" Screenshot showing Azure Database for PostgreSQL - allow-listing extensions for installation ":::
35+
:::image type="content" source="./media/concepts-extensions/allow-list.png" alt-text="Screenshot showing Azure Database for PostgreSQL - allow-listing extensions for installation.":::
3636

3737
Using [Azure CLI](/cli/azure/):
3838

39-
You can allow-list extensions via CLI parameter set [command](/cli/azure/postgres/flexible-server/parameter?view=azure-cli-latest&preserve-view=true).
39+
You can allow-list extensions via CLI parameter set [command](/cli/azure/postgres/flexible-server/parameter).
4040

4141
```bash
4242
az postgres flexible-server parameter set --resource-group <your resource group> --server-name <your server name> --subscription <your subscription id> --name azure.extensions --value pgAudit
@@ -47,18 +47,18 @@ To install pgAudit, you need to include it in the server's shared preload librar
4747

4848
Using the [Azure portal](https://portal.azure.com):
4949

50-
1. Select your Azure Database for PostgreSQL - Flexible Server.
50+
1. Select your Azure Database for PostgreSQL flexible server instance.
5151
2. On the sidebar, select **Server Parameters**.
5252
3. Search for the `shared_preload_libraries` parameter.
5353
4. Select **pgaudit**.
54-
:::image type="content" source="./media/concepts-audit/shared-preload-libraries.png" alt-text=" Screenshot showing Azure Database for PostgreSQL - enabling shared_preload_libraries for pgaudit ":::
54+
:::image type="content" source="./media/concepts-audit/shared-preload-libraries.png" alt-text="Screenshot showing Azure Database for PostgreSQL flexible server enabling shared_preload_libraries for pgaudit.":::
5555
5. You can check that **pgaudit** is loaded in shared_preload_libraries by executing following query in psql:
5656
```SQL
5757
show shared_preload_libraries;
5858
```
59-
You should see **pgaudit** in the query result that will return shared_preload_libraries
59+
You should see **pgaudit** in the query result that will return shared_preload_libraries.
6060

61-
6. Connect to your server using a client (like psql) and enable the pgAudit extension
61+
6. Connect to your server using a client (like psql) and enable the pgAudit extension.
6262
```SQL
6363
CREATE EXTENSION pgaudit;
6464
```
@@ -92,7 +92,7 @@ The [pgAudit documentation](https://github.com/pgaudit/pgaudit/blob/master/READM
9292
> `pgaudit.log_level` is only enabled when `pgaudit.log_client` is on.
9393

9494
> [!NOTE]
95-
> In Azure Database for PostgreSQL - Flexible Server, `pgaudit.log` cannot be set using a `-` (minus) sign shortcut as described in the pgAudit documentation. All required statement classes (READ, WRITE, etc.) should be individually specified.
95+
> In Azure Database for PostgreSQL flexible server `pgaudit.log` can't be set using a `-` (minus) sign shortcut as described in the pgAudit documentation. All required statement classes (READ, WRITE, etc.) should be individually specified.
9696
> [!NOTE]
9797
>If you set the log_statement parameter to DDL or ALL, and run a `CREATE ROLE/USER ... WITH PASSWORD ... ; ` or `ALTER ROLE/USER ... WITH PASSWORD ... ;`, command, then PostgreSQL creates an entry in the PostgreSQL logs, where password is logged in clear text, which may cause a potential security risk. This is expected behavior as per PostgreSQL engine design. You can, however, use PGAudit extension and set `pgaudit.log='DDL'` parameter in server parameters page, which doesn't record any `CREATE/ALTER ROLE` statement in Postgres Log, unlike Postgres `log_statement='DDL'` setting. If you do need to log these statements you can add `pgaudit.log ='ROLE'` in addition, which, while logging `'CREATE/ALTER ROLE'` will redact the password from logs.
9898

@@ -122,5 +122,5 @@ AzureDiagnostics
122122

123123

124124
## Next steps
125-
- [Learn about logging in Azure Database for PostgreSQL - Flexible Server](concepts-logging.md)
126-
- [Learn how to setup logging in Azure Database for PostgreSQL - Flexible Server and how to access logs](howto-configure-and-access-logs.md)
125+
- [Learn about logging in Azure Database for PostgreSQL flexible server](concepts-logging.md)
126+
- [Learn how to setup logging in Azure Database for PostgreSQL flexible server and how to access logs](howto-configure-and-access-logs.md)

0 commit comments

Comments
 (0)