You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure Cache for Redis documentation and test-case improvement (#15927)
* Improving test case for zone redundancy
* Updated the usage option and addedthe examples for Zones Redundancy and Virtual Network
* Added PS module and usage doc for PE
* Added example for Data Persistence
* Edits for Draft PR
* Added json file for test case change
* Adding functional test for Private Endpoint
* Checking markdown file online
* Checking Markdown
* Checking Format of Markdown file
* Added revised files
* Deleted File
* Changes corresponding to draft PR
* Edited markdown files as suggested
* Missed changes from document review
* Changed link to hyperlink
* Changes the code break
* Edited Changelog and remove the errors
* Removing Private endpoints command
* Changed the unwanted changes
* trying to remove timeout
* Correct Resource.designer.cs
* Update ChangeLog.md
* Change the description of help message
Co-authored-by: Dingmeng Xue <[email protected]>
Copy file name to clipboardExpand all lines: src/RedisCache/RedisCache.Test/SessionRecords/Microsoft.Azure.Commands.RedisCache.Test.ScenarioTests.RedisCacheTests/TestZones.json
[Parameter(ValueFromPipelineByPropertyName=true,Mandatory=false,HelpMessage="The full resource ID of a subnet in a virtual network to deploy the redis cache in. Example format: /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1")]
71
+
[Parameter(ValueFromPipelineByPropertyName=true,Mandatory=false,HelpMessage="The full resource ID of a subnet in a virtual network to deploy the Azure Cache for Redis in. Example format: /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/{vnetName}/subnets/{subnetName}")]
72
72
publicstringSubnetId{get;set;}
73
73
74
74
[Parameter(ValueFromPipelineByPropertyName=true,Mandatory=false,HelpMessage="Required when deploying a redis cache inside an existing Azure Virtual Network.")]
@@ -77,7 +77,7 @@ public class NewAzureRedisCache : RedisCacheCmdletBase
77
77
[Parameter(ValueFromPipelineByPropertyName=true,Mandatory=false,HelpMessage="A hash table which represents tags.")]
78
78
publicHashtableTag{get;set;}
79
79
80
-
[Parameter(ValueFromPipelineByPropertyName=true,Mandatory=false,HelpMessage="List of zones.")]
80
+
[Parameter(ValueFromPipelineByPropertyName=true,Mandatory=false,HelpMessage="List of Azure regions with Availability zones.")]
This command creates Azure cache for Redis instance in mutliple zones.
107
+
108
+
### Example 4: Create a Virtual Network enable Cache
109
+
110
+
Requirements for creating Virtual Network enable cache.
111
+
1. Create the virtual network in same resource group in which you want to create your redis cache. You can create virtual network from [New-AzVirtualNetwork](./../../../Network/Network/help/New-AzVirtualNetwork.md) powershell command.
112
+
1. You will need SubnetID for VNET enable cache. Syntax of SubnetID is given below.
113
+
114
+
Format of SubnetID: /subscriptions/{subid}/resourceGroups/{resourceGroupName}/providers/Microsoft.ClassicNetwork/VirtualNetworks/{vnetName}/subnets/{subnetName}
### Example 5: Configure data persistence for a Premium Azure Cache for Redis
143
+
144
+
Persistence writes Redis data into an Azure Storage account that you own and manage. So before configuring data persistence you need to have [storage account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-powershell) in same resource group. Choose a storage account in the same region and subscription as the cache, and a Premium Storage account is recommended because premium storage has higher throughput.
145
+
146
+
After creating a storage account, get the storage account connection string using this procedure.
147
+
148
+
1. Run this command **Get-AzStorageAccountKey -ResourceGroupName $resourceGroupName -Name $storageAccountName** in powershell.
149
+
1. From the output of above, copy any key.
150
+
1. Put the storage account key and the storage account name in format below to get the connection string of your storage account.
151
+
152
+
Connection String Format :- "DefaultEndpointsProtocol=https;AccountName={storageAccountName};AccountKey={storageAccountKey};EndpointSuffix=core.windows.net"</br>
153
+
154
+
You must have the specific Redis configuration settings to enable data persistence.
155
+
156
+
For RDB backup enable
157
+
- rdb-backup-enabled (Set true or false)
158
+
- rdb-storage-connection-string (Give connection string in above format.)
159
+
- rdb-backup-frequency (Set a backup interval in minutes. You can only choose from - 15, 30, 60, 360, 720 and 1440 minutes.)
### Example 6: Configure data persistence for a Premium Azure Cache for Redis - AOF backup enabled
186
+
187
+
For AOF back up enabled.
188
+
- aof-backup-enabled (Set true or false),
189
+
- aof-storage-connection-string-0 (Give connection string in above format.)
190
+
- aof-storage-connection-string-1 (You can optionally configure another storage account. If a second storage account is configured, the writes to the replica cache are written to this second storage account.)
The full resource ID of a subnet in a virtual network to deploy the Azure Cache for Redis in.
495
+
Example format: /subscriptions/{subid}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/{vnetName}/subnets/{subnetName}
List of Azure regions with [Availability zones](https://docs.microsoft.com/en-us/azure/availability-zones/az-region#azure-services-supporting-availability-zones).
0 commit comments