You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- This article requires at least version 2.61.0 of Azure CLI.
@@ -156,17 +156,17 @@ The steps in this section show you how to create the following Azure resources t
156
156
- Azure Container Registry (ACR)
157
157
- Azure Kubernetes Service (AKS)
158
158
159
-
Some of these resources must have unique names within the scope of the Azure subscription. To ensure this uniqueness, you can use the *initials, sequence, date, suffix* pattern. To apply this pattern, name your resources by listing your initials, some sequence number, today's date, and some kind of resource specific suffix - for example, `rg` for "resource group". The following environment variables use this pattern. Replace the placeholder values in `UNIQUE_VALUE`, `LOCATION` and `DB_PASSWORD` with your own values and run the commands in your terminal:
159
+
Some of these resources must have unique names within the scope of the Azure subscription. To ensure this uniqueness, you can use the *initials, sequence, date, suffix* pattern. To apply this pattern, name your resources by listing your initials, some sequence number, today's date, and some kind of resource specific suffix - for example, `rg` for "resource group". The following environment variables use this pattern. Replace the placeholder values `UNIQUE_VALUE`, `LOCATION`, and `DB_PASSWORD` with your own values and then run the following commands in your terminal:
160
160
161
161
```bash
162
162
export UNIQUE_VALUE=<your unique value, such as ejb010717>
163
163
export RESOURCE_GROUP_NAME=${UNIQUE_VALUE}rg
164
-
export LOCATION=<your desired Azure region for deploying your resources. For example, northeurope>
164
+
export LOCATION=<your desired Azure region for deploying your resources - for example, northeurope>
165
165
export REGISTRY_NAME=${UNIQUE_VALUE}reg
166
166
export DB_SERVER_NAME=${UNIQUE_VALUE}db
167
167
export DB_NAME=demodb
168
168
export DB_ADMIN=demouser
169
-
export DB_PASSWORD='<your desired password for the database server. For example, Secret123456>'
169
+
export DB_PASSWORD='<your desired password for the database server - for example, Secret123456>'
Azure Database for PostgreSQL Flexible Server is a fully managed database service designed to provide more granular control and flexibility over database management functions and configuration settings. This section shows you how to create an Azure Database for PostgreSQL Flexible Server instance using the Azure CLI. For more information, see [Quickstart: Create an Azure Database for PostgreSQL - Flexible Server instance using Azure CLI](/azure/postgresql/flexible-server/quickstart-create-server-cli).
177
177
178
-
First, create a resource group to contain the database server and other resources:
178
+
First, create a resource group to contain the database server and other resources by using the following command:
179
179
180
-
```azurecli-interactive
180
+
```azurecli
181
181
az group create \
182
182
--name $RESOURCE_GROUP_NAME \
183
183
--location $LOCATION
184
184
```
185
185
186
-
Next, create an Azure Database for PostgreSQL flexible server instance with the `az postgres flexible-server create`command.
186
+
Next, create an Azure Database for PostgreSQL flexible server instance by using the following command:
187
187
188
-
```azurecli-interactive
188
+
```azurecli
189
189
az postgres flexible-server create \
190
190
--name $DB_SERVER_NAME \
191
191
--resource-group $RESOURCE_GROUP_NAME \
@@ -220,7 +220,7 @@ Because Quarkus is a cloud native technology, it has built-in support for creati
220
220
221
221
Use the [az acr create](/cli/azure/acr#az-acr-create) command to create the ACR instance. The following example creates an ACR instance named with the value of your environment variable `${REGISTRY_NAME}`:
222
222
223
-
```azurecli-interactive
223
+
```azurecli
224
224
az acr create \
225
225
--resource-group $RESOURCE_GROUP_NAME \
226
226
--location ${LOCATION} \
@@ -241,7 +241,7 @@ After a short time, you should see JSON output that contains the following lines
241
241
242
242
Sign in to the ACR instance. Signing in lets you push an image. Use the following commands to verify the connection:
243
243
244
-
```azurecli-interactive
244
+
```azurecli
245
245
export LOGIN_SERVER=$(az acr show \
246
246
--name $REGISTRY_NAME \
247
247
--query 'loginServer' \
@@ -268,7 +268,7 @@ If you've signed into the ACR instance successfully, you should see `Login Succe
268
268
269
269
Use the [az aks create](/cli/azure/aks#az-aks-create) command to create an AKS cluster. The following example creates a cluster named with the value of your environment variable `${CLUSTER_NAME}` with one node. The cluster is connected to the ACR instance you created in a preceding step. This command takes several minutes to complete.
270
270
271
-
```azurecli-interactive
271
+
```azurecli
272
272
az aks create \
273
273
--resource-group $RESOURCE_GROUP_NAME \
274
274
--location ${LOCATION} \
@@ -291,15 +291,15 @@ After a few minutes, the command completes and returns JSON-formatted informatio
291
291
292
292
To manage a Kubernetes cluster, you use `kubectl`, the Kubernetes command-line client. To install `kubectl` locally, use the [az aks install-cli](/cli/azure/aks#az-aks-install-cli) command, as shown in the following example:
293
293
294
-
```azurecli-interactive
294
+
```azurecli
295
295
az aks install-cli
296
296
```
297
297
298
298
For more information about `kubectl`, see [Command line tool (kubectl)](https://kubernetes.io/docs/reference/kubectl/overview/) in the Kubernetes documentation.
299
299
300
300
To configure `kubectl` to connect to your Kubernetes cluster, use the [az aks get-credentials](/cli/azure/aks#az-aks-get-credentials) command, as shown in the following example. This command downloads credentials and configures the Kubernetes CLI to use them.
301
301
302
-
```azurecli-interactive
302
+
```azurecli
303
303
az aks get-credentials \
304
304
--resource-group $RESOURCE_GROUP_NAME \
305
305
--name $CLUSTER_NAME \
@@ -399,7 +399,7 @@ The `prod.` prefix indicates that these properties are active when running in th
399
399
400
400
#### Database configuration
401
401
402
-
Add the following database configuration variables. The database connection related properties `%prod.quarkus.datasource.jdbc.url`, `%prod.quarkus.datasource.username` and `%prod.quarkus.datasource.password` read values from the environment variables `DB_JDBC_URL`, `DB_USERNAME` and `DB_PASSWORD`, respectively. These environment variables map to secret values that store the database connection information for security reasons, which is described in the next section.
402
+
Add the following database configuration variables. The database connection related properties `%prod.quarkus.datasource.jdbc.url`, `%prod.quarkus.datasource.username`, and `%prod.quarkus.datasource.password` read values from the environment variables `DB_JDBC_URL`, `DB_USERNAME`, and `DB_PASSWORD`, respectively. These environment variables map to secret values that store the database connection information for security reasons, which is described in the next section.
403
403
404
404
```yaml
405
405
# Database configurations
@@ -637,7 +637,7 @@ Enter *\q* to exit from the `psql` program and return to the Cloud Shell.
637
637
638
638
To avoid Azure charges, you should clean up unneeded resources. When the cluster is no longer needed, use the [az group delete](/cli/azure/group#az-group-delete) command to remove the resource group, container service, container registry, and all related resources.
0 commit comments