Skip to content

Commit 6f0ed48

Browse files
committed
Address comments
1 parent b6e670b commit 6f0ed48

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

azure-votes-redis/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,19 @@ The YAML documents in [azure-vote-managed-redis.yaml](azure-vote-managed-redis.y
4343

4444
The redis.cache.azure.com instance is configured to retrieve two secrets that are produced by the Azure Cache for Redis instance - hostname and primaryKey. As described [here](https://azure.github.io/azure-service-operator/guide/secrets/#how-to-retrieve-secrets-created-by-azure), these secrets need to be mapped to our sample application and the container for our sample application will be blocked until these two secrets are created.
4545

46-
The Voting Sample is configured with environment variables that read the secretes for the managed Redis hostname and access key, allowing the sample to use the cache.
46+
The Voting Sample is configured with environment variables that read the secrets for the managed Redis hostname and access key, allowing the sample to use the managed cache.
47+
48+
### Steps to install
49+
1. Create environment variables to hold app name. This APP_NAME below is used to generate the names of some resources in Azure below.
50+
```sh
51+
export APP_NAME=my-azure-vote
52+
```
53+
**Warning:**: Some of these names must be unique, so we recommend you edit APP_NAME above to be something unique to yourself to avoid conflicts. For example: APP_NAME=annas-voting-app
4754

4855

4956
Create them all by applying the file:
5057
```sh
51-
kubectl apply -f azure-vote-managed-redis.yaml
58+
envsubst < azure-vote-managed-redis.yaml | kubectl apply -f -
5259
```
5360

5461
The operator will start creating the resource group and Azure Cache for Redis instance in Azure.
@@ -76,10 +83,9 @@ If you're interested in code for the application, it is available [here](https:/
7683

7784
## Clean up
7885

79-
When you're finished with the sample application you can clean all of the Kubernetes and Azure resources up by deleting the `cosmos-todo` namespace in your cluster.
86+
When you're finished with the sample application you can clean all of the Kubernetes and Azure resources up by deleting the `azure-vote` namespace in your cluster.
8087
```sh
81-
kubectl delete namespace cosmos-todo
88+
kubectl delete namespace azure-vote
8289
```
8390

84-
Kubernetes will delete the web application pod and the operator will delete the Azure resource group and all the Cosmos DB resources.
85-
(Deleting a Cosmos DB account can take several minutes.)
91+
Kubernetes will delete the web application pod and the operator will delete the Azure resource group and resources.

azure-votes-redis/azure-vote-managed-redis.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ metadata:
66
apiVersion: resources.azure.com/v1api20200601
77
kind: ResourceGroup
88
metadata:
9-
name: aso-redis-demo
9+
name: ${APP_NAME}
1010
namespace: azure-vote
1111
spec:
1212
location: westcentralus
1313
---
1414
apiVersion: cache.azure.com/v1api20201201
1515
kind: Redis
1616
metadata:
17-
name: azure-vote-redis
17+
name: ${APP_NAME}-redis
1818
namespace: azure-vote
1919
spec:
2020
location: westcentralus
2121
owner:
22-
name: aso-redis-demo
22+
name: ${APP_NAME}
2323
sku:
2424
family: C
2525
name: Basic

0 commit comments

Comments
 (0)