Skip to content

Commit cd38d82

Browse files
authored
Merge pull request #105083 from TimShererWithAquent/us1669724c
[Azure CLI code blocks]
2 parents 53a90b0 + b5fcda2 commit cd38d82

7 files changed

+40
-40
lines changed

articles/app-service/containers/quickstart-multi-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ When the App Service plan has been created, the Azure CLI shows information simi
9595

9696
In your Cloud Shell terminal, create a multi-container [web app](app-service-linux-intro.md) in the `myAppServicePlan` App Service plan with the [az webapp create](/cli/azure/webapp?view=azure-cli-latest#az-webapp-create) command. Don't forget to replace _\<app_name>_ with a unique app name (valid characters are `a-z`, `0-9`, and `-`).
9797

98-
```bash
98+
```azurecli
9999
az webapp create --resource-group myResourceGroup --plan myAppServicePlan --name <app_name> --multicontainer-config-type compose --multicontainer-config-file compose-wordpress.yml
100100
```
101101

articles/app-service/containers/quickstart-python.experimental.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The Azure CLI provides you with many convenient commands that you use from a loc
4848

4949
To run Azure commands in the Azure CLI, you must first sign in using the `az login` command. This command opens a browser to gather your credentials.
5050

51-
```terminal
51+
```azurecli
5252
az login
5353
```
5454

@@ -59,7 +59,7 @@ The [`az webapp up`](/cli/azure/webapp#az-webapp-up) command creates the web app
5959
In the *python-docs-hello-world* folder that contains the sample code, run the following `az webapp up` command. Replace `<app-name>` with a globally unique app name (*valid characters are `a-z`, `0-9`, and `-`*). Also replace `<location-name>` with an Azure region such as **centralus**, **eastasia**, **westeurope**, **koreasouth**, **brazilsouth**, **centralindia**, and so on. (You can retrieve a list of allowable regions for your Azure account by running the [`az account locations-list`](/cli/azure/appservice?view=azure-cli-latest.md#az-appservice-list-locations) command.)
6060

6161

62-
```terminal
62+
```azurecli
6363
az webapp up --sku F1 -n <app-name> -l <location-name>
6464
```
6565

@@ -157,7 +157,7 @@ Save your changes and exit the editor.
157157

158158
Redeploy the app using the following `az webapp up` command, using the same command you used to deploy the app the first time, replacing `<app-name>` and `<location-name>` with the same names you used before.
159159

160-
```terminal
160+
```azurecli
161161
az webapp up --sku F1 -n <app-name> -l <location-name>
162162
```
163163

@@ -174,13 +174,13 @@ You can access the console logs generated from inside the app and the container
174174

175175
First, turn on container logging by running the following command in a terminal, replacing `<app-name>` with the name of your app and `<resource-group-name>` with the name of the resource group shown in the output of the `az webapp up` command you used (such as "appsvc_rg_Linux_centralus"):
176176

177-
```terminal
177+
```azurecli
178178
az webapp log config --name <app-name> --resource-group <resource-group-name> --docker-container-logging filesystem
179179
```
180180

181181
Once container logging is turned on, run the following command to show the log stream:
182182

183-
```terminal
183+
```azurecli
184184
az webapp log tail --name <app-name> --resource-group <resource-group-name>
185185
```
186186

@@ -217,7 +217,7 @@ In the preceding steps, you created Azure resources in a resource group. The res
217217

218218
If you don't expect to need these resources in the future, delete the resource group by running the following command, replacing `<resource-group-name>` with the resource group shown in the output of the `az webapp up` command, such as "appsvc_rg_Linux_centralus". The command may take a minute to complete.
219219

220-
```terminal
220+
```azurecli
221221
az group delete -n <resource-group-name>
222222
```
223223

articles/dev-spaces/troubleshooting.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Use the Azure Dev Spaces CLI to delete a controller. It’s not possible to dele
3838

3939
If you don't have the Azure Dev Spaces CLI installed, you can first install it using the following command then delete your controller:
4040

41-
```cmd
41+
```azurecli
4242
az aks use-dev-spaces -g <resource group name> -n <cluster name>
4343
```
4444

@@ -74,8 +74,8 @@ To fix this issue, [update your taint configuration](../aks/operator-best-practi
7474

7575
An update to the Azure Dev Spaces CLI changed its installation path. If you're using a version of the Azure CLI earlier than 2.0.63, you may see this error. To display your version of the Azure CLI, use `az --version`.
7676

77-
```bash
78-
$ az --version
77+
```azurecli
78+
az --version
7979
azure-cli 2.0.60 *
8080
...
8181
```
@@ -217,7 +217,7 @@ In Visual Studio:
217217

218218
You receive a *Service cannot be started* error when attempting to rerun a service after you have removed and then recreated the Azure Dev Spaces controller associated with this cluster. In this situation, the verbose output contains the following text:
219219

220-
```cmd
220+
```output
221221
Installing Helm chart...
222222
Release "azds-33d46b-default-webapp1" does not exist. Installing it now.
223223
Error: release azds-33d46b-default-webapp1 failed: services "webapp1" already exists
@@ -323,21 +323,21 @@ To fix this issue:
323323
1. Check the location %ProgramFiles%/Microsoft SDKs\Azure\Azure Dev Spaces CLI for `azds.exe`. If it's there, add that location to the PATH environment variable.
324324
2. If `azds.exe` isn't installed, run the following command:
325325

326-
```cmd
326+
```azurecli
327327
az aks use-dev-spaces -n <cluster-name> -g <resource-group>
328328
```
329329

330330
### Authorization error "Microsoft.DevSpaces/register/action"
331331

332332
You need *Owner* or *Contributor* access in your Azure subscription to manage Azure Dev Spaces. If you're trying to manage Dev Spaces and you don't have *Owner* or *Contributor* access to the associated Azure subscription, you may see an authorization error. For example:
333333

334-
```console
334+
```output
335335
The client '<User email/Id>' with object id '<Guid>' does not have authorization to perform action 'Microsoft.DevSpaces/register/action' over scope '/subscriptions/<Subscription Id>'.
336336
```
337337

338338
To fix this issue, using an account with *Owner* or *Contributor* access to the Azure subscription, manually register the `Microsoft.DevSpaces` namespace:
339339

340-
```console
340+
```azurecli
341341
az provider register --namespace Microsoft.DevSpaces
342342
```
343343

@@ -353,7 +353,7 @@ This issue can impact pods in *all namespaces* in the cluster including namespac
353353

354354
To fix this issue, [update the Dev Spaces CLI to the latest version](./how-to/upgrade-tools.md#update-the-dev-spaces-cli-extension-and-command-line-tools) and then deleting the *azds InitializerConfiguration* from the Azure Dev Spaces controller:
355355

356-
```bash
356+
```azurecli
357357
az aks get-credentials --resource-group <resource group name> --name <cluster name>
358358
kubectl delete InitializerConfiguration azds
359359
```
@@ -450,7 +450,7 @@ You may have an existing AKS cluster and namespace with running pods where you w
450450
451451
To enable Azure Dev Spaces on an existing namespace in an AKS cluster, run `use-dev-spaces` and use `kubectl` to restart all pods in that namespace.
452452
453-
```console
453+
```azurecli
454454
az aks get-credentials --resource-group MyResourceGroup --name MyAKS
455455
az aks use-dev-spaces -g MyResourceGroup -n MyAKS --space my-namespace --yes
456456
kubectl -n my-namespace delete pod --all

articles/service-fabric/service-fabric-tutorial-create-container-images.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,27 +75,27 @@ tiangolo/uwsgi-nginx-flask python3.6 590e17342131 5 days ago
7575

7676
First run the **az login** command to sign in to your Azure account.
7777

78-
```bash
78+
```azurecli
7979
az login
8080
```
8181

8282
Next, use the **az account** command to choose your subscription to create the Azure Container registry. You have to enter the subscription ID of your Azure subscription in place of <subscription_id>.
8383

84-
```bash
84+
```azurecli
8585
az account set --subscription <subscription_id>
8686
```
8787

8888
When deploying an Azure Container Registry, you first need a resource group. An Azure resource group is a logical container into which Azure resources are deployed and managed.
8989

9090
Create a resource group with the **az group create** command. In this example, a resource group named *myResourceGroup* is created in the *westus* region.
9191

92-
```bash
92+
```azurecli
9393
az group create --name <myResourceGroup> --location westus
9494
```
9595

9696
Create an Azure Container registry with the **az acr create** command. Replace \<acrName> with the name of the container registry you want to create under your subscription. This name must be alphanumeric and unique.
9797

98-
```bash
98+
```azurecli
9999
az acr create --resource-group <myResourceGroup> --name <acrName> --sku Basic --admin-enabled true
100100
```
101101

@@ -105,7 +105,7 @@ Throughout the rest of this tutorial, we use "acrName" as a placeholder for the
105105

106106
Sign in to your ACR instance before pushing images to it. Use the **az acr login** command to complete the operation. Provide the unique name given to the container registry when it was created.
107107

108-
```bash
108+
```azurecli
109109
az acr login --name <acrName>
110110
```
111111

@@ -131,13 +131,13 @@ tiangolo/uwsgi-nginx-flask python3.6 590e17342131 5 days ago
131131

132132
To get the loginServer name, run the following command:
133133

134-
```bash
134+
```azurecli
135135
az acr show --name <acrName> --query loginServer --output table
136136
```
137137

138138
This outputs a table with the following results. This result will be used to tag your **azure-vote-front** image before pushing it to the container registry in the next step.
139139

140-
```bash
140+
```output
141141
Result
142142
------------------
143143
<acrName>.azurecr.io
@@ -153,7 +153,7 @@ Once tagged, run 'docker images' to verify the operation.
153153

154154
Output:
155155

156-
```bash
156+
```output
157157
REPOSITORY TAG IMAGE ID CREATED SIZE
158158
azure-vote-front latest 052c549a75bf 23 minutes ago 708MB
159159
<acrName>.azurecr.io/azure-vote-front v1 052c549a75bf 23 minutes ago 708MB
@@ -177,13 +177,13 @@ The docker push commands take a couple of minutes to complete.
177177

178178
To return a list of images that have been pushed to your Azure Container registry, use the [az acr repository list](/cli/azure/acr/repository) command. Update the command with the ACR instance name.
179179

180-
```bash
180+
```azurecli
181181
az acr repository list --name <acrName> --output table
182182
```
183183

184184
Output:
185185

186-
```bash
186+
```output
187187
Result
188188
----------------
189189
azure-vote-front

articles/service-fabric/service-fabric-tutorial-java-deploy-azure.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ The following steps create the necessary resources required to deploy your appli
4848

4949
2. Sign in to your Azure account
5050

51-
```bash
51+
```azurecli
5252
az login
5353
```
5454

5555
3. Set your Azure subscription that you want to use to create the resources
5656

57-
```bash
57+
```azurecli
5858
az account set --subscription [SUBSCRIPTION-ID]
5959
```
6060

@@ -68,23 +68,23 @@ The following steps create the necessary resources required to deploy your appli
6868

6969
The preceding command returns the following information that should be noted for use later.
7070

71-
```
71+
```output
7272
Source Vault Resource Id: /subscriptions/<subscription_id>/resourceGroups/testkeyvaultrg/providers/Microsoft.KeyVault/vaults/<name>
7373
Certificate URL: https://<name>.vault.azure.net/secrets/<cluster-dns-name-for-certificate>/<guid>
7474
Certificate Thumbprint: <THUMBPRINT>
7575
```
7676

7777
5. Create a resource group for the storage account that stores your logs
7878

79-
```bash
79+
```azurecli
8080
az group create --location [REGION] --name [RESOURCE-GROUP-NAME]
8181
8282
Example: az group create --location westus --name teststorageaccountrg
8383
```
8484

8585
6. Create a storage account which will be used to store the logs that will be produced
8686

87-
```bash
87+
```azurecli
8888
az storage account create -g [RESOURCE-GROUP-NAME] -l [REGION] --name [STORAGE-ACCOUNT-NAME] --kind Storage
8989
9090
Example: az storage account create -g teststorageaccountrg -l westus --name teststorageaccount --kind Storage
@@ -96,21 +96,21 @@ The following steps create the necessary resources required to deploy your appli
9696

9797
8. Copy the account SAS URL and set it aside for use when creating your Service Fabric cluster. It resembles the following URL:
9898

99-
```
99+
```output
100100
?sv=2017-04-17&ss=bfqt&srt=sco&sp=rwdlacup&se=2018-01-31T03:24:04Z&st=2018-01-30T19:24:04Z&spr=https,http&sig=IrkO1bVQCHcaKaTiJ5gilLSC5Wxtghu%2FJAeeY5HR%2BPU%3D
101101
```
102102

103103
9. Create a resource group that contains the Event Hub resources. Event Hubs is used to send messages from Service Fabric to the server running the ELK resources.
104104

105-
```bash
105+
```azurecli
106106
az group create --location [REGION] --name [RESOURCE-GROUP-NAME]
107107
108108
Example: az group create --location westus --name testeventhubsrg
109109
```
110110

111111
10. Create an Event Hubs resource using the following command. Follow the prompts to enter details for the namespaceName, eventHubName, consumerGroupName, sendAuthorizationRule, and receiveAuthorizationRule.
112112

113-
```bash
113+
```azurecli
114114
az group deployment create -g [RESOURCE-GROUP-NAME] --template-file eventhubsdeploy.json
115115
116116
Example:
@@ -153,7 +153,7 @@ The following steps create the necessary resources required to deploy your appli
153153

154154
Copy the value of the **sr** field in the JSON returned. The **sr** field value is the SAS token for EventHubs. The following URL is an example of the **sr** field:
155155

156-
```bash
156+
```output
157157
https%3A%2F%testeventhub.servicebus.windows.net%testeventhub&sig=7AlFYnbvEm%2Bat8ALi54JqHU4i6imoFxkjKHS0zI8z8I%3D&se=1517354876&skn=sender
158158
```
159159

@@ -181,7 +181,7 @@ The following steps create the necessary resources required to deploy your appli
181181

182182
14. Run the following command to create your Service Fabric cluster
183183

184-
```bash
184+
```azurecli
185185
az sf cluster create --location 'westus' --resource-group 'testlinux' --template-file sfdeploy.json --parameter-file sfdeploy.parameters.json --secret-identifier <certificate_url_from_step4>
186186
```
187187

articles/service-fabric/service-fabric-tutorial-package-containers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,15 @@ For Service Fabric to pull the container images from Azure Container Registry, w
109109

110110
Sign in to your ACR instance. Use the **az acr login** command to complete the operation. Provide the unique name given to the container registry when it was created.
111111

112-
```bash
112+
```azurecli
113113
az acr login --name <acrName>
114114
```
115115

116116
The command returns a **Login Succeeded** message once completed.
117117

118118
Next, run the following command to get the password of your container registry. This password is used by Service Fabric to authenticate with ACR to pull the container images.
119119

120-
```bash
120+
```azurecli
121121
az acr credential show -n <acrName> --query passwords[0].value
122122
```
123123

@@ -194,7 +194,7 @@ For Service Fabric to assign this DNS name to the backend service, the name need
194194
195195
The frontend service reads an environment variable to know the DNS name of the Redis instance. This environment variable is already defined in the Dockerfile that was used to generate the Docker image and no action needs to be taken here.
196196
197-
```Dockerfile
197+
```dockerfile
198198
ENV REDIS redisbackend.testapp
199199
```
200200

articles/terraform/terraform-create-k8s-cluster-with-aks-applicationgateway-ingress.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ When no longer needed, delete the resources created in this article.
760760
761761
Replace the placeholder with the appropriate value. All resources within the specified resource group will be deleted.
762762
763-
```bash
763+
```azurecli
764764
az group delete -n <resource-group>
765765
```
766766

0 commit comments

Comments
 (0)