forked from KumareshBabuNS/docs-cloud-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWAN-addl-bi-setup.html.md.erb
268 lines (240 loc) · 7.95 KB
/
WAN-addl-bi-setup.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
---
title: Set Up an Additional Bidirectional Interaction
---
Follow this sequence of steps to set up a bidirectional transfer
over WAN between two PCC service instances,
once an initial setup is in place for a first pair of
PCC service instances.
Call the first pair of PCC service instances A and B.
This set of directions sets up an interaction between
service instance A and service instance C.
Service instance A is already created and has a service key.
The GemFire cluster within each service instance uses an identifier
called a `distributed_system_id`.
This example assumes the assignment of `distributed_system_id = 1`
for cluster A,
`distributed_system_id = 2` for cluster B, and
`distributed_system_id = 3` for cluster C.
1. Communicate the cluster A locators' IP and port addresses and
`sender_credentials` to the cluster C Cloud Foundry administrator.
1. Create the cluster C service instance
using the cluster C Cloud Foundry credentials.
This example explicitly sets the `distributed_system_id`.
Use a `-c` option with the command to specify the `distributed_system_id`,
the cluster A service instance's locators,
and the cluster A `sender_credentials`:
<pre class='terminal'>
$ cf create-service p-cloudcache wan-cluster wan3 -c '
{
"distributed_system_id":3,
"remote_clusters":[
{
"remote_locators":[
"10.0.16.21[55221]",
"10.0.16.22[55221]",
"10.0.16.23[55221]"],
"trusted_sender_credentials":[
{
"username": "gateway_sender_GHI",
"password":"gws-GHI-password"
}]
}]
}'
</pre>
Verify the completion of service creation prior to continuing
to the next step.
Output from the `cf services` command will show the `last operation` as
`create succeeded` when service creation completes.
1. Create the service key of cluster C:
<pre class='terminal'>
$ cf create-service-key wan3 k3
</pre>
Here is sample output from `cf service-key wan3 k3`,
which outputs details of the cluster C service key:
<pre class='terminal'>
Getting key k3 for service instance destination as admin...
{
"distributed_system_id": "3",
"locators": [
"10.0.32.21[55221]"
"10.0.32.22[55221]"
"10.0.32.23[55221]"
],
"urls": {
"gfsh": "https://cloudcache-3.example.com/gemfire/v1",
"pulse": "https://cloudcache-3.example.com/pulse"
},
"users": [
{
"password": "cl-op-STU-password",
"roles": [
"cluster_operator"
],
"username": "cluster_operator_STU"
},
{
"password": "dev-VWX-password",
"roles": [
"developer"
],
"username": "developer_VWX"
}
],
"wan": {
"remote_clusters": [
{
"remote_locators": [
"10.0.16.21[55221]",
"10.0.16.21[55221]",
"10.0.16.21[55221]"
],
"trusted_sender_credentials": [
"gateway_sender_GHI"
]
}
],
"sender_credentials": {
"active": {
"password": "gws-YZA-password",
"username": "gateway_sender_YZA"
}
}
}
}
</pre>
1. Communicate the cluster C locators' IP and port addresses and
`sender_credentials` to the cluster A Cloud Foundry administrator.
1. Update the cluster A service instance using the cluster A
Cloud Foundry credentials to include the cluster C locators
and the cluster C `sender_credentials`.
The cluster A service instance must specify as `remote_locators`
and `trusted_sender_credentials` the details for all clusters it
interacts with. For this example, that is both clusters B and C:
<pre class='terminal'>
$ cf update-service wan1 -c '
{
"remote_clusters":[
{
"remote_locators":[
"10.0.24.21[55221]",
"10.0.24.22[55221]",
"10.0.24.23[55221]",
"10.0.32.21[55221]",
"10.0.32.22[55221]",
"10.0.32.23[55221]"],
"trusted_sender_credentials":[
{
"username":"gateway_sender_PQR",
"password":"gws-PQR-password"
},
{
"username":"gateway_sender_YZA",
"password":"gws-YZA-password"
}]
}]
}'
Updating service instance wan1 as admin
</pre>
1. To observe and verify that the cluster A service instance has
been correctly updated,
it is necessary to delete and recreate the cluster A service key.
As designed, the recreated service key will have the same user identifiers
and passwords; new unique strings and passwords are not generated.
Use the cluster A Cloud Foundry credentials
in these commands:
<pre class='terminal'>
$ cf delete-service-key wan1 k1
</pre>
<pre class='terminal'>
$ cf create-service-key wan1 k1
</pre>
The cluster A service key will now appear as:
<pre class='terminal'>
Getting key k1 for service instance wan1 as admin...
{
"distributed_system_id": "1",
"locators": [
"10.0.16.21[55221]",
"10.0.16.22[55221]",
"10.0.16.23[55221]"
],
"urls": {
"gfsh": "https://cloudcache-1.example.com/gemfire/v1",
"pulse": "https://cloudcache-1.example.com/pulse"
},
"users": [
{
"password": "cl-op-ABC-password",
"roles": [
"cluster_operator"
],
"username": "cluster_operator_ABC"
},
{
"password": "dev-DEF-password",
"roles": [
"developer"
],
"username": "developer_DEF"
}
],
"wan": {
"remote_clusters": [
{
"remote_locators": [
"10.0.24.21[55221]",
"10.0.24.22[55221]",
"10.0.24.23[55221]",
"10.0.32.21[55221]",
"10.0.32.22[55221]",
"10.0.32.23[55221]"
],
"trusted_sender_credentials": [
"gateway_sender_PQR",
"gateway_sender_YZA"
]
}
],
"sender_credentials": {
"active": {
"password": "gws-GHI-password",
"username": "gateway_sender_GHI"
}
}
}
}
</pre>
1. Use gfsh to create the cluster A gateway sender and alter the existing region.
- Connect using gfsh and the cluster A `cluster_operator` credentials,
which are needed to be authorized for the gateway sender
creation operation:
<pre class='terminal'>
gfsh>connect --url=htt<span>ps</span>://cloudcache-1.example.com/gemfire/v1 --use-http --user=cluster\_operator\_ABC --password=cl-op-ABC-password
</pre>
- Create the cluster A gateway sender.
The required `remote-distributed-system-id` option identifies the `distributed-system-id` of the destination cluster. It is 3 for this example:
<pre class='terminal'>
gfsh>create gateway-sender --id=send_to_3 --remote-distributed-system-id=3 --enable-persistence=true
</pre>
- Alter the existing cluster A region so that it specifies all
gateway senders associated with the region. There are two gateway
senders in this example, one that goes to cluster B and a second that
goes to cluster C.
<pre class='terminal'>
gfsh>alter region --name=regionX --gateway-sender-id=send_to_2,send_to_3
</pre>
1. Use gfsh to create the cluster C gateway sender and region.
- Connect using gfsh and the cluster C `cluster_operator` credentials,
which are needed to be authorized for the gateway sender
creation operation:
<pre class='terminal'>
gfsh>connect --url=htt<span>ps</span>://cloudcache-3.example.com/gemfire/v1 --use-http --user=cluster\_operator\_STU --password=cl-op-STU-password
</pre>
- Create the cluster C gateway sender:
<pre class='terminal'>
gfsh>create gateway-sender --id=send_to_1 --remote-distributed-system-id=1 --enable-persistence=true
</pre>
- Create the cluster C region:
<pre class='terminal'>
gfsh>create region --name=regionX --gateway-sender-id=send_to_1 --type=PARTITION_REDUNDANT
</pre>