Skip to content

Commit 55a2a7a

Browse files
authored
Update howto-deploy-iot-operations.md
AZ CLI is the only option to deploy AIO today and portal/GitOps are not supported
1 parent fec8e01 commit 55a2a7a

File tree

1 file changed

+1
-149
lines changed

1 file changed

+1
-149
lines changed

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

Lines changed: 1 addition & 149 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

@@ -146,99 +90,7 @@ If you don't have **Microsoft.Authorization/roleAssignment/write** permissions i
14690

14791
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).
14892

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-
```
16093

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. |
240-
241-
---
24294

24395
### Configure cluster network (AKS EE)
24496

0 commit comments

Comments
 (0)