Skip to content

Commit

Permalink
[Documentation][Geo Replication] Document clusters create step in geo…
Browse files Browse the repository at this point in the history
… replication (apache#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.
  • Loading branch information
michaeljmarshall authored Mar 23, 2021
1 parent 31c5fb5 commit df86cb4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions site2/docs/administration-geo.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit df86cb4

Please sign in to comment.