Skip to content

Commit bdb24be

Browse files
Adding namespace command
1 parent cbf2a0b commit bdb24be

File tree

2 files changed

+37
-3
lines changed

2 files changed

+37
-3
lines changed

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,22 @@ One at a time, run each Azure CLI command on the **Automation** tab in a termina
148148
az extension add --upgrade --name azure-iot-ops
149149
```
150150

151-
1. Create a schema registry which will be used by Azure IoT Operations components. Copy and run the provided [az iot ops schema registry create](/cli/azure/iot/ops/schema/registry#az-iot-ops-schema-registry-create) command. If you chose to use an existing schema registry, this command isn't displayed on the **Automation** tab.
151+
1. Copy and run the provided [az iot ops schema registry create](/cli/azure/iot/ops/schema/registry#az-iot-ops-schema-registry-create) command to create a schema registry which is used by Azure IoT Operations components. If you chose to use an existing schema registry, this command isn't displayed on the **Automation** tab.
152152

153153
> [!NOTE]
154154
> This command requires that you have role assignment write permissions because it assigns a role to give schema registry access to the storage account. By default, the role is the built-in **Storage Blob Data Contributor** role, or you can create a custom role with restricted permissions to assign instead. For more information, see [az iot ops schema registry create](/cli/azure/iot/ops/schema/registry#az-iot-ops-schema-registry-create).
155155
156+
1. Azure IoT Operations uses *namespaces* to organize assets and devices. Each Azure IoT Operations instance uses a single namespace for its assets and devices. You can use an existing namespace or run the `az iot ops ns create` command to create an Azure Device Registry namespace. Replace `<my namespace name>` with a unique name for your namespace.
157+
158+
```azurecli
159+
az iot ops ns create -n <my namespace name> -g $RESOURCE_GROUP
160+
```
161+
162+
Alternatively, you can create a new Azure Device Registry namespace in Azure portal.
163+
1. In the search box, type and select **Azure Device Registry**
164+
1. In the left menu, select **Namespaces**.
165+
1. Then select **+ Create** to create a new namespace. Make sure to use the same resource group as your Arc-enabled Kubernetes cluster.
166+
156167
1. To prepare the cluster for Azure IoT Operations deployment, copy and run the provided [az iot ops init](/cli/azure/iot/ops#az-iot-ops-init) command.
157168
158169
> [!TIP]
@@ -162,6 +173,12 @@ One at a time, run each Azure CLI command on the **Automation** tab in a termina
162173
163174
1. Deploy Azure IoT Operations. Copy and run the provided [az iot ops create](/cli/azure/iot/ops#az-iot-ops-create) command. This command might take several minutes to complete. You can watch the progress in the deployment progress display in the terminal.
164175
176+
* If you want to use an existing namespace, add the following parameter to the `create` command:
177+
178+
```azurecli
179+
--ns-resource-id $(az iot ops ns show --name <my namespace name> --resource-group $RESOURCE_GROUP -o tsv --query id)
180+
```
181+
165182
* If you want to use the preview connector configuration, add the following parameter to the `create` command:
166183
167184
```bash

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

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,18 @@ One at a time, run each Azure CLI command on the **Automation** tab in a termina
133133
az extension add --upgrade --name azure-iot-ops
134134
```
135135
136-
1. Create a schema registry which will be used by Azure IoT Operations components. Copy and run the provided [az iot ops schema registry create](/cli/azure/iot/ops/schema/registry#az-iot-ops-schema-registry-create) command. If you chose to use an existing schema registry, this command isn't displayed on the **Automation** tab.
136+
1. Copy and run the provided [az iot ops schema registry create](/cli/azure/iot/ops/schema/registry#az-iot-ops-schema-registry-create) command to create a schema registry which is used by Azure IoT Operations components. If you chose to use an existing schema registry, this command isn't displayed on the **Automation** tab.
137+
138+
1. Azure IoT Operations uses *namespaces* to organize assets and devices. Each Azure IoT Operations instance uses a single namespace for its assets and devices. You can use an existing namespace or run the `az iot ops ns create` command to create an Azure Device Registry namespace. Replace `<my namespace name>` with a unique name for your namespace.
139+
140+
```azurecli
141+
az iot ops ns create -n <my namespace name> -g $RESOURCE_GROUP
142+
```
143+
144+
Alternatively, you can create a new Azure Device Registry namespace in Azure portal.
145+
1. In the search box, type and select **Azure Device Registry**
146+
1. In the left menu, select **Namespaces**.
147+
1. Then select **+ Create** to create a new namespace. Make sure to use the same resource group as your Arc-enabled Kubernetes cluster.
137148
138149
1. Prepare the cluster for Azure IoT Operations deployment. Copy and run the provided [az iot ops init](/cli/azure/iot/ops#az-iot-ops-init) command.
139150
@@ -144,9 +155,15 @@ One at a time, run each Azure CLI command on the **Automation** tab in a termina
144155
145156
1. To deploy Azure IoT Operations, copy and run the provided [az iot ops create](/cli/azure/iot/ops#az-iot-ops-create) command. This command might take several minutes to complete. You can watch the progress in the deployment progress display in the terminal.
146157
158+
* If you want to use an existing namespace, add the following parameter to the `create` command:
159+
160+
```azurecli
161+
--ns-resource-id $(az iot ops ns show --name <my namespace name> --resource-group $RESOURCE_GROUP -o tsv --query id)
162+
```
163+
147164
* If you want to use the preview connector configuration, add the following parameter to the `create` command:
148165
149-
```bash
166+
```azurecli
150167
--feature connectors.settings.preview=Enabled
151168
```
152169

0 commit comments

Comments
 (0)