Skip to content

Commit 411fb45

Browse files
Sync docs from Discourse (#647)
1 parent a46927b commit 411fb45

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

docs/how-to/h-deploy-spaces.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Deploy on Juju spaces
2+
3+
The Charmed MySQL operator supports [Juju spaces](https://documentation.ubuntu.com/juju/latest/reference/space/index.html) to separate network traffic for:
4+
- **Client** - MySQL instance to client data.
5+
- **Instance-replication** - cluster instances replication data.
6+
- **Cluster-replication** - cluster to cluster replication data.
7+
- **Backup** - backup and restore data.
8+
9+
## Prerequisites
10+
11+
* Charmed MySQL revision 380+
12+
* Configured network spaces
13+
* See [Juju | How to manage network spaces](https://documentation.ubuntu.com/juju/latest/reference/juju-cli/list-of-juju-cli-commands/add-space/)
14+
15+
## Deploy
16+
17+
On application deployment, constraints are required to ensure the unit(s) have address(es) on the specified network space(s), and endpoint binding(s) for the space(s).
18+
19+
For example, with spaces configured for instance replication and client traffic:
20+
```text
21+
❯ juju spaces
22+
Name Space ID Subnets
23+
alpha 0 10.163.154.0/24
24+
client 1 10.0.0.0/24
25+
peers 2 10.10.10.0/24
26+
```
27+
28+
The space `alpha` is default and cannot be removed. To deploy Charmed MySQL operator using the spaces:
29+
```text
30+
juju deploy mysql --channel 8.0/edge \
31+
--constraints spaces=client,peers \
32+
--bind "database-peers=peers database=client"
33+
```
34+
35+
[note type=caution]
36+
Currently there's no support for the juju `bind` command. Network space binding must be defined at deploy time only.
37+
[/note]
38+
39+
Consequently, a client application must use the `client` space on the model, or a space for the same subnet in another model, for example:
40+
```text
41+
juju deploy client-app \
42+
--constraints spaces=client \
43+
--bind database=client
44+
```
45+
46+
The two application can be then related using:
47+
```text
48+
juju integrate mysql:database client-app:database
49+
```
50+
51+
The client application will receive network endpoints on the `10.0.0.0/24` subnet.
52+
53+
The Charmed MySQL operator endpoints are:
54+
55+
| Endpoint | Traffic |
56+
| ------------------------------ | -------------------- |
57+
| database | Client |
58+
| database-peers | Instance-replication |
59+
| replication-offer, replication | Cluster-replication |
60+
| s3-parameters | Backup |
61+
62+
63+
[note]
64+
If using a network space for the backup traffic, the user is responsible for ensuring that the target object storage URL traffic is routed via the specified network space.
65+
[/note]

docs/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Charmed MySQL is an official distribution of MySQL. It’s an open-source projec
5353
| 3 | h-deploy-multi-az | [Multi-AZ](/t/15823) |
5454
| 3 | h-deploy-terraform | [Terraform](/t/14925) |
5555
| 3 | h-deploy-airgapped | [Air-gapped](/t/15747) |
56+
| 3 | h-deploy-spaces | [Juju spaces](/t/18084) |
5657
| 2 | h-integrate| [Integrate with another application](/t/9902) |
5758
| 2 | h-external-access | [External network access](/t/15801) |
5859
| 2 | h-scale | [Scale replicas](/t/9904) |

0 commit comments

Comments
 (0)