Skip to content

Commit d6d0227

Browse files
Merge pull request #277185 from KarlErickson/karler-flex
removed single-server pivots/tabs
2 parents 204e37b + 9849a1a commit d6d0227

6 files changed

+5
-275
lines changed

articles/app-service/tutorial-java-tomcat-connect-managed-identity-postgresql-database.md

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Tutorial: Access data with managed identity in Java'
33
description: Secure Azure Database for PostgreSQL connectivity with managed identity from a sample Java Tomcat app, and apply it to other Azure services.
44
ms.devlang: java
55
ms.topic: tutorial
6-
ms.date: 10/11/2023
6+
ms.date: 06/04/2024
77
author: KarlErickson
88
ms.author: karler
99
ms.custom: passwordless-java, service-connector, devx-track-azurecli, devx-track-extended-java, AppServiceConnectivity
@@ -59,8 +59,6 @@ Follow these steps to create an Azure Database for Postgres in your subscription
5959

6060
1. Create an Azure Database for PostgreSQL server. The server is created with an administrator account, but it isn't used because we're going to use the Microsoft Entra admin account to perform administrative tasks.
6161

62-
### [Flexible Server](#tab/flexible)
63-
6462
```azurecli-interactive
6563
export POSTGRESQL_ADMIN_USER=azureuser
6664
# PostgreSQL admin access rights won't be used because Azure AD authentication is leveraged to administer the database.
@@ -78,29 +76,8 @@ Follow these steps to create an Azure Database for Postgres in your subscription
7876
--sku-name Standard_D2s_v3
7977
```
8078

81-
### [Single Server](#tab/single)
82-
83-
```azurecli-interactive
84-
export POSTGRESQL_ADMIN_USER=azureuser
85-
# PostgreSQL admin access rights won't be used because Azure AD authentication is leveraged to administer the database.
86-
export POSTGRESQL_ADMIN_PASSWORD=<admin-password>
87-
export POSTGRESQL_HOST=<postgresql-host-name>
88-
89-
# Create a PostgreSQL server.
90-
az postgres server create \
91-
--resource-group $RESOURCE_GROUP \
92-
--name $POSTGRESQL_HOST \
93-
--location $LOCATION \
94-
--admin-user $POSTGRESQL_ADMIN_USER \
95-
--admin-password $POSTGRESQL_ADMIN_PASSWORD \
96-
--public-access 0.0.0.0 \
97-
--sku-name B_Gen5_1
98-
```
99-
10079
1. Create a database for the application.
10180

102-
### [Flexible Server](#tab/flexible)
103-
10481
```azurecli-interactive
10582
export DATABASE_NAME=checklist
10683
@@ -110,17 +87,6 @@ Follow these steps to create an Azure Database for Postgres in your subscription
11087
--database-name $DATABASE_NAME
11188
```
11289

113-
### [Single Server](#tab/single)
114-
115-
```azurecli-interactive
116-
export DATABASE_NAME=checklist
117-
118-
az postgres db create \
119-
--resource-group $RESOURCE_GROUP \
120-
--server-name $POSTGRESQL_HOST \
121-
--name $DATABASE_NAME
122-
```
123-
12490
## Deploy the application to App Service
12591

12692
Follow these steps to build a WAR file and deploy to Azure App Service on Tomcat using a WAR packaging.
@@ -174,8 +140,6 @@ az extension add --name serviceconnector-passwordless --upgrade
174140

175141
Then, connect your app to a Postgres database with a system-assigned managed identity using Service Connector.
176142

177-
### [Flexible Server](#tab/flexible)
178-
179143
To make this connection, run the [az webapp connection create](/cli/azure/webapp/connection/create#az-webapp-connection-create-postgres-flexible) command.
180144

181145
```azurecli-interactive
@@ -189,23 +153,6 @@ az webapp connection create postgres-flexible \
189153
--client-type java
190154
```
191155

192-
### [Single Server](#tab/single)
193-
194-
To make this connection, run the [az webapp connection create](/cli/azure/webapp/connection/create#az-webapp-connection-create-postgres) command.
195-
196-
```azurecli-interactive
197-
az webapp connection create postgres \
198-
--resource-group $RESOURCE_GROUP \
199-
--name $APPSERVICE_NAME \
200-
--target-resource-group $RESOURCE_GROUP \
201-
--server $POSTGRESQL_HOST \
202-
--database $DATABASE_NAME \
203-
--system-identity \
204-
--client-type java
205-
```
206-
207-
---
208-
209156
This command creates a connection between your web app and your PostgreSQL server, and manages authentication through a system-assigned managed identity.
210157

211158
Next, update App Settings and add plugin in connection string

articles/container-apps/tutorial-java-quarkus-connect-managed-identity-postgresql-database.md

Lines changed: 1 addition & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: KarlErickson
66
ms.topic: tutorial
77
ms.author: karler
88
ms.service: container-apps
9-
ms.date: 09/26/2022
9+
ms.date: 06/04/2024
1010
ms.custom: devx-track-azurecli, devx-track-extended-java, devx-track-java, devx-track-javaee, devx-track-javaee-quarkus, passwordless-java, service-connector, devx-track-javaee-quarkus-aca
1111
---
1212

@@ -84,8 +84,6 @@ cd quarkus-quickstarts/hibernate-orm-panache-quickstart
8484

8585
Delete the existing content in *application.properties* and replace with the following to configure the database for dev, test, and production modes:
8686

87-
### [Flexible Server](#tab/flexible)
88-
8987
```properties
9088
quarkus.package.type=uber-jar
9189

@@ -145,67 +143,6 @@ cd quarkus-quickstarts/hibernate-orm-panache-quickstart
145143
io.netty:netty-transport-native-unix-common::jar
146144
```
147145

148-
### [Single Server](#tab/single)
149-
150-
```properties
151-
quarkus.package.type=uber-jar
152-
153-
quarkus.hibernate-orm.database.generation=drop-and-create
154-
quarkus.datasource.db-kind=postgresql
155-
quarkus.datasource.jdbc.max-size=8
156-
quarkus.datasource.jdbc.min-size=2
157-
quarkus.hibernate-orm.log.sql=true
158-
quarkus.hibernate-orm.sql-load-script=import.sql
159-
quarkus.datasource.jdbc.acquisition-timeout = 10
160-
161-
%dev.quarkus.datasource.username=${AZURE_CLIENT_NAME}@${DBHOST}
162-
%dev.quarkus.datasource.jdbc.url=jdbc:postgresql://${DBHOST}.postgres.database.azure.com:5432/${DBNAME}?\
163-
authenticationPluginClassName=com.azure.identity.providers.postgresql.AzureIdentityPostgresqlAuthenticationPlugin\
164-
&sslmode=require\
165-
&azure.clientId=${AZURE_CLIENT_ID}\
166-
&azure.clientSecret=${AZURE_CLIENT_SECRET}\
167-
&azure.tenantId=${AZURE_TENANT_ID}
168-
169-
%prod.quarkus.datasource.username=${AZURE_MI_NAME}@${DBHOST}
170-
%prod.quarkus.datasource.jdbc.url=jdbc:postgresql://${DBHOST}.postgres.database.azure.com:5432/${DBNAME}?\
171-
authenticationPluginClassName=com.azure.identity.providers.postgresql.AzureIdentityPostgresqlAuthenticationPlugin\
172-
&sslmode=require
173-
174-
%dev.quarkus.class-loading.parent-first-artifacts=com.azure:azure-core::jar,\
175-
com.azure:azure-core-http-netty::jar,\
176-
io.projectreactor.netty:reactor-netty-core::jar,\
177-
io.projectreactor.netty:reactor-netty-http::jar,\
178-
io.netty:netty-resolver-dns::jar,\
179-
io.netty:netty-codec::jar,\
180-
io.netty:netty-codec-http::jar,\
181-
io.netty:netty-codec-http2::jar,\
182-
io.netty:netty-handler::jar,\
183-
io.netty:netty-resolver::jar,\
184-
io.netty:netty-common::jar,\
185-
io.netty:netty-transport::jar,\
186-
io.netty:netty-buffer::jar,\
187-
com.azure:azure-identity::jar,\
188-
com.azure:azure-identity-providers-core::jar,\
189-
com.azure:azure-identity-providers-jdbc-postgresql::jar,\
190-
com.fasterxml.jackson.core:jackson-core::jar,\
191-
com.fasterxml.jackson.core:jackson-annotations::jar,\
192-
com.fasterxml.jackson.core:jackson-databind::jar,\
193-
com.fasterxml.jackson.dataformat:jackson-dataformat-xml::jar,\
194-
com.fasterxml.jackson.datatype:jackson-datatype-jsr310::jar,\
195-
org.reactivestreams:reactive-streams::jar,\
196-
io.projectreactor:reactor-core::jar,\
197-
com.microsoft.azure:msal4j::jar,\
198-
com.microsoft.azure:msal4j-persistence-extension::jar,\
199-
org.codehaus.woodstox:stax2-api::jar,\
200-
com.fasterxml.woodstox:woodstox-core::jar,\
201-
com.nimbusds:oauth2-oidc-sdk::jar,\
202-
com.nimbusds:content-type::jar,\
203-
com.nimbusds:nimbus-jose-jwt::jar,\
204-
net.minidev:json-smart::jar,\
205-
net.minidev:accessors-smart::jar,\
206-
io.netty:netty-transport-native-unix-common::jar
207-
```
208-
209146
### Build and push a Docker image to the container registry
210147

211148
1. Build the container image.
@@ -274,8 +211,6 @@ Next, create a PostgreSQL Database and configure your container app to connect t
274211

275212
1. Create the database service.
276213

277-
### [Flexible Server](#tab/flexible)
278-
279214
```azurecli-interactive
280215
DB_SERVER_NAME='msdocs-quarkus-postgres-webapp-db'
281216
ADMIN_USERNAME='demoadmin'
@@ -290,24 +225,6 @@ Next, create a PostgreSQL Database and configure your container app to connect t
290225
--sku-name GP_Gen5_2
291226
```
292227

293-
### [Single Server](#tab/single)
294-
295-
```azurecli-interactive
296-
DB_SERVER_NAME='msdocs-quarkus-postgres-webapp-db'
297-
ADMIN_USERNAME='demoadmin'
298-
ADMIN_PASSWORD='<admin-password>'
299-
300-
az postgres server create \
301-
--resource-group $RESOURCE_GROUP \
302-
--name $DB_SERVER_NAME \
303-
--location $LOCATION \
304-
--admin-user $DB_USERNAME \
305-
--admin-password $DB_PASSWORD \
306-
--sku-name GP_Gen5_2
307-
```
308-
309-
---
310-
311228
The following parameters are used in the above Azure CLI command:
312229

313230
* *resource-group* &rarr; Use the same resource group name in which you created the web app, for example `msdocs-quarkus-postgres-webapp-rg`.
@@ -324,24 +241,13 @@ Next, create a PostgreSQL Database and configure your container app to connect t
324241

325242
1. Create a database named `fruits` within the PostgreSQL service with this command:
326243

327-
### [Flexible Server](#tab/flexible)
328-
329244
```azurecli-interactive
330245
az postgres flexible-server db create \
331246
--resource-group $RESOURCE_GROUP \
332247
--server-name $DB_SERVER_NAME \
333248
--database-name fruits
334249
```
335250

336-
### [Single Server](#tab/single)
337-
338-
```azurecli-interactive
339-
az postgres db create \
340-
--resource-group $RESOURCE_GROUP \
341-
--server-name $DB_SERVER_NAME \
342-
--name fruits
343-
```
344-
345251
1. Install the [Service Connector](../service-connector/overview.md) passwordless extension for the Azure CLI:
346252

347253
```azurecli-interactive
@@ -350,8 +256,6 @@ Next, create a PostgreSQL Database and configure your container app to connect t
350256

351257
1. Connect the database to the container app with a system-assigned managed identity, using the connection command.
352258

353-
### [Flexible Server](#tab/flexible)
354-
355259
```azurecli-interactive
356260
az containerapp connection create postgres-flexible \
357261
--resource-group $RESOURCE_GROUP \
@@ -362,18 +266,6 @@ Next, create a PostgreSQL Database and configure your container app to connect t
362266
--managed-identity
363267
```
364268

365-
### [Single Server](#tab/single)
366-
367-
```azurecli-interactive
368-
az containerapp connection create postgres \
369-
--resource-group $RESOURCE_GROUP \
370-
--name my-container-app \
371-
--target-resource-group $RESOURCE_GROUP \
372-
--server $DB_SERVER_NAME \
373-
--database fruits \
374-
--managed-identity
375-
```
376-
377269
## 6. Review your changes
378270

379271
You can find the application URL(FQDN) by using the following command:

articles/spring-apps/consumption-dedicated/quickstart-provision-standard-consumption-app-environment-with-virtual-network.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ Use the following steps to create an Azure Spring Apps instance in an Azure Cont
183183
1. At this point, you've created an Azure Container Apps environment with a default standard consumption workload profile. You can also add a dedicated workload profile to the same Azure Container Apps environment with the following command:
184184

185185
```azurecli
186-
az containerapp env workload-profile set \
186+
az containerapp env workload-profile add \
187187
--resource-group $RESOURCE_GROUP \
188188
--name $AZURE_CONTAINER_APPS_ENVIRONMENT
189189
--workload-profile-name my-wlp \

articles/spring-apps/consumption-dedicated/quickstart-provision-standard-consumption-service-instance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ You can create the Azure Container Apps environment in one of two ways:
143143
1. At this point, you've created an Azure Container Apps environment with a default standard consumption workload profile. You can also add a dedicated workload profile to the same Azure Container Apps environment by using the following command:
144144

145145
```azurecli
146-
az containerapp env workload-profile set \
146+
az containerapp env workload-profile add \
147147
--resource-group $RESOURCE_GROUP \
148148
--name $AZURE_CONTAINER_APPS_ENVIRONMENT \
149149
--workload-profile-name my-wlp \

0 commit comments

Comments
 (0)