Skip to content

Commit 72f77ad

Browse files
Sync docs from Discourse (#854)
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 7a69475 commit 72f77ad

18 files changed

+282
-819
lines changed

docs/explanation.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Explanation
2+
3+
This section contains pages with more detailed explanations that provide additional context about some of the key concepts behind the PostgreSQL charm:
4+
5+
* [Architecture]
6+
* [Interfaces and endpoints]
7+
* [Connection pooling]
8+
* [Statuses]
9+
* [Users]
10+
* [Logs]
11+
* [Juju]
12+
* [Legacy charm]
13+
14+
Charm event flowcharts:
15+
* [Charm]
16+
* [Relations]
17+
* [Backups]
18+
19+
<!-- Links -->
20+
21+
[Architecture]: /t/11856
22+
[Interfaces and endpoints]: /t/10252
23+
[Statuses]: /t/11855
24+
[Users]: /t/10843
25+
[Logs]: /t/12098
26+
[Juju]: /t/11986
27+
[Legacy charm]: /t/11013
28+
[Connection pooling]: /t/15799
29+
[Charm]: /t/9305
30+
[Relations]: /t/9306
31+
[Backups]: /t/10248

docs/explanation/e-juju-details.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
# Juju tech details
2-
1+
# Juju
32
[Juju](https://juju.is/) is an open source orchestration engine for software operators that enables the deployment, integration and lifecycle management of applications at any scale, on any infrastructure using charms.
43

5-
This [charm](https://charmhub.io/postgresql-k8s) is an operator - business logic encapsulated in reusable software packages that automate every aspect of an application's life. Charms are shared via [CharmHub](https://charmhub.io/).
4+
> See also: [Juju client documentation](https://juju.is/docs/juju), [Juju blog](https://ubuntu.com/blog/tag/juju)
65
7-
See also:
6+
## Compatibility with PostgreSQL
7+
Current stable releases of this charm can still be deployed on Juju 2.9. However, newer features are not supported.
8+
> See the [Releases page](/t/11872) for more information about the minimum Juju version required to operate the features of each revision.
89
9-
* [Juju Documentation](https://juju.is/docs/juju) and [Blog](https://ubuntu.com/blog/tag/juju)
10-
* [Charm SDK](https://juju.is/docs/sdk)
10+
Additionally, there are limitations regarding integrations with other charms. For example, integration with [modern TLS charms](https://charmhub.io/topics/security-with-x-509-certificates) requires Juju 3.x.
1111

1212
## Breaking changes between Juju 2.9.x and 3.x
1313

14-
As this charm documentation is written for Juju 3.x, users of 2.9.x will encounter noteworthy changes when following the instructions. This section explains those changes.
14+
As this charm's documentation is written for Juju 3.x, users of 2.9.x will encounter noteworthy changes when following the instructions. This section explains those changes.
1515

1616
Breaking changes have been introduced in the Juju client between versions 2.9.x and 3.x. These are caused by the renaming and re-purposing of several commands - functionality and command options remain unchanged.
1717

18-
In the context of this guide, the pertinent changes are shown here:
18+
In the context of this guide, the pertinent changes are as follows:
1919

20-
|2.9.x|3.x|
20+
| v2.9.x | v3.x |
2121
| --- | --- |
22-
|**add-relation**|**integrate**|
23-
|**relate**|**integrate**|
24-
|**run**|**exec**|
25-
|**run-action --wait**|**run**|
22+
|`add-relation`|`integrate`|
23+
|`relate`|`integrate`|
24+
|`run`|`exec`|
25+
|`run-action --wait`|`run`|
2626

2727
See the [Juju 3.0 release notes](https://juju.is/docs/juju/roadmap#heading--juju-3-0-0---22-oct-2022) for the comprehensive list of changes.
2828

29-
The response is to therefore substitute the documented command with the equivalent 2.9.x command. For example:
29+
Example substitutions:
3030

3131
### Juju 3.x:
3232
```shell

docs/how-to.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# How-to guides
2+
3+
The following guides cover key processes and common tasks for managing and using Charmed PostgreSQL on Kubernetes.
4+
5+
## Deployment and setup
6+
7+
The following guides walk you through the details of how to install different cloud services and bootstrap them to Juju:
8+
* [Canonical K8s]
9+
* [MicroK8s]
10+
* [GKE]
11+
* [EKS]
12+
* [AKS]
13+
* [Multi-availability zones (AZ)][Multi-AZ]
14+
15+
The following guides cover some specific deployment scenarios and architectures:
16+
* [Terraform]
17+
* [Air-gapped]
18+
19+
## Usage and maintenance
20+
21+
* [Integrate with another application]
22+
* [External access]
23+
* [Scale replicas]
24+
* [Enable TLS]
25+
* [Enable plugins/extensions]
26+
27+
## Backup and restore
28+
* [Configure S3 AWS]
29+
* [Configure S3 RadosGW]
30+
* [Create a backup]
31+
* [Restore a backup]
32+
* [Manage backup retention]
33+
* [Migrate a cluster]
34+
35+
## Monitoring (COS)
36+
37+
* [Enable monitoring]
38+
* [Enable alert rules]
39+
* [Enable tracing]
40+
41+
## Minor upgrades
42+
* [Perform a minor upgrade]
43+
* [Perform a minor rollback]
44+
45+
## Cross-regional (cluster-cluster) async replication
46+
47+
* [Cross-regional async replication]
48+
* [Set up clusters]
49+
* [Integrate with a client app]
50+
* [Remove or recover a cluster]
51+
* [Enable plugins/extensions]
52+
53+
## Development
54+
55+
This section is aimed at charm developers looking to support PostgreSQL integrations with their charm.
56+
57+
* [Integrate with your charm]
58+
* [Migrate data via pg_dump]
59+
* [Migrate data via backup/restore]
60+
61+
<!--Links-->
62+
63+
[Canonical K8s]: /t/15937
64+
[MicroK8s]: /t/11858
65+
[GKE]: /t/11237
66+
[EKS]: /t/12106
67+
[AKS]: /t/14307
68+
[Multi-AZ]: /t/15678
69+
[Terraform]: /t/14924
70+
[Air-gapped]: /t/15691
71+
72+
[Integrate with another application]: /t/9594
73+
[External access]: /t/15701
74+
[Scale replicas]: /t/9592
75+
[Enable TLS]: /t/9593
76+
[Enable plugins/extensions]: /t/10907
77+
78+
[Configure S3 AWS]: /t/9595
79+
[Configure S3 RadosGW]: /t/10316
80+
[Create a backup]: /t/9596
81+
[Restore a backup]: /t/9597
82+
[Manage backup retention]: /t/14203
83+
[Migrate a cluster]: /t/9598
84+
85+
[Enable monitoring]: /t/10812
86+
[Enable alert rules]: /t/12982
87+
[Enable tracing]: /t/14786
88+
89+
[Perform a minor upgrade]: /t/12095
90+
[Perform a minor rollback]: /t/12096
91+
92+
[Cross-regional async replication]: /t/15413
93+
[Set up clusters]: /t/13895
94+
[Integrate with a client app]: /t/13896
95+
[Remove or recover a cluster]: /t/13897
96+
97+
[Integrate with your charm]: /t/11853
98+
[Migrate data via pg_dump]: /t/12162
99+
[Migrate data via backup/restore]: /t/12161

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

Lines changed: 0 additions & 48 deletions
This file was deleted.

docs/how-to/h-deploy.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# How to deploy
2+
3+
This page aims to provide an introduction to the PostgreSQL deployment process and lists all the related guides. It contains the following sections:
4+
* [General deployment instructions](#general-deployment-instructions)
5+
* [Clouds](#clouds)
6+
* [Special deployments](#special-deployments)
7+
8+
---
9+
10+
## General deployment instructions
11+
12+
The basic requirements for deploying a charm are the [**Juju client**](https://juju.is/docs/juju) and a Kubernetes [**cloud**](https://juju.is/docs/juju/cloud).
13+
14+
First, [bootstrap](https://juju.is/docs/juju/juju-bootstrap) the cloud controller and create a [model](https://canonical-juju.readthedocs-hosted.com/en/latest/user/reference/model/):
15+
```shell
16+
juju bootstrap <cloud name> <controller name>
17+
juju add-model <model name>
18+
```
19+
20+
Then, either continue with the `juju` client **or** use the `terraform juju` client to deploy the PostgreSQL charm.
21+
22+
To deploy with the `juju` client:
23+
```shell
24+
juju deploy postgresql-k8s --trust
25+
```
26+
> See also: [`juju deploy` command](https://canonical-juju.readthedocs-hosted.com/en/latest/user/reference/juju-cli/list-of-juju-cli-commands/deploy/)
27+
28+
To deploy with `terraform juju`, follow the guide [How to deploy using Terraform](/t/).
29+
> See also: [Terraform Provider for Juju documentation](https://canonical-terraform-provider-juju.readthedocs-hosted.com/en/latest/)
30+
31+
If you are not sure where to start or would like a more guided walkthrough for setting up your environment, see the [Charmed PostgreSQL K8s tutorial][Tutorial].
32+
33+
## Clouds
34+
35+
The guides below go through the steps to install different cloud services and bootstrap them to Juju:
36+
* [Canonical K8s]
37+
* [Google Kubernetes Engine]
38+
* [Amazon Elastic Kubernetes Service]
39+
* [Azure Kubernetes Service]
40+
41+
[How to deploy on multiple availability zones (AZ)] demonstrates how to deploy a cluster on a cloud using different AZs for high availability.
42+
43+
## Special deployments
44+
45+
These guides cover some specific deployment scenarios and architectures.
46+
47+
### External network access
48+
49+
See [How to connect from outside the local network] for guidance on connecting with a client application outside PostgreSQL's Kubernetes cluster.
50+
51+
### Airgapped
52+
[How to deploy in an offline or air-gapped environment] goes over the special configuration steps for installing PostgreSQL in an airgapped environment via CharmHub and the Snap Store Proxy.
53+
54+
### Cluster-cluster replication
55+
Cluster-cluster, cross-regional, or multi-server asynchronous replication focuses on disaster recovery by distributing data across different servers.
56+
57+
The [Cross-regional async replication] guide goes through the steps to set up clusters for cluster-cluster replication, integrate with a client, and remove or recover a failed cluster.
58+
59+
[Tutorial]: /t/9296
60+
61+
[How to deploy using Terraform]: /t/14924
62+
63+
[Canonical K8s]: /t/15937
64+
[Google Kubernetes Engine]: /t/11237
65+
[Amazon Elastic Kubernetes Service]: /t/12106
66+
[Azure Kubernetes Service]: /t/14307
67+
68+
[How to deploy on multiple availability zones (AZ)]: /t/15678
69+
70+
71+
[How to enable TLS]: /t/9593
72+
[How to connect from outside the local network]: /t/15701
73+
74+
[How to deploy in an offline or air-gapped environment]: /t/15691
75+
[Cross-regional async replication]: /t/15413

docs/how-to/h-upgrade.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Upgrade
2+
3+
Currently, the charm supports PostgreSQL major version 14 only. Therefore, in-place upgrades/rollbacks are not possible for major versions.
4+
5+
> **Note**: Canonical is not planning to support in-place upgrades for major version change. The new PostgreSQL K8s charm will have to be installed nearby, and the data will be copied from the old to the new installation. After announcing the next PostgreSQL major version support, the appropriate documentation for data migration will be published.
6+
7+
For instructions on carrying out **minor version upgrades**, see the following guides:
8+
9+
* [Minor upgrade](/t/12095), e.g. PostgreSQL 14.8 -> PostgreSQL 14.9<br/>
10+
(including charm revision bump 42 -> 43).
11+
* [Minor rollback](/t/12096), e.g. PostgreSQL 14.9 -> PostgreSQL 14.8<br/>
12+
(including charm revision return 43 -> 42).

0 commit comments

Comments
 (0)