Skip to content

Commit 951d4a2

Browse files
authored
Merge pull request #120613 from konichi3/patch-7
Updates for Feb release for AIO CLI
2 parents 7666e34 + fbfd3e2 commit 951d4a2

File tree

2 files changed

+11
-150
lines changed

2 files changed

+11
-150
lines changed

articles/iot-operations/connect-to-cloud/tutorial-connect-event-grid.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,9 @@ You can also check the Event Grid metrics to verify the messages are delivered t
347347

348348
:::image type="content" source="media/tutorial-connect-event-grid/event-grid-metrics.png" alt-text="Screenshot of the metrics view in Azure portal to show successful MQTT messages.":::
349349

350+
> [!TIP]
351+
> You can check the configurations of topic maps, QoS, and message routes with the [CLI extension](/cli/azure/iot/ops#az-iot-ops-check-examples) `az iot ops check --detail-level 2`.
352+
350353
## Next steps
351354

352355
In this tutorial, you learned how to configure IoT MQ for bi-directional MQTT bridge with Azure Event Grid MQTT broker. As next steps, explore the following scenarios:

articles/iot-operations/deploy-iot-ops/howto-deploy-iot-operations.md

Lines changed: 8 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -55,63 +55,7 @@ A cluster host:
5555

5656
## Deploy extensions
5757

58-
#### [Azure portal](#tab/portal)
59-
60-
Use the Azure portal to deploy Azure IoT Operations components to your Arc-enabled Kubernetes cluster.
61-
62-
1. In the Azure portal search bar, search for and select **Azure Arc**.
63-
64-
1. Select **Azure IoT Operations (preview)** from the **Application Services** section of the Azure Arc menu.
65-
66-
1. Select **Create**.
67-
68-
1. On the **Basic** tab of the **Install Azure IoT Operations Arc Extension** page, provide the following information:
69-
70-
| Field | Value |
71-
| ----- | ----- |
72-
| **Subscription** | Select the subscription that contains your Arc-enabled Kubernetes cluster. |
73-
| **Resource group** | Select the resource group that contains your Arc-enabled Kubernetes cluster. |
74-
| **Cluster name** | Select your cluster. When you do, the **Custom location** and **Deployment details** sections autofill. |
75-
76-
1. Select **Next: Configuration**.
77-
78-
1. On the **Configuration** tab, provide the following information:
79-
80-
| Field | Value |
81-
| ----- | ----- |
82-
| **Deploy a simulated PLC** | Switch this toggle to **Yes**. The simulated PLC creates demo telemetry data that you use in the following quickstarts. |
83-
| **Mode** | Set the MQ configuration mode to **Auto**. |
84-
85-
1. Select **Next: Automation**.
86-
87-
1. On the **Automation** tab, provide the following information:
88-
89-
| Field | Value |
90-
| ----- | ----- |
91-
| **Subscription** | Select the subscription that contains your Arc-enabled Kubernetes cluster. |
92-
| **Azure Key vault** | Choose an existing key vault from the drop-down list or create a new one by selecting **Create new**. |
93-
94-
1. Once you select a key vault, the **Automation** tab uses all the information you've selected so far to populate an Azure CLI command that configures your cluster and deploys Azure IoT Operations. Copy the CLI command.
95-
96-
:::image type="content" source="../get-started/media/quickstart-deploy/install-extension-automation.png" alt-text="Screenshot of copying the CLI command from the automation tab for installing the Azure IoT Operations Arc extension in the Azure portal.":::
97-
98-
1. Sign in to Azure CLI on your development machine. To prevent potential permission issues later, sign in interactively with a browser here even if you've already logged in before.
99-
100-
```azurecli
101-
az login
102-
```
103-
104-
> [!NOTE]
105-
> If you're using GitHub Codespaces in a browser, `az login` returns a localhost error in the browser window after logging in. To fix, either:
106-
>
107-
> * Open the codespace in VS Code desktop, and then run `az login` again in the browser terminal.
108-
> * After you get the localhost error on the browser, copy the URL from the browser and run `curl "<URL>"` in a new terminal tab. You should see a JSON response with the message "You have logged into Microsoft Azure!."
109-
110-
1. Run the copied [az iot ops init](/cli/azure/iot/ops#az-iot-ops-init) command on your development machine.
111-
112-
Wait for the command to complete.
113-
114-
#### [Azure CLI](#tab/cli)
58+
### Azure CLI
11559

11660
Use the Azure CLI to deploy Azure IoT Operations components to your Arc-enabled Kubernetes cluster.
11761

@@ -144,101 +88,12 @@ az iot ops init --cluster <CLUSTER_NAME> -g <RESOURCE_GROUP> --kv-id $(az keyvau
14488
14589
If you don't have **Microsoft.Authorization/roleAssignment/write** permissions in your Azure subscription, include the `--disable-rsync-rules` feature flag.
14690

147-
Use optional flags to customize the `az iot ops init` command. To learn more, see [az iot ops init](/cli/azure/iot/ops#az-iot-ops-init).
148-
149-
#### [GitHub Actions](#tab/github)
150-
151-
Use GitHub Actions to deploy Azure IoT Operations components to your Arc-enabled Kubernetes cluster.
152-
153-
Before you begin deploying, use the [az iot ops init](/cli/azure/iot/ops#az-iot-ops-init) command to configure your cluster with a secrets store and a service principal so that it can connect securely to cloud resources.
154-
155-
1. Sign in to Azure CLI on your development machine. To prevent potential permission issues later, sign in interactively with a browser here even if you already logged in before.
156-
157-
```azurecli
158-
az login
159-
```
91+
If you encounter an issue with the KeyVault access policy and the Service Principal (SP) permissions, [pass service principal and KeyVault arguments](howto-manage-secrets.md#pass-service-principal-and-key-vault-arguments-to-azure-iot-operations-deployment).
16092

161-
1. Run the `az iot ops init` command to do the following:
162-
163-
* Create a key vault in your resource group.
164-
* Set up a service principal to give your cluster access to the key vault.
165-
* Configure TLS certificates.
166-
* Configure a secrets store on your cluster that connects to the key vault.
167-
168-
```azurecli-interactive
169-
az iot ops init --cluster <CLUSTER_NAME> -g <RESOURCE_GROUP> --kv-id $(az keyvault create -n <NEW_KEYVAULT_NAME> -g <RESOURCE_GROUP> -o tsv --query id) --no-deploy
170-
```
171-
172-
>[!TIP]
173-
>If you get an error that says *Your device is required to be managed to access your resource*, go back to the previous step and make sure that you signed in interactively.
174-
175-
Now, you can deploy Azure IoT Operations to your cluster.
176-
177-
1. On GitHub, fork the [azure-iot-operations repo](https://github.com/azure/azure-iot-operations).
178-
179-
>[!IMPORTANT]
180-
>You're going to be adding secrets to the repo to run the deployment steps. It's important that you fork the repo and do all of the following steps in your own fork.
181-
182-
1. Review the [azure-iot-operations.json](https://github.com/Azure/azure-iot-operations/blob/main/release/azure-iot-operations.json) file in the repo. This template defines the Azure IoT Operations deployment.
183-
184-
1. Create a service principal for the repository to use when deploying to your cluster. Use the [az ad sp create-for-rbac](/cli/azure/ad/sp#az-ad-sp-create-for-rbac) command.
185-
186-
```azurecli
187-
az ad sp create-for-rbac --name <NEW_SERVICE_PRINCIPAL_NAME> \
188-
--role owner \
189-
--scopes /subscriptions/<YOUR_SUBSCRIPTION_ID>
190-
--json-auth
191-
```
192-
193-
1. Copy the JSON output from the service principal creation command.
194-
195-
1. On GitHub, navigate to your fork of the azure-iot-operations repo.
196-
197-
1. Select **Settings** > **Secrets and variables** > **Actions**.
198-
199-
1. Create a repository secret named `AZURE_CREDENTIALS` and paste the service principal JSON as the secret value.
200-
201-
1. Create a parameter file in your forked repo to specify the environment configuration for your Azure IoT Operations deployment. For example, `envrionments/parameters.json`.
202-
203-
1. Paste the following snippet into the parameters file, replacing the `clusterName` placeholder value with your own information:
204-
205-
```json
206-
{
207-
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
208-
"contentVersion": "1.0.0.0",
209-
"parameters": {
210-
"clusterName": {
211-
"value": "<CLUSTER_NAME>"
212-
}
213-
}
214-
}
215-
```
216-
217-
1. Add any of the following optional parameters as needed for your deployment:
218-
219-
| Parameter | Type | Description |
220-
| --------- | ---- | ----------- |
221-
| `clusterLocation` | string | Specify the cluster's location if it's different than the resource group's location. Otherwise, this parameter defaults to the resource group's location. |
222-
| `location` | string | If the resource group's location isn't supported for Azure IoT Operations deployments, use this parameter to override the default and set the location for the Azure IoT Operations resources. |
223-
| `simulatePLC` | Boolean | Set to `true` if you want to include a simulated component to generate test data. |
224-
| `dataProcessorSecrets` | object | Pass a secret to an Azure IoT Data Processor resource. |
225-
| `mqSecrets` | object | Pass a secret to an Azure IoT MQ resource. |
226-
| `opcUaBrokerSecrets` | object | Pass a secret to an Azure OPC UA Broker resource. |
227-
| `deployResourceSyncRules` | Set to `false` if you don't have **Microsoft.Authorization/roleAssignment/write** permissions in your Azure subscription. |
228-
229-
1. Save your changes to the parameters file.
230-
231-
1. On the GitHub repo, select **Actions** and confirm **I understand my workflows, go ahead and enable them.**
232-
233-
1. Run the **GitOps Deployment of Azure IoT Operations** action and provide the following information:
234-
235-
| Parameter | Value |
236-
| --------- | ----- |
237-
| **Subscription** | Your Azure subscription ID. |
238-
| **Resource group** | The name of the resource group that contains your Arc-enabled cluster. |
239-
| **Environment parameters file** | The path to the parameters file that you created. |
93+
Use optional flags to customize the `az iot ops init` command. To learn more, see [az iot ops init](/cli/azure/iot/ops#az-iot-ops-init).
24094

241-
---
95+
> [!TIP]
96+
> You can check the configurations of topic maps, QoS, message routes with the [CLI extension](/cli/azure/iot/ops#az-iot-ops-check-examples) `az iot ops check --detail-level 2`.
24297
24398
### Configure cluster network (AKS EE)
24499

@@ -286,6 +141,9 @@ To view your cluster on the Azure portal, use the following steps:
286141

287142
There's also an extension called **akvsecretsprovider**. This extension is the secrets provider that you configured and installed on your cluster with the `az iot ops init` command. You might delete and reinstall the Azure IoT Operations components during testing, but keep the secrets provider extension on your cluster.
288143

144+
> [!TIP]
145+
> You can run `az iot ops check` to assess health and configurations of deployed AIO workloads. By default, MQ including cloud connectors are assessed and you can [specifiy the service](/cli/azure/iot/ops#az-iot-ops-check-examples) with `--ops-service --svc`.
146+
289147
## Update a deployment
290148

291149
Currently, there is no support for updating an existing Azure IoT Operations deployment. Instead, start with a clean cluster for a new deployment.

0 commit comments

Comments
 (0)