Skip to content

Commit ed87635

Browse files
Jonathan S. Katzjkatz
authored andcommitted
Add more picutres and improve upon the pgo Client Docs
This adds more pictures to explain the various architectures supported by the PostgreSQL Operator, and contains a massive rewrite and reorg of the pgo Client documentation.
1 parent c390883 commit ed87635

File tree

82 files changed

+1362
-1396
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1362
-1396
lines changed

hugo/content/Upgrade/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ In this example, we are upgrading a cluster from PostgreSQL 11.5 to 11.6 using t
4040

4141
`pgo upgrade mycluster --ccp-image-tag=centos7-11.6-4.2.0`
4242

43-
For more information, please see the `pgo upgrade` documentation [here.] ( {{< relref "operatorcli/cli/pgo_upgrade.md" >}})
43+
For more information, please see the `pgo upgrade` documentation [here.] ( {{< relref "pgo-cli/reference/pgo_upgrade.md" >}})

hugo/content/advanced/direct-api-calls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The API can also be accessed by interacting directly with the API server. This c
1111

1212
The most basic example of this interaction is getting the version of the API server. You can send a GET request to `$PGO_APISERVER_URL/version` and this will send back a json response including the API server version. This is important because the server version and the client version must match. If you are using `pgo` this means you must have the correct version of the client but with a direct call you can specify the client version as part of the request.
1313

14-
The API server is setup to work with the pgo command line interface so the parameters that are passed to the server can be found by looking at the related flags. For example, the series parameter used in the `create` example below is the same as the `-e, --series` flag that is described in the [pgo cli docs](https://access.crunchydata.com/documentation/postgres-operator/4.2.0/operatorcli/cli/pgo_create_cluster/).
14+
The API server is setup to work with the pgo command line interface so the parameters that are passed to the server can be found by looking at the related flags. For example, the series parameter used in the `create` example below is the same as the `-e, --series` flag that is described in the [pgo cli docs](https://access.crunchydata.com/documentation/postgres-operator/4.2.0/pgo-cli/reference/pgo_create_cluster/).
1515

1616
###### Get API Server Version
1717
```

hugo/content/architecture/disaster-recovery.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ allowing them to replay old WAL logs
2525
- ...and of course, allowing for one to take full, differential, and incremental
2626
backpus and perform full and point-in-time restores
2727

28-
![PostgreSQL Operator pgBackRest Integration](/operator-backrest-integration.png)
28+
![PostgreSQL Operator pgBackRest Integration](/images/postgresql-cluster-dr-base.png)
2929

3030
The PostgreSQL Operator leverages a pgBackRest repository to facilitate the
3131
usage of the pgBackRest features in a PostgreSQL cluster. When a new PostgreSQL
@@ -89,7 +89,7 @@ The PostgreSQL Operator supports the ability to perform a full restore on a
8989
PostgreSQL cluster as well as a point-in-time-recovery using the `pgo restore`
9090
command. Note that both of these options are **destructive** to the existing
9191
PostgreSQL cluster; to "restore" the PostgreSQL cluster to a new deployment,
92-
please see the [Clone](/architecture/clone/) section.
92+
please see the [Clone](/pgo-cli/common-tasks/#clone-a-postgresql-cluster) section.
9393

9494
The `pgo restore` command lets you specify the point at which you want to
9595
restore your database using the `--pitr-target` flag with the `pgo restore`
@@ -111,13 +111,18 @@ provided for the primary instance. This may have been set with the
111111
- A Kubernetes Job is created that will perform a pgBackRest restore operation
112112
to the newly allocated PVC. This is facilitated by the `pgo-backrest-restore`
113113
container image.
114+
115+
![PostgreSQL Operator Restore Step 1](/images/postgresql-cluster-restore-step-1.png)
116+
114117
- When restore Job successfully completes, a new Deployment for the PostgreSQL
115118
cluster primary instance is created. A recovery is then issued to the specified
116119
point-in-time, or if it is a full recovery, up to the point of the latest WAL
117120
archive in the repository.
118121
- Once the PostgreSQL primary instance is available, the PostgreSQL Operator
119122
will take a new, full backup of the cluster.
120123

124+
![PostgreSQL Operator Restore Step 2](/images/postgresql-cluster-restore-step-2.png)
125+
121126
At this point, the PostgreSQL cluster has been restored. However, you will need
122127
to re-enable autofail if you would like your PostgreSQL cluster to be
123128
highly-available. You can re-enable autofail with this command:
@@ -136,18 +141,20 @@ The PostgreSQL Operator Scheduler is essentially a [cron](https://en.wikipedia.o
136141
server that will run jobs that it is specified. Schedule commands use the cron
137142
syntax to set up scheduled tasks.
138143

144+
![PostgreSQL Operator Schedule Backups](/images/postgresql-cluster-dr-schedule.png)
145+
139146
For example, to schedule a full backup once a day at 1am, the following command
140147
can be used:
141148

142149
```shell
143-
pgo create schedule hacluster --schedule="1 * * * *" \
150+
pgo create schedule hacluster --schedule="0 1 * * *" \
144151
--schedule-type=pgbackrest --pgbackrest-backup-type=full
145152
```
146153

147154
To schedule an incremental backup once every 3 hours:
148155

149156
```shell
150-
pgo create schedule hacluster --schedule="*/3 * * * *" \
157+
pgo create schedule hacluster --schedule="0 */3 * * *" \
151158
--schedule-type=pgbackrest --pgbackrest-backup-type=incr
152159
```
153160

@@ -163,7 +170,7 @@ For example, using the above example of taking a nightly full backup, you can
163170
specify a policy of retaining 21 backups using the following command:
164171

165172
```shell
166-
pgo create schedule hacluster --schedule="1 * * * *" \
173+
pgo create schedule hacluster --schedule="0 1 * * *" \
167174
--schedule-type=pgbackrest --pgbackrest-backup-type=full \
168175
--schedule-opts="--repo1-retention-full=21"
169176
```

hugo/content/architecture/high-availability.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ hardware upgrade, or other maintenance.
2222

2323
Fortunately, the Crunchy PostgreSQL Operator is prepared for this.
2424

25+
![PostgreSQL Operator High-Availability Overview](/images/postgresql-ha-overview.png)
26+
2527
The Crunchy PostgreSQL Operator supports a distributed-consensus based
2628
high-availability (HA) system that keeps its managed PostgreSQL clusters up and
2729
running, even if the PostgreSQL Operator disappears. Additionally, it leverages

hugo/content/architecture/overview.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ create a high-availability PostgreSQL cluster that has a single replica,
7373
supports having backups in both a local storage area and Amazon S3 and has
7474
built-in metrics and connection pooling, similar to:
7575

76-
![PostgreSQL HA Cluster](/images/postgresql-cluster-ha-s3.svg)
76+
![PostgreSQL HA Cluster](/images/postgresql-cluster-ha-s3.png)
7777

7878
We can accomplish that with a single command:
7979

@@ -165,11 +165,10 @@ accessing the Kubernetes Pods to perform given actions.
165165
For a detailed analysis, please see
166166
[Using Kubernetes Deployments for Running PostgreSQL](https://info.crunchydata.com/blog/using-kubernetes-deployments-for-running-postgresql).
167167

168-
# More Architecture Information
168+
# Additional Architecture Information
169169

170170
There is certainly a lot to unpack in the overall architecture of the Crunchy
171-
PostgreSQL Operator. For more information on the architectures of various
172-
components of the PostgreSQL Operator, read onward, or follow one of the links
173-
below:
174-
175-
- [High-Availability](/architecture/high-availability)
171+
PostgreSQL Operator. Understanding the architecture will help you to plan
172+
the deployment model that is best for your environment. For more information on
173+
the architectures of various components of the PostgreSQL Operator, please read
174+
onward!

hugo/content/architecture/provisioning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ weight: 100
77

88
What happens when the Crunchy PostgreSQL Operator creates a PostgreSQL cluster?
99

10-
![PostgreSQL HA Cluster](/images/postgresql-cluster-ha-s3.svg)
10+
![PostgreSQL HA Cluster](/images/postgresql-cluster-ha-s3.png)
1111

1212
First, an entry needs to be added to the `Pgcluster` CRD that provides the
1313
essential attributes for maintaining the definition of a PostgreSQL cluster.

hugo/content/operatorcli/_index.md

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

hugo/content/operatorcli/cli/_index.md

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

hugo/content/operatorcli/cli/pgo.md

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

0 commit comments

Comments
 (0)