-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
'modified: docs/how-to/h-async/h-async-remove-recover.md,docs/how-to/…
…h-async/h-async-set-up.md,docs/how-to/h-connect-your-charm/h-connect-migrate-backup-restore.md,docs/how-to/h-async/h-async-integrate.md,docs/how-to/h-connect-your-charm/h-connect-migrate-pgdump.md,docs/how-to/h-connect-your-charm/h-integrate-with-your-charm.md,docs/index.md' (#609) Co-authored-by: discourse-gatekeeper-docs-bot <[email protected]>
- Loading branch information
1 parent
95a9bc4
commit 1585c59
Showing
7 changed files
with
31 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
# Set up clusters for cross-regional async replication | ||
|
||
[note type="caution"] | ||
This is an internal article. **Do not use it in production!** | ||
|
||
Contact the [Canonical Data Platform team](https://chat.charmhub.io/charmhub/channels/data-platform) if you are interested in this topic. | ||
[/note] | ||
|
||
Cross-regional (or multi-server) asynchronous replication focuses on disaster recovery by distributing data across different servers. | ||
|
||
This guide will show you the basics of initiating a cross-regional async setup using an example PostgreSQL K8s deployment with two servers: one in Rome and one in Lisbon. | ||
|
||
## Summary | ||
* [Deploy](#heading--deploy) | ||
* [Offer](#heading--offer) | ||
* [Consume](#heading--consume) | ||
* [Promote or switchover](#heading--promote-switchover) | ||
* [Scale](#heading--scale) | ||
* [Deploy](#deploy) | ||
* [Offer](#offer) | ||
* [Consume](#consume) | ||
* [Promote or switchover a cluster](#promote-or-switchover-a-cluster) | ||
* [Scale a cluster](#scale-a-cluster) | ||
|
||
--- | ||
|
||
<a href="#heading--deploy"><h2 id="heading--deploy"> Deploy </h2></a> | ||
## Deploy | ||
|
||
To deploy two clusters in different servers, create two juju models - one for the `rome` cluster, one for the `lisbon` cluster. In the example below, we use the config flag `profile=testing` to limit memory usage. | ||
|
||
|
@@ -34,7 +28,7 @@ juju switch lisbon | |
juju deploy postgresql-k8s db2 --trust --channel=14/edge --config profile=testing --base [email protected] | ||
``` | ||
|
||
<a href="#heading--offer"><h2 id="heading--offer"> Offer </h2></a> | ||
## Offer | ||
|
||
[Offer](https://juju.is/docs/juju/offer) asynchronous replication in one of the clusters. | ||
|
||
|
@@ -43,7 +37,7 @@ juju switch rome | |
juju offer db1:replication-offer replication-offer | ||
``` | ||
|
||
<a href="#heading--consume"><h2 id="heading--consume"> Consume </h2></a> | ||
## Consume | ||
|
||
Consume asynchronous replication on planned `Standby` cluster (Lisbon): | ||
```shell | ||
|
@@ -52,7 +46,7 @@ juju consume rome.replication-offer | |
juju integrate replication-offer db2:replication | ||
``` | ||
|
||
<a href="#heading--promote-switchover"><h2 id="heading--promote-switchover"> Promote or switchover a cluster </h2></a> | ||
## Promote or switchover a cluster | ||
|
||
To define the primary cluster, use the `create-replication` action. | ||
|
||
|
@@ -66,7 +60,7 @@ To switchover and use `lisbon` as the primary instead, run | |
juju run -m lisbon db2/leader promote-to-primary | ||
``` | ||
|
||
<a href="#heading--scale"><h2 id="heading--scale"> Scale a cluster </h2></a> | ||
## Scale a cluster | ||
|
||
The two clusters work independently, which means that it’s possible to scale each cluster separately. The `-m` flag defines the target of this action, so it can be performed within any active model. | ||
|
||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters