Skip to content

Commit af7592e

Browse files
authored
Merge pull request #270291 from kgremban/aio-qscli
Use CLI for AIO deployment in quickstart
2 parents f01cc1a + 41976f7 commit af7592e

File tree

5 files changed

+31
-63
lines changed

5 files changed

+31
-63
lines changed

articles/iot-operations/get-started/quickstart-deploy.md

Lines changed: 30 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ This script automates the following steps:
141141

142142
* Apply all the required configurations for Azure IoT Operations, including:
143143

144-
* Enable a firewall rule and port forwarding for port 8883 to enable incoming connections to Azure IoT Operations MQ broker.
144+
* Enable a firewall rule and port forwarding for port 8883 to enable incoming connections to Azure IoT Operations broker.
145145

146146
* Install Storage local-path provisioner.
147147

@@ -218,81 +218,49 @@ az iot ops verify-host
218218

219219
This helper command checks connectivity to Azure Resource Manager and Microsoft Container Registry endpoints.
220220

221-
## Configure cluster and deploy Azure IoT Operations Preview
221+
## Deploy Azure IoT Operations Preview
222222

223-
Part of the deployment process is to configure your cluster so that it can communicate securely with your Azure IoT Operations components and key vault. The Azure CLI command `az iot ops init` does this for you. Once your cluster is configured, then you can deploy Azure IoT Operations.
223+
In this section, you use the [az iot ops init](/cli/azure/iot/ops#az-iot-ops-init) command to configure your cluster so that it can communicate securely with your Azure IoT Operations components and key vault, then deploy Azure IoT Operations.
224224

225-
In this section, you use the Azure CLI to create a key vault, build the `az iot ops init` command based on your resources, and then deploy Azure IoT Operations components to your Arc-enabled Kubernetes cluster.
225+
1. Create a key vault. Replace the placeholder parameters with your own information.
226226

227-
### Create a key vault
228-
229-
You can use an existing key vault for your secrets, but verify that the **Permission model** is set to **Vault access policy**. You can check this setting in the Azure portal in the **Access configuration** section of an existing key vault. Or use the [az keyvault show](/cli/azure/keyvault#az-keyvault-show) command to check that `enableRbacAuthorization` is false.
230-
231-
To create a new key vault, use the following command:
232-
233-
```azurecli
234-
az keyvault create --enable-rbac-authorization false --name "<KEYVAULT_NAME>" --resource-group "<RESOURCE_GROUP_NAME>"
235-
```
236-
237-
### Deploy Azure IoT Operations
238-
239-
In this section, you use the Azure CLI to deploy Azure IoT Operations, but the Azure portal has a helper wizard to build the correct CLI command based on your cluster, cloud resources, and configuration choices.
240-
241-
1. In a web browser, open the [Azure portal](https://portal.azure.com). In the Azure portal search bar, search for and select **Azure Arc**.
242-
243-
1. Select **Azure IoT Operations (preview)** from the **Application Services** section of the Azure Arc menu.
244-
245-
:::image type="content" source="./media/quickstart-deploy/arc-iot-operations.png" alt-text="Screenshot of selecting Azure IoT Operations from Azure Arc.":::
246-
247-
1. Select **Create**.
248-
249-
1. On the **Basics** tab of the **Install Azure IoT Operations Arc Extension** page, provide the following information:
250-
251-
| Field | Value |
252-
| ----- | ----- |
253-
| **Subscription** | Select the subscription that contains your Arc-enabled Kubernetes cluster. |
254-
| **Resource group** | Select the resource group that contains your Arc-enabled Kubernetes cluster. |
255-
| **Cluster name** | Select your cluster. When you do, the **Custom location** and **Deployment details** sections autofill. |
256-
257-
:::image type="content" source="./media/quickstart-deploy/install-extension-basics.png" alt-text="Screenshot of the basics tab for installing the Azure IoT Operations Arc extension in the Azure portal.":::
258-
259-
1. Select **Next: Configuration**.
260-
261-
1. On the **Configuration** tab, provide the following information:
262-
263-
| Field | Value |
264-
| ----- | ----- |
265-
| **Deploy a simulated PLC** | Switch this toggle to **Yes**. The simulated PLC creates demo data that you use in the following quickstarts. |
266-
| **Mode** | Set the MQ configuration mode to **Auto**. |
267-
268-
:::image type="content" source="./media/quickstart-deploy/install-extension-configuration.png" alt-text="Screenshot of the configuration tab for installing the Azure IoT Operations Arc extension in the Azure portal.":::
227+
| Placeholder | Value |
228+
| ----------- | ----- |
229+
| **RESOURCE_GROUP** | The name of your resource group that contains the connected cluster. |
230+
| **KEYVAULT_NAME** | A name for a new key vault. |
269231

270-
1. Select **Next: Automation**.
232+
```azurecli
233+
az keyvault create --enable-rbac-authorization false --name "<KEYVAULT_NAME>" --resource-group "<RESOURCE_GROUP>"
234+
```
271235

272-
1. On the **Automation** tab, provide the following information:
236+
>[!TIP]
237+
> You can use an existing key vault for your secrets, but verify that the **Permission model** is set to **Vault access policy**. You can check this setting in the Azure portal in the **Access configuration** section of an existing key vault. Or use the [az keyvault show](/cli/azure/keyvault#az-keyvault-show) command to check that `enableRbacAuthorization` is false.
273238
274-
| Field | Value |
275-
| ----- | ----- |
276-
| **Subscription** | Select the subscription that contains your Arc-enabled Kubernetes cluster. |
277-
| **Azure Key Vault** | Use the **Select a key vault** drop-down menu to choose the key vault that you set up in the previous section. |
239+
1. Run the following CLI command on your development machine or in your codespace terminal. Replace the placeholder parameters with your own information.
278240

279-
1. Once you select a key vault, the **Automation** tab uses all the information you selected in the previous tabs to populate an Azure CLI command that configures your cluster and deploys Azure IoT Operations. Copy the CLI command.
241+
| Placeholder | Value |
242+
| ----------- | ----- |
243+
| **CLUSTER_NAME** | The name of your connected cluster. |
244+
| **RESOURCE_GROUP** | The name of your resource group that contains the connected cluster. |
245+
| **KEYVAULT_NAME** | The name of your key vault. |
280246

281-
:::image type="content" source="./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.":::
247+
```azurecli
248+
az iot ops init --simulate-plc --cluster <CLUSTER_NAME> --resource-group <RESOURCE_GROUP> --kv-id $(az keyvault show --name <KEYVAULT_NAME> -o tsv --query id)
249+
```
282250

283-
1. Run the copied `az iot ops init` command on your development machine or in your codespace terminal.
251+
If you get an error that says *Your device is required to be managed to access your resource*, run `az login` again and make sure that you sign in interactively with a browser.
284252

285253
>[!TIP]
286-
>If you get an error that says *Your device is required to be managed to access your resource*, run `az login` again and make sure that you sign in interactively with a browser.
254+
>If you've run `az iot ops init` before, it automatically created an app registration in Microsoft Entra ID for you. You can reuse that registration rather than creating a new one each time. To use an existing app registration, add the optional parameter `--sp-app-id <APPLICATION_CLIENT_ID>`.
287255
288256
1. These quickstarts use the **OPC PLC simulator** to generate sample data. To configure the simulator for the quickstart scenario, run the following command:
289257

290-
> [!IMPORTANT]
291-
> Don't use the following example in production, use it for simulation and test purposes only. The example lowers the security level for the OPC PLC so that it accepts connections from any client without an explicit peer certificate trust operation.
258+
> [!IMPORTANT]
259+
> Don't use the following example in production, use it for simulation and test purposes only. The example lowers the security level for the OPC PLC so that it accepts connections from any client without an explicit peer certificate trust operation.
292260
293-
```azurecli
294-
az k8s-extension update --version 0.3.0-preview --name opc-ua-broker --release-train preview --cluster-name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --cluster-type connectedClusters --auto-upgrade-minor-version false --config opcPlcSimulation.deploy=true --config opcPlcSimulation.autoAcceptUntrustedCertificates=true
295-
```
261+
```azurecli
262+
az k8s-extension update --version 0.3.0-preview --name opc-ua-broker --release-train preview --cluster-name <CLUSTER_NAME> --resource-group <RESOURCE_GROUP> --cluster-type connectedClusters --auto-upgrade-minor-version false --config opcPlcSimulation.deploy=true --config opcPlcSimulation.autoAcceptUntrustedCertificates=true
263+
```
296264

297265
## View resources in your cluster
298266

@@ -308,7 +276,7 @@ It can take several minutes for the deployment to complete. Continue running the
308276

309277
To view your cluster on the Azure portal, use the following steps:
310278

311-
1. In the Azure portal, navigate to the resource group that contains your cluster.
279+
1. In the [Azure portal](https://portal.azure.com), navigate to the resource group that contains your cluster.
312280

313281
1. From the **Overview** of the resource group, select the name of your cluster.
314282

articles/iot-operations/manage-layered-network/howto-configure-aks-edge-essentials-layered-network.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Follow the steps in [Quickstart: Deploy Azure IoT Operations Preview to an Arc-e
8181

8282
- In earlier steps, you completed the [prerequisites](../get-started/quickstart-deploy.md#prerequisites) and [connected your cluster to Azure Arc](../get-started/quickstart-deploy.md#connect-a-kubernetes-cluster-to-azure-arc) for Azure IoT Operations. You can review these steps to make sure nothing is missing.
8383

84-
- Start from the [Configure cluster and deploy Azure IoT Operations](../get-started/quickstart-deploy.md#configure-cluster-and-deploy-azure-iot-operations-preview) and complete all the further steps.
84+
- Start from the [Configure cluster and deploy Azure IoT Operations](../get-started/quickstart-deploy.md#deploy-azure-iot-operations-preview) and complete all the further steps.
8585

8686

8787
## Next steps

0 commit comments

Comments
 (0)