Skip to content

Commit 9a76158

Browse files
authored
Merge pull request #194995 from TimShererWithAquent/us1925150b
[Bulk] Azure CLI Code tag cleanup
2 parents 5efce1f + 33b17a2 commit 9a76158

19 files changed

+58
-58
lines changed

articles/openshift/howto-create-a-backup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ To [install](https://velero.io/docs/main/basic-install/) Velero on your system,
3131

3232
This step will create a resource group outside of the ARO cluster's resource group. This resource group will allow the backups to persist and can restore applications to new clusters.
3333

34-
```bash
34+
```azurecli
3535
AZURE_BACKUP_RESOURCE_GROUP=Velero_Backups
3636
az group create -n $AZURE_BACKUP_RESOURCE_GROUP --location eastus
3737
@@ -60,13 +60,13 @@ export AZURE_RESOURCE_GROUP=$(az aro show --name <name of cluster> --resource-gr
6060
```
6161

6262

63-
```bash
63+
```azurecli
6464
AZURE_SUBSCRIPTION_ID=$(az account list --query '[?isDefault].id' -o tsv)
6565
6666
AZURE_TENANT_ID=$(az account list --query '[?isDefault].tenantId' -o tsv)
6767
```
6868

69-
```bash
69+
```azurecli
7070
AZURE_CLIENT_SECRET=$(az ad sp create-for-rbac --name "velero" --role "Contributor" --query 'password' -o tsv \
7171
--scopes /subscriptions/$AZURE_SUBSCRIPTION_ID)
7272
AZURE_CLIENT_ID=$(az ad sp list --display-name "velero" --query '[0].appId' -o tsv)

articles/openshift/howto-create-a-storageclass.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Deploy an Azure Red Hat OpenShift 4 cluster into your subscription, see [Create
3030

3131
This step will create a resource group outside of the Azure Red Hat OpenShift (ARO) cluster’s resource group. This resource group will contain the Azure Files shares that are created by Azure Red Hat OpenShift’s dynamic provisioner.
3232

33-
```bash
33+
```azurecli
3434
AZURE_FILES_RESOURCE_GROUP=aro_azure_files
3535
LOCATION=eastus
3636
@@ -50,7 +50,7 @@ az storage account create \
5050

5151
The ARO service principal requires 'listKeys' permission on the new Azure storage account resource group. Assign the ‘Contributor’ role to achieve this.
5252

53-
```bash
53+
```azurecli
5454
ARO_RESOURCE_GROUP=aro-rg
5555
CLUSTER=cluster
5656
ARO_SERVICE_PRINCIPAL_ID=$(az aro show -g $ARO_RESOURCE_GROUP -n $CLUSTER --query servicePrincipalProfile.clientId -o tsv)
@@ -61,7 +61,7 @@ az role assignment create --role Contributor --scope /subscriptions/mySubscripti
6161
### Set ARO cluster permissions
6262

6363
The OpenShift persistent volume binder service account will require the ability to read secrets. Create and assign an OpenShift cluster role to achieve this.
64-
```bash
64+
```azurecli
6565
ARO_API_SERVER=$(az aro list --query "[?contains(name,'$CLUSTER')].[apiserverProfile.url]" -o tsv)
6666
6767
oc login -u kubeadmin -p $(az aro list-credentials -g $ARO_RESOURCE_GROUP -n $CLUSTER --query=kubeadminPassword -o tsv) $ARO_API_SERVER

articles/openshift/howto-restrict-egress.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -137,20 +137,20 @@ LOCATION=eastus # The location where ARO cluster is deployed
137137
```
138138

139139
### Create a resource group
140-
```bash
140+
```azurecli
141141
az group create -g "$RESOURCEGROUP" -l $LOCATION
142142
```
143143

144144
### Create the virtual network
145-
```bash
145+
```azurecli
146146
az network vnet create \
147147
-g $RESOURCEGROUP \
148148
-n $AROVNET \
149149
--address-prefixes 10.0.0.0/8
150150
```
151151

152152
### Add two empty subnets to your virtual network
153-
```bash
153+
```azurecli
154154
az network vnet subnet create \
155155
-g "$RESOURCEGROUP" \
156156
--vnet-name $AROVNET \
@@ -167,15 +167,15 @@ az network vnet create \
167167
```
168168

169169
### Disable network policies for Private Link Service on your virtual network and subnets. This is a requirement for the ARO service to access and manage the cluster.
170-
```bash
170+
```azurecli
171171
az network vnet subnet update \
172172
-g "$RESOURCEGROUP" \
173173
--vnet-name $AROVNET \
174174
-n "$CLUSTER-master" \
175175
--disable-private-link-service-network-policies true
176176
```
177177
### Create a Firewall Subnet
178-
```bash
178+
```azurecli
179179
az network vnet subnet create \
180180
-g "$RESOURCEGROUP" \
181181
--vnet-name $AROVNET \
@@ -185,7 +185,7 @@ az network vnet subnet create \
185185

186186
## Create a jump-host VM
187187
### Create a jump-subnet
188-
```bash
188+
```azurecli
189189
az network vnet subnet create \
190190
-g "$RESOURCEGROUP" \
191191
--vnet-name $AROVNET \
@@ -194,7 +194,7 @@ az network vnet subnet create \
194194
--service-endpoints Microsoft.ContainerRegistry
195195
```
196196
### Create a jump-host VM
197-
```bash
197+
```azurecli
198198
VMUSERNAME=aroadmin
199199
200200
az vm create --name ubuntu-jump \
@@ -224,7 +224,7 @@ When running the `az aro create` command, you can reference your pull secret usi
224224

225225
If you are copying your pull secret or referencing it in other scripts, your pull secret should be formatted as a valid JSON string.
226226

227-
```bash
227+
```azurecli
228228
az aro create \
229229
-g "$RESOURCEGROUP" \
230230
-n "$CLUSTER" \
@@ -239,24 +239,24 @@ az aro create \
239239
## Create an Azure Firewall
240240

241241
### Create a public IP Address
242-
```bash
242+
```azurecli
243243
az network public-ip create -g $RESOURCEGROUP -n fw-ip --sku "Standard" --location $LOCATION
244244
```
245245
### Update install Azure Firewall extension
246-
```bash
246+
```azurecli
247247
az extension add -n azure-firewall
248248
az extension update -n azure-firewall
249249
```
250250

251251
### Create Azure Firewall and configure IP Config
252-
```bash
252+
```azurecli
253253
az network firewall create -g $RESOURCEGROUP -n aro-private -l $LOCATION
254254
az network firewall ip-config create -g $RESOURCEGROUP -f aro-private -n fw-config --public-ip-address fw-ip --vnet-name $AROVNET
255255
256256
```
257257

258258
### Capture Azure Firewall IPs for a later use
259-
```bash
259+
```azurecli
260260
FWPUBLIC_IP=$(az network public-ip show -g $RESOURCEGROUP -n fw-ip --query "ipAddress" -o tsv)
261261
FWPRIVATE_IP=$(az network firewall show -g $RESOURCEGROUP -n aro-private --query "ipConfigurations[0].privateIpAddress" -o tsv)
262262
@@ -265,15 +265,15 @@ echo $FWPRIVATE_IP
265265
```
266266

267267
### Create a UDR and Routing Table for Azure Firewall
268-
```bash
268+
```azurecli
269269
az network route-table create -g $RESOURCEGROUP --name aro-udr
270270
271271
az network route-table route create -g $RESOURCEGROUP --name aro-udr --route-table-name aro-udr --address-prefix 0.0.0.0/0 --next-hop-type VirtualAppliance --next-hop-ip-address $FWPRIVATE_IP
272272
```
273273

274274
### Add Application Rules for Azure Firewall
275275
Rule for OpenShift to work based on this [list](https://docs.openshift.com/container-platform/4.3/installing/install_config/configuring-firewall.html#configuring-firewall_configuring-firewall):
276-
```bash
276+
```azurecli
277277
az network firewall application-rule create -g $RESOURCEGROUP -f aro-private \
278278
--collection-name 'ARO' \
279279
--action allow \
@@ -284,7 +284,7 @@ az network firewall application-rule create -g $RESOURCEGROUP -f aro-private \
284284
--target-fqdns 'registry.redhat.io' '*.quay.io' 'sso.redhat.com' 'management.azure.com' 'mirror.openshift.com' 'api.openshift.com' 'quay.io' '*.blob.core.windows.net' 'gcs.prod.monitoring.core.windows.net' 'registry.access.redhat.com' 'login.microsoftonline.com' '*.servicebus.windows.net' '*.table.core.windows.net' 'grafana.com'
285285
```
286286
Optional rules for Docker images:
287-
```bash
287+
```azurecli
288288
az network firewall application-rule create -g $RESOURCEGROUP -f aro-private \
289289
--collection-name 'Docker' \
290290
--action allow \
@@ -296,7 +296,7 @@ az network firewall application-rule create -g $RESOURCEGROUP -f aro-private \
296296
```
297297

298298
### Associate ARO Subnets to FW
299-
```bash
299+
```azurecli
300300
az network vnet subnet update -g $RESOURCEGROUP --vnet-name $AROVNET --name "$CLUSTER-master" --route-table aro-udr
301301
az network vnet subnet update -g $RESOURCEGROUP --vnet-name $AROVNET --name "$CLUSTER-worker" --route-table aro-udr
302302
```
@@ -326,7 +326,7 @@ ARO_PASSWORD=$(az aro list-credentials -n $CLUSTER -g $RESOURCEGROUP -o json | j
326326
ARO_USERNAME=$(az aro list-credentials -n $CLUSTER -g $RESOURCEGROUP -o json | jq -r '.kubeadminUsername')
327327
```
328328
Get an API server endpoint:
329-
```bash
329+
```azurecli
330330
ARO_URL=$(az aro show -n $CLUSTER -g $RESOURCEGROUP -o json | jq -r '.apiserverProfile.url')
331331
```
332332

@@ -398,7 +398,7 @@ sudo ssh -i /Users/jimzim/.ssh/id_rsa -L 443:console-openshift-console.apps.d5xm
398398

399399
## Clean up resources
400400

401-
```bash
401+
```azurecli
402402
403403
# Clean up the ARO cluster, vnet, firewall and jumpbox
404404

articles/openshift/howto-service-principal-credential-rotation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ If the service principal credentials are expired please update using one of the
9494

9595
### Cluster AAD application contains a client secret with an empty description
9696
When using [automated service principal credential rotation](#Automated-Service-Principal-Credential-Rotation) the following error occurs:
97-
```bash
97+
```azurecli
9898
$ az aro update --refresh-credentials --name MyManagedCluster --resource-group MyResourceGroup
9999
100100
Cluster AAD application contains a client secret with an empty description.

articles/openshift/tutorial-delete-cluster.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you choose to install and use the CLI locally, this tutorial requires that yo
2828

2929
If you're running the Azure CLI locally, run `az login` to sign in to Azure.
3030

31-
```bash
31+
```azurecli
3232
az login
3333
```
3434

@@ -45,7 +45,7 @@ RESOURCEGROUP=yourresourcegroup
4545

4646
Using these values, delete your cluster:
4747

48-
```bash
48+
```azurecli
4949
az aro delete --resource-group $RESOURCEGROUP --name $CLUSTER
5050
```
5151

articles/sentinel/notebook-get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ The Azure CLI component on the Compute instance caches a *refresh token* that it
284284

285285
To authenticate using Azure CLI enter the following into an empty cell and run it:
286286

287-
```python
287+
```azurecli
288288
!az login
289289
```
290290

articles/spring-cloud/how-to-log-streaming.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ az spring-cloud app logs --help
107107
108108
When the [Structured application log](./structured-app-log.md) is enabled for the app, the logs are printed in JSON format. This makes it difficult to read. The `--format-json` argument can be used to format the JSON logs into human readable format.
109109

110-
```shell
110+
```azurecli
111111
# Raw JSON log
112112
$ az spring-cloud app logs --name auth-service
113113
{"timestamp":"2021-05-26T03:35:27.533Z","logger":"com.netflix.discovery.DiscoveryClient","level":"INFO","thread":"main","mdc":{},"message":"Disable delta property : false"}
@@ -121,7 +121,7 @@ $ az spring-cloud app logs --name auth-service --format-json
121121

122122
The `--format-json` argument also takes optional customized format, using the keyword argument [format string syntax](https://docs.python.org/3/library/string.html#format-string-syntax).
123123

124-
```shell
124+
```azurecli
125125
# Custom format
126126
$ az spring-cloud app logs --name auth-service --format-json="{message}{n}"
127127
Disable delta property : false

articles/spring-cloud/quickstart-deploy-apps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ If you've been using the Azure Cloud Shell up to this point, switch to a local c
9393
9494
Make sure that the command prompt is in the project folder before running the following command.
9595
96-
```console
96+
```azurecli
9797
az spring-cloud app deploy -n planet-weather-provider --runtime-version NetCore_31 --main-entry Microsoft.Azure.SpringCloud.Sample.PlanetWeatherProvider.dll --artifact-path ./publish-deploy-planet.zip
9898
```
9999
@@ -127,7 +127,7 @@ If you've been using the Azure Cloud Shell up to this point, switch to a local c
127127

128128
1. Deploy to Azure.
129129

130-
```console
130+
```azurecli
131131
az spring-cloud app deploy -n solar-system-weather --runtime-version NetCore_31 --main-entry Microsoft.Azure.SpringCloud.Sample.SolarSystemWeather.dll --artifact-path ./publish-deploy-solar.zip
132132
```
133133

articles/spring-cloud/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ The following procedure builds and deploys the project that you created earlier.
230230

231231
1. Create an app in your Azure Spring Cloud instance with a public endpoint assigned. Use the same application name "hello-world" that you specified in *appsettings.json*.
232232

233-
```console
233+
```azurecli
234234
az spring-cloud app create -n hello-world -s <service instance name> -g <resource group name> --assign-endpoint --runtime-version NetCore_31
235235
```
236236

articles/static-web-apps/application-settings.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ You can use the `az staticwebapp appsettings` command to update your settings in
9494

9595
- In a terminal or command line, execute the following command to add or update a setting named `message` with a value of `Hello world`. Make sure to replace the placeholder `<YOUR_APP_ID>` with your value.
9696

97-
```bash
97+
```azurecli
9898
az staticwebapp appsettings set --name <YOUR_APP_ID> --setting-names "message=Hello world"
9999
```
100100

@@ -107,7 +107,7 @@ Application settings are available to view through the Azure CLI.
107107

108108
- In a terminal or command line, execute the following command. Make sure to replace the placeholder `<YOUR_APP_ID>` with your value.
109109

110-
```bash
110+
```azurecli
111111
az staticwebapp appsettings list --name <YOUR_APP_ID>
112112
```
113113

@@ -117,7 +117,7 @@ Application settings can be deleted through the Azure CLI.
117117

118118
- In a terminal or command line, execute the following command to delete a setting named `message`. Make sure to replace the placeholder `<YOUR_APP_ID>` with your value.
119119

120-
```bash
120+
```azurecli
121121
az staticwebapp appsettings delete --name <YOUR_APP_ID> --setting-names "message"
122122
```
123123

0 commit comments

Comments
 (0)