Skip to content

Commit 64b9ea6

Browse files
committed
Redis deploy ARM template and doc
1 parent ad1637e commit 64b9ea6

4 files changed

Lines changed: 83 additions & 0 deletions

File tree

deploy/az/redis/readme.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Deploying Redis Cache
2+
3+
The ARM template `redisdeploy.json` and its parameter file (`redisdeploy.parameters.json`) are used to deploy following resources:
4+
5+
1. One Redis Cache
6+
7+
## Editing sbusdeploy.parameters.json file
8+
9+
You can edit the `redisdeploy.parameters.parameters.json` file to set your values, but is not needed. The only parameter than can
10+
be set is:
11+
12+
1. `namespaceprefix` is a string that is used to create the Redis namespace. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value.
13+
14+
## Deploy the template
15+
16+
Once parameter file is edited you can deploy it using [create-resources script](../readme.md).
17+
18+
i. e. if you are in windows, to deploy sql databases in a new resourcegroup located in westus, go to `deploy\az` folder and type:
19+
20+
```
21+
create-resources.cmd redis\redisdeploy newResourceGroup -c westus
22+
```
23+
24+
25+
26+
27+
28+
29+
30+
31+

deploy/az/redis/redisdeploy.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"namespaceprefix": {
6+
"type": "string",
7+
"metadata": {
8+
"description": "Name of the Redis namespace"
9+
}
10+
}
11+
},
12+
"variables": {
13+
"location": "[resourceGroup().location]",
14+
"namespaceprefix": "[concat(parameters('namespaceprefix'), uniqueString(resourceGroup().id))]",
15+
"sbVersion": "2016-04-01"
16+
},
17+
"resources": [
18+
{
19+
"type": "Microsoft.Cache/Redis",
20+
"name": "[variables('namespaceprefix')]",
21+
"apiVersion": "[variables('sbVersion')]",
22+
"location": "[variables('location')]",
23+
"scale": null,
24+
"properties": {
25+
"redisVersion": "3.2.7",
26+
"sku": {
27+
"name": "Standard",
28+
"family": "C",
29+
"capacity": 1
30+
},
31+
"enableNonSslPort": true,
32+
"redisConfiguration": {
33+
"maxclients": "1000",
34+
"maxmemory-reserved": "50",
35+
"maxfragmentationmemory-reserved": "50",
36+
"maxmemory-policy": "volatile-lru",
37+
"maxmemory-delta": "50"
38+
}
39+
}
40+
}
41+
]
42+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3+
"contentVersion": "1.0.0.0",
4+
"parameters": {
5+
"namespaceprefix": {
6+
"value": "eshopredis"
7+
}
8+
}
9+
}

deploy/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Using `docker-machine` is the recommended way to create a VM with docker install
1919

2020
1. [Deploying SQL Server and databases](az/sql/readme.md)
2121
2. [Deploying Azure Service Bus](az/servicebus/readme.md)
22+
3. [Deploying Redis Cache](az/redis/readme.md)
2223

2324

2425

0 commit comments

Comments
 (0)