Skip to content

Commit

Permalink
Sync docs from Discourse (#541)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored Nov 25, 2024
1 parent 70ba5f9 commit 5aca601
Show file tree
Hide file tree
Showing 32 changed files with 1,090 additions and 279 deletions.
12 changes: 11 additions & 1 deletion docs/how-to/h-async-deployment.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Deploy Async replication

The following table shows the source and target controller/model combinations that are currently supported:

| | AWS | GCP | Azure |
|---|---|:---:|:---:|
| AWS | ![ check ] | | |
| GCP | | ![ check ] | |
| Azure | | | ![ check ] |

## Deploy

Deploy two MySQL Clusters, named `Rome` and `Lisbon`:
Expand Down Expand Up @@ -90,4 +98,6 @@ juju add-unit db2 -n 2 -m lisbon
```
[note type="caution"]
**Note**: The scaling is possible before and after the asynchronous replication established/created.
[/note]
[/note]

[check]: https://img.shields.io/badge/%E2%9C%93-brightgreen
7 changes: 6 additions & 1 deletion docs/how-to/h-configure-s3-aws.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
[note]
**Note**: All commands are written for `juju >= v.3.0`

If you are using an earlier version, check the [Juju 3.0 Release Notes](https://juju.is/docs/juju/roadmap#heading--juju-3-0-0---22-oct-2022).
[/note]

# Configure S3 for AWS
> **:information_source: Hint**: Use [Juju 3](/t/5064). Otherwise replace `juju run ...` with `juju run-action --wait ...` and `juju integrate` with `juju relate` for Juju 2.9.

Charmed MySQL backup can be stored on any S3 compatible storage. The S3 access and configurations are managed with the [s3-integrator charm](https://charmhub.io/s3-integrator). Deploy and configure the s3-integrator charm for **[AWS S3](https://aws.amazon.com/s3/)** (click [here](/t/charmed-mysql-how-to-configure-s3-for-radosgw/10318) to backup on Ceph via RadosGW):
```shell
Expand Down
32 changes: 24 additions & 8 deletions docs/how-to/h-configure-s3-radosgw.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
[note]
**Note**: All commands are written for `juju >= v.3.0`

If you are using an earlier version, check the [Juju 3.0 Release Notes](https://juju.is/docs/juju/roadmap#heading--juju-3-0-0---22-oct-2022).
[/note]

# Configure S3 for RadosGW
> **:information_source: Hint**: Use [Juju 3](/t/5064). Otherwise replace `juju run ...` with `juju run-action --wait ...` and `juju integrate` with `juju relate` for Juju 2.9.

Charmed MySQL backup can be stored on any S3 compatible storage, e.g. on [Ceph](https://ceph.com/en/) via [RadosGW](https://docs.ceph.com/en/latest/man/8/radosgw/). The S3 access and configurations are managed with the [s3-integrator charm](https://charmhub.io/s3-integrator). Deploy and configure the s3-integrator charm for **RadosGW** (click [here](/t/charmed-mysql-how-to-configure-s3-for-aws/9894) to backup on AWS S3):
A MySQL backup can be stored on any S3-compatible storage. S3 access and configurations are managed with the [s3-integrator charm](https://charmhub.io/s3-integrator).

This guide will teach you how to deploy and configure the s3-integrator charm on Ceph via [RadosGW](https://docs.ceph.com/en/quincy/man/8/radosgw/), send the configuration to a Charmed MySQL application, and update it.
> For AWS, see the guide [How to configure S3 for AWS](/t/9681)
## Configure s3-integrator
First, install the MinIO client and create a bucket:
```shell
# Install MinIO client and create a bucket:
mc config host add dest https://radosgw.mycompany.fqdn <access-key> <secret-key> --api S3v4 --lookup path
mc mb dest/backups-bucket

```
Then, deploy and run the charm:
```shell
juju deploy s3-integrator
juju run s3-integrator/leader sync-s3-credentials access-key=<access-key> secret-key=<secret-key>
```
Lastly, use `juju config` to add your configuration parameters. For example:
```
juju config s3-integrator \
endpoint="https://radosgw.mycompany.fqdn" \
bucket="backups-bucket" \
Expand All @@ -18,21 +33,22 @@ juju config s3-integrator \
s3-uri-style="path"
```

To pass these configurations to Charmed MySQL, relate the two applications:
## Integrate with Charmed MySQL

To pass these configurations to Charmed PostgreSQL, integrate the two applications:
```shell
juju integrate s3-integrator mysql
```

You can create/list/restore backups now:

You can create, list, and restore backups now:
```shell
juju run mysql/leader list-backups
juju run mysql/leader create-backup
juju run mysql/leader list-backups
juju run mysql/leader restore backup-id=<backup-id-here>
```

You can also update your S3 configuration options after relating, using:
You can also update your S3 configuration options after integrating using
```shell
juju config s3-integrator <option>=<value>
```
Expand Down
27 changes: 18 additions & 9 deletions docs/how-to/h-create-backup.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
# Create and List Backups
> **:information_source: Hint**: Use [Juju 3](/t/5064). Otherwise replace `juju run ...` with `juju run-action --wait ...` for Juju 2.9.
[note]
**Note**: All commands are written for `juju >= v.3.0`

If you are using an earlier version, check the [Juju 3.0 Release Notes](https://juju.is/docs/juju/roadmap#heading--juju-3-0-0---22-oct-2022).
[/note]

# How to create and list backups

Creating and listing backups requires that you:
* [Have a Charmed MySQL deployed](/t/9904)
This guide contains recommended steps and useful commands for creating and managing backups to ensure smooth restores.

## Prerequisites
* A [deployed](/t/9904) MySQL cluster
* Access to S3 storage
* [Have configured settings for S3 storage](/t/9894)
* [Configured settings for S3 storage](/t/9894)

---

Once Charmed MySQL is `active` and `idle` (check `juju status`), you can create your first backup with the `create-backup` command:
## Create a backup
Once `juju status` shows Charmed MySQL as `active` and `idle`, you can create your first backup with the `create-backup` command:
```shell
juju run mysql/leader create-backup
```

[note]
If you have a cluster of one unit, you can run the `create-backup` action on `mysql-k8s/leader` (which will also be the primary unit).

Otherwise, you must run the `create-backup` action on a non-primary unit (see `juju status` or run `juju run-action mysql-k8s/leader get-cluster-status` to find the primary unit).
[/note]
Otherwise, you must run the `create-backup` action on a non-primary unit. To find the primary, see `juju status` or run `juju run mysql-k8s/leader get-cluster-status` to find the primary unit).

## List backups
You can list your available, failed, and in progress backups by running the `list-backups` command:
```shell
juju run mysql/leader list-backups
Expand Down
Loading

0 comments on commit 5aca601

Please sign in to comment.