|
| 1 | +--- |
| 2 | +title: "Azure Operator Nexus: Configure Bring-Your-Own (BYO) Storage for Network Fabric" |
| 3 | +description: Learn how to configure a customer-managed storage account and user-assigned managed identity (UAMI) for Network Fabric in Azure Operator Nexus. |
| 4 | +author: sushantjrao |
| 5 | +ms.author: sushrao |
| 6 | +ms.service: azure-operator-nexus |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 02/26/2025 |
| 9 | +ms.custom: template-how-to, devx-track-azurecli |
| 10 | +--- |
| 11 | + |
| 12 | +# How to configure NNF with Bring Your Own (BYO) Storage |
| 13 | + |
| 14 | +This guide provides step-by-step instructions for configuring Network Fabric (NNF) with a customer-managed storage account and User-Assigned Managed Identities (UAMI). Follow the steps below to ensure proper setup and integration. |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +Before proceeding, ensure you have: |
| 19 | + |
| 20 | +- Azure CLI Installed - Install or update the Azure CLI (Download). |
| 21 | + |
| 22 | +- Necessary Permissions - Ensure you have Contributor or Owner role on the storage account and permissions to assign RBAC roles. |
| 23 | + |
| 24 | +- User-Assigned Managed Identity (UAMI) - Created in the same subscription where NNF is deployed. |
| 25 | + |
| 26 | +- Storage Account - Created with the appropriate permissions for NNF operations. |
| 27 | + |
| 28 | +- NNF Resource Provider Registration - Ensure Microsoft.ManagedNetworkFabric is registered in your subscription. |
| 29 | + |
| 30 | +## Create user-assigned managed identity (UAMI) |
| 31 | + |
| 32 | +Create the UAMI(s) required for accessing the necessary resources. |
| 33 | + |
| 34 | +For more information on creating managed identities, refer to [Manage user-assigned managed](/entra/identity/managed-identities-azure-resources/how-manage-user-assigned-managed-identities.md) |
| 35 | + |
| 36 | +## Configure the storage account |
| 37 | + |
| 38 | +### Create or identify a storage account |
| 39 | + |
| 40 | +Create a new storage account or use an existing one. Refer to [Create an Azure storage account](/articles/storage/common/storage-account-create). |
| 41 | + |
| 42 | +### Assign the required role |
| 43 | + |
| 44 | +Assign the **Storage Blob Data Contributor** role to the users and UAMI needing access to the **runRO** and **cable validation command output**. |
| 45 | + |
| 46 | +For role assignment details, see [Assign an Azure role for access to blob data](/articles/storage/blobs/assign-azure-role-data-access.md). |
| 47 | + |
| 48 | +### 2.3 Restrict storage account access |
| 49 | + |
| 50 | +To limit access, configure Storage Firewalls and Virtual Networks: |
| 51 | + |
| 52 | +- Add all required users' IP addresses to the **Virtual Networks** and/or **Firewall** lists. |
| 53 | + |
| 54 | +- Follow instructions from [Configure Azure Storage firewalls and virtual networks](/articles/storage/common/storage-network-security.md). |
| 55 | + |
| 56 | +### Enable Trusted Services |
| 57 | + |
| 58 | +Ensure the option **Allow Azure services on the trusted services list to access this storage account** under **Exceptions** is selected. |
| 59 | + |
| 60 | +## Assign permissions to UAMI for Nexus Network Fabric Resource Provider |
| 61 | + |
| 62 | +When using UAMI to access a storage account, the NNF platform requires provisioning access. Specifically, the permission **Microsoft.ManagedIdentity/userAssignedIdentities/assign/action** must be granted to the UAMI for the **Managed Network Fabric RP** in Microsoft Entra ID. |
| 63 | + |
| 64 | +### Assign the Managed Identity Operator Role |
| 65 | + |
| 66 | +1. Open the **Azure Portal** and locate the **User-Assigned Identity**. |
| 67 | + |
| 68 | +2. Navigate to **Access control (IAM)** > **Add role assignment**. |
| 69 | + |
| 70 | +3. Select **Role: Managed Identity Operator**. |
| 71 | + |
| 72 | +4. Under **Assign access to**, select **User, group, or service principal**. |
| 73 | + |
| 74 | +5. Choose **Member: Managed Network Fabric RP** application. |
| 75 | + |
| 76 | +6. Click **Review and assign**. |
| 77 | + |
| 78 | +> [!Note] |
| 79 | +> When using a User-Assigned Managed Identity (UAMI) to access a Storage account, it is essential to provision access to that identity for the NNF platform. Specifically, the Microsoft.ManagedIdentity/userAssignedIdentities/assign/action permission needs to be added to the User-assigned identity for the Managed Network Fabric RP Microsoft Entra ID. This permission ensures that the UAMI can be properly assigned and utilized within the NNF platform. It is a known limitation of the platform that this specific permission assignment is required. However, this limitation will be addressed in a future release (NNF 9.0). |
| 80 | +
|
| 81 | +## Update Cluster with UAMI and Storage Account configuration |
| 82 | + |
| 83 | +When creating or updating an NNF instance, both the User-Assigned Managed Identity and Storage Account must be supplied together. |
| 84 | + |
| 85 | +### Storage account configuration format |
| 86 | + |
| 87 | +Use the `--storage-account-configuration` parameter to define the storage location for command outputs: |
| 88 | + |
| 89 | +```json |
| 90 | +{ |
| 91 | + "storageAccountId": "<storage_account_id>", |
| 92 | + "storageAccountIdentity": { |
| 93 | + "identityType": "UserAssignedIdentity", |
| 94 | + "userAssignedIdentityResourceId": "<uami_resource_id>" |
| 95 | + } |
| 96 | +} |
| 97 | +``` |
| 98 | + |
| 99 | +## Create a new fabric instance |
| 100 | + |
| 101 | +Use the following command to create a new fabric instance with BYO storage: |
| 102 | + |
| 103 | +```azurecli |
| 104 | +az networkfabric fabric create --resource-name <fabricname> \ |
| 105 | + -g <fabricresourcegroup> \ |
| 106 | + <other_params_for_create> \ |
| 107 | + --storage-account-config "{storageAccountId:'/subscriptions/<subscriptionid>/resourceGroups/<resourcegroupname>/providers/Microsoft.Storage/storageAccounts/<storageaccountname>',storageAccountIdentity:{identityType:'UserAssignedIdentity',userAssignedIdentityResourceId:'/subscriptions/<uamisubscription>/resourceGroups/<uamiresourcegroupname>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<uaminame>'}}" \ |
| 108 | + --mi-user-assigned "/subscriptions/<uamisubscriptionid>/resourceGroups/<uamiresourcegroupname>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<uaminame>" |
| 109 | +``` |
| 110 | + |
| 111 | +## Update an existing fabric instance |
| 112 | + |
| 113 | +For existing deployments, update the fabric with the required parameters: |
| 114 | + |
| 115 | +```azurecli |
| 116 | +az networkfabric fabric update --resource-name <fabricname> \ |
| 117 | + -g <fabricresourcegroup> \ |
| 118 | + --storage-account-config "{storageAccountId:'/subscriptions/<subscriptionid>/resourceGroups/<resourcegroupname>/providers/Microsoft.Storage/storageAccounts/<storageaccountname>',storageAccountIdentity:{identityType:'UserAssignedIdentity',userAssignedIdentityResourceId:'/subscriptions/<uamisubscription>/resourceGroups/<uamiresourcegroupname>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<uaminame>'}}" \ |
| 119 | + --mi-user-assigned "/subscriptions/<uamisubscriptionid>/resourceGroups/<uamiresourcegroupname>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<uaminame>" |
| 120 | +``` |
| 121 | + |
| 122 | +### Commit configuration changes |
| 123 | + |
| 124 | +Once updated, commit the changes: |
| 125 | + |
| 126 | +```azurecli |
| 127 | +az networkfabric fabric commit-configuration --resource-group <rgname> --resource-name <nfname> |
| 128 | +``` |
| 129 | + |
| 130 | + |
0 commit comments