Skip to content

Commit 716107e

Browse files
committed
fixed number, indents, note
1 parent c044fdd commit 716107e

File tree

1 file changed

+61
-61
lines changed

1 file changed

+61
-61
lines changed

articles/azure-cache-for-redis/cache-tutorial-active-replication.md

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -50,76 +50,76 @@ To demonstrate data replication across regions, we run two instances of the same
5050

5151
### West namespace
5252

53-
1. Update the following fields in the following YAML file and save it as _app_west.yaml_.
53+
Update the following fields in the following YAML file and save it as _app_west.yaml_.
5454

55-
1. Update the variable `REDIS_HOST` with the **Endpoint value** URL after removing the port suffix: 10000
56-
1. Update `REDIS_PASSWORD` with the **Access key** of your _West US 2_ cache.
57-
1. Update `APP_LOCATION` to display the region where this application instance is running. For this cache, configure the `APP_LOCATION` to `Seattle` to indicate this application instance is running in Seattle.
58-
1. Verify that the variable `namespace` value is `west` in both places in the file.
55+
1. Update the variable `REDIS_HOST` with the **Endpoint value** URL after removing the port suffix: 10000
56+
1. Update `REDIS_PASSWORD` with the **Access key** of your _West US 2_ cache.
57+
1. Update `APP_LOCATION` to display the region where this application instance is running. For this cache, configure the `APP_LOCATION` to `Seattle` to indicate this application instance is running in Seattle.
58+
1. Verify that the variable `namespace` value is `west` in both places in the file.
5959

6060
It should look like following code:
6161

62-
```YAML
63-
apiVersion: apps/v1
64-
kind: Deployment
65-
metadata:
66-
name: shoppingcart-app
67-
namespace: west
68-
spec:
69-
replicas: 1
70-
selector:
71-
matchLabels:
72-
app: shoppingcart
73-
template:
74-
metadata:
75-
labels:
76-
app: shoppingcart
77-
spec:
78-
containers:
79-
- name: demoapp
80-
image: mcr.microsoft.com/azure-redis-cache/redisactivereplicationdemo:latest
81-
resources:
82-
limits:
83-
cpu: "0.5"
84-
memory: "250Mi"
85-
requests:
86-
cpu: "0.5"
87-
memory: "128Mi"
88-
env:
89-
- name: REDIS_HOST
90-
value: "DemoWest.westus2.redisenterprise.cache.azure.net"
91-
- name: REDIS_PASSWORD
92-
value: "myaccesskey"
93-
- name: REDIS_PORT
94-
value: "10000" # redis enterprise port
95-
- name: HTTP_PORT
96-
value: "8080"
97-
- name: APP_LOCATION
98-
value: "Seattle, WA"
99-
---
100-
apiVersion: v1
101-
kind: Service
62+
```YAML
63+
apiVersion: apps/v1
64+
kind: Deployment
65+
metadata:
66+
name: shoppingcart-app
67+
namespace: west
68+
spec:
69+
replicas: 1
70+
selector:
71+
matchLabels:
72+
app: shoppingcart
73+
template:
10274
metadata:
103-
name: shoppingcart-svc
104-
namespace: west
105-
spec:
106-
type: LoadBalancer
107-
ports:
108-
- protocol: TCP
109-
port: 80
110-
targetPort: 8080
111-
selector:
75+
labels:
11276
app: shoppingcart
113-
```
77+
spec:
78+
containers:
79+
- name: demoapp
80+
image: mcr.microsoft.com/azure-redis-cache/redisactivereplicationdemo:latest
81+
resources:
82+
limits:
83+
cpu: "0.5"
84+
memory: "250Mi"
85+
requests:
86+
cpu: "0.5"
87+
memory: "128Mi"
88+
env:
89+
- name: REDIS_HOST
90+
value: "DemoWest.westus2.redisenterprise.cache.azure.net"
91+
- name: REDIS_PASSWORD
92+
value: "myaccesskey"
93+
- name: REDIS_PORT
94+
value: "10000" # redis enterprise port
95+
- name: HTTP_PORT
96+
value: "8080"
97+
- name: APP_LOCATION
98+
value: "Seattle, WA"
99+
---
100+
apiVersion: v1
101+
kind: Service
102+
metadata:
103+
name: shoppingcart-svc
104+
namespace: west
105+
spec:
106+
type: LoadBalancer
107+
ports:
108+
- protocol: TCP
109+
port: 80
110+
targetPort: 8080
111+
selector:
112+
app: shoppingcart
113+
```
114114
115115
### East namespace
116116
117-
1. Save another copy of the same YAML file as _app_east.yaml_. This time, use the values that correspond with your second cache.
117+
Save another copy of the same YAML file as _app_east.yaml_. This time, use the values that correspond with your second cache.
118118
119-
1. Update the variable `REDIS_HOST` with the **Endpoint value** after removing the port suffix: 10000
120-
1. Update `REDIS_PASSWORD` with the **Access key** of your _East US_ cache.
121-
1. Update `APP_LOCATION` to display the region where this application instance is running. For this cache, configure the `APP_LOCATION` to _New York_ to indicate this application instance is running in New York.
122-
1. Verify that the variable `namespace` value is `east` in both places in the file.
119+
1. Update the variable `REDIS_HOST` with the **Endpoint value** after removing the port suffix: 10000
120+
1. Update `REDIS_PASSWORD` with the **Access key** of your _East US_ cache.
121+
1. Update `APP_LOCATION` to display the region where this application instance is running. For this cache, configure the `APP_LOCATION` to _New York_ to indicate this application instance is running in New York.
122+
1. Verify that the variable `namespace` value is `east` in both places in the file.
123123

124124
It should look like following code:
125125

@@ -181,7 +181,7 @@ spec:
181181
In this section, you first install the Kubernetes CLI and then connect to an AKS cluster.
182182

183183
> [!NOTE]
184-
> For this part of the tutorial, a Azure Kubernetes Service Cluster is required. For this tutorial, you deploy both instances of the application on the same AKS cluster.
184+
> An Azure Kubernetes Service Cluster is required for this tutorial. You deploy both instances of the application on the same AKS cluster.
185185

186186
### Install the Kubernetes CLI
187187

0 commit comments

Comments
 (0)