This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new df86cb4 [Documentation][Geo Replication] Document clusters create
step in geo replication (#9857)
df86cb4 is described below
commit df86cb409b389a2e443a66df5aaa7ef60eeab03f
Author: Michael Marshall <[email protected]>
AuthorDate: Mon Mar 22 21:58:08 2021 -0600
[Documentation][Geo Replication] Document clusters create step in geo
replication (#9857)
### Motivation
The geo replication documentation should reference the way to configure
connections among clusters, as they are essential to configuring geo
replication.
### Modifications
Added documentation to the primary site2 documentation.
### Question
I think it'd be valuable to update the documentation for earlier versions
of pulsar, but I haven't looked into it yet. If these changes are accepted, I'm
happy to discuss which versions to update.
### Acknowledgements
I want to acknowledge that the content for this documentation update is
motivated by @pckeyan's blog:
https://medium.com/@pckeyan/apache-pulsar-geo-replication-ad4f0ca3224b. The
change is not a straight copy from the blog, though.
---
site2/docs/administration-geo.md | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/site2/docs/administration-geo.md b/site2/docs/administration-geo.md
index 3ca3ec9..2f16a43 100644
--- a/site2/docs/administration-geo.md
+++ b/site2/docs/administration-geo.md
@@ -45,6 +45,44 @@ All messages produced in any of the three clusters are
delivered to all subscrip
As stated in [Geo-replication and Pulsar
properties](#geo-replication-and-pulsar-properties) section, geo-replication in
Pulsar is managed at the [tenant](reference-terminology.md#tenant) level.
+The following example connects three clusters: **us-east**, **us-west**, and
**us-cent**.
+
+### Connect replication clusters
+
+To replicate data among clusters, you need to configure each cluster to
connect to the other. You can use the
[`pulsar-admin`](http://pulsar.apache.org/tools/pulsar-admin/) tool to create a
connection.
+
+**Example**
+
+Suppose that you have 3 replication clusters: `us-west`, `us-cent`, and
`us-east`.
+
+1. Configure the connection from `us-west` to `us-east`.
+
+ Run the following command on `us-west`.
+
+```shell
+$ bin/pulsar-admin clusters create \
+ --broker-url pulsar://<DNS-OF-US-EAST>:<PORT> \
+ --url http://<DNS-OF-US-EAST>:<PORT> \
+ us-east
+```
+
+ > #### Tip
+ >
+ > If you want to use a secure connection for a cluster, you can use the
flags `--broker-url-secure` and `--url-secure`. For more information, see
[pulsar-admin clusters create](http://pulsar.apache.org/tools/pulsar-admin/).
+
+2. Configure the connection from `us-west` to `us-cent`.
+
+ Run the following command on `us-west`.
+
+```shell
+$ bin/pulsar-admin clusters create \
+ --broker-url pulsar://<DNS-OF-US-CENT>:<PORT> \
+ --url http://<DNS-OF-US-CENT>:<PORT> \
+ us-cent
+```
+
+3. Run similar commands on `us-east` and `us-cent` to create connections among
clusters.
+
### Grant permissions to properties
To replicate to a cluster, the tenant needs permission to use that cluster.
You can grant permission to the tenant when you create the tenant or grant
later.