Skip to content

Commit df2a003

Browse files
committed
doc updates
1 parent abfe790 commit df2a003

File tree

4 files changed

+29
-37
lines changed

4 files changed

+29
-37
lines changed

hugo/content/_index.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ draft: false
55
---
66

77
image::crunchy_logo.png[Crunchy Data Logo,width="25%",height="25%", align="center"]
8-
= PostgreSQL Operator
98

109
v3.1, {docdate}
1110

hugo/content/getting-started/_index.adoc

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,7 @@ pgo createa user sally --selector=name=mycluster
473473

474474
To delete a Postgres user in the *mycluster* cluster, execute:
475475
....
476-
pgo user --delete-user=sally --selector=name=mycluster
477-
....
478-
479-
To delete that user in all clusters:
480-
....
481-
pgo user --delete-user=sally
476+
pgo user delete user sally --selector=name=mycluster
482477
....
483478

484479
To change the password for a user in the *mycluster* cluster:
@@ -511,11 +506,6 @@ value and the *valid until* expiration date set to 10 days from now, this
511506
command will take effect across all clusters that match the selector. If you
512507
specify *valid-days=-1* it will mean the password will not expire (e.g. infinity).
513508

514-
To drop a user:
515-
....
516-
pgo user --delete-user=user3   --selector=project=xray
517-
....
518-
519509
To see which passwords are set to expire in a given number of days:
520510
....
521511
pgo user --expired=10  --selector=project=xray
@@ -593,6 +583,7 @@ can be used to promote a replica to a primary role in a PostgreSQL
593583
cluster.
594584

595585
This process includes the following actions:
586+
596587
* pick a target replica to become the new primary
597588
* delete the current primary deployment to avoid user requests from
598589
going to multiple primary databases (split brain)

hugo/content/how-it-works/_index.adoc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -396,19 +396,20 @@ See link:https://github.com/CrunchyData/crunchy-containers/blob/master/docs/exam
396396
=== Manual Failover
397397

398398
With manual failover some key features include:
399+
399400
* when you perform a failover, a new replica is created to replace the
400-
replica that was promoted to even out the cluster to the original
401+
replica that was promoted to even out the cluster to the original
401402
number of replicas
402403
* when you perform a failover, the promoted replica is removed from the pgreplica CRD to represent the current *truth*
403404

404-
The *pgo failover --query* command will return a list of replica
405+
The `pgo failover --query` command will return a list of replica
405406
targets which you can select from. That list include the *Ready* status
406407
of the database as well as the Kube node name it is running on.
407408

408409
=== Auto Failover
409410

410411
Starting with release 3.1, there is an *auto* failover mechanism
411-
that can be leveraged by *pgo* users if enabled.
412+
that can be leveraged by *pgo* users if enabled.
412413

413414
This feature will cause the operator to start a timer on a database
414415
primary that has received a *NotReady* status after the database
@@ -420,7 +421,7 @@ back to a *Ready* status within that timer period, a failover
420421
is triggered for this cluster. The failover target is selected
421422
by the auto failover logic.
422423

423-
The amount of time (in seconds) the auto failover timer will wait before
424+
The amount of time (in seconds) the auto failover timer will wait before
424425
triggering a failover is determined by the following *pgo.yaml* setting:
425426
....
426427
AutofailSleepSeconds: 9
@@ -430,18 +431,19 @@ If the above setting is not configured a default value of 30 seconds is
430431
chose.
431432

432433
The logic of auto failover works like this:
433-
* the readiness probe on the primary database container is executed every few seonds to check the *readiness* of the database, this is what tells Kubernetes whether or not the container is *Ready* or *NotReady*.
434+
435+
* the readiness probe on the primary database container is executed every few seonds to check the *readiness* of the database, this is what tells Kubernetes whether or not the container is *Ready* or *NotReady*.
434436
* if a *NotReady* state is detected then that event is caught by the operator which is watching for database containers created by the operator
435437
* upon a *NotReady* event, a timer is started for that database which acts as the final check as to if a failover is required for that database
436438
* if the timer expires and the state is still *Not Ready* then the manual
437439
failover logic is executed for this cluster which causes a promotion of
438-
a replica to primary, and also creates a replacement replica
440+
a replica to primary, and also creates a replacement replica
439441
* only replica targets with a status of *Ready* will be used to select
440442
the target to promote
441443

442444
The readiness probe settings are defined in the following template:
443445
....
444-
conf/postgres-operator/cluster/1/cluster-deployment-1.jsono
446+
conf/postgres-operator/cluster/1/cluster-deployment-1.json
445447
....
446448

447449
The readiness probe settings determine how often the database check

hugo/content/installation/manual-installation.adoc

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@ v3.0, {docdate}
1010

1111
== Project Structure
1212

13-
To perform an installation of the operator, first create the project structure as follows on your host, here we assume a local directory called *odev* -
13+
First, define the following environment variables in *.bashrc*:
1414
....
1515
export GOPATH=$HOME/odev
16+
export GOBIN=$GOPATH/bin
17+
export CO_NAMESPACE=demo
18+
export CO_CMD=kubectl
19+
export COROOT=$GOPATH/src/github.com/crunchydata/postgres-operator
20+
export CO_IMAGE_PREFIX=crunchydata
21+
export CO_IMAGE_TAG=centos7-3.0
22+
export CO_BASEOS=centos7
23+
....
24+
25+
To perform an installation of the operator, first create the project structure as follows on your host, here we assume a local directory called *odev* -
26+
....
1627
mkdir -p $HOME/odev/src $HOME/odev/bin $HOME/odev/pkg
1728
mkdir -p $GOPATH/src/github.com/crunchydata/
1829
....
@@ -67,9 +78,6 @@ sudo chown 777 /data
6778

6879
Create some sample Persistent Volumes using the following script:
6980
....
70-
export CO_NAMESPACE=demo
71-
export CO_CMD=kubectl
72-
export COROOT=$GOPATH/src/github.com/crunchydata/postgres-operator
7381
go get github.com/blang/expenv
7482
$COROOT/pv/create-pv.sh
7583
....
@@ -80,10 +88,8 @@ $COROOT/pv/create-pv.sh
8088

8189
=== Packaged Images
8290

83-
To pull prebuilt versions from Dockerhub of the *postgres-operator* containers, specify the image versions, and execute the following Makefile target -
91+
To pull prebuilt versions from Dockerhub of the *postgres-operator* containers, execute the following Makefile target -
8492
....
85-
export CO_IMAGE_PREFIX=crunchydata
86-
export CO_IMAGE_TAG=centos7-3.0
8793
make pull
8894
....
8995

@@ -136,22 +142,16 @@ This Operator is developed and tested on the following operating systems but is
136142
* *CentOS 7*
137143
* *RHEL 7*
138144

139-
First, install the project library dependencies. The godep dependency manager is used for this purpose. -
145+
Before compiling the Operator, it's necessary to install the *Mercurial* requirement.
140146
....
141-
cd $COROOT
142-
make setup
147+
sudo yum -y install mercurial
143148
....
144149

145-
Then, compile the PostgreSQL Operator using the Makefile.
150+
Then, install the project library dependencies. The godep dependency manager is used for this purpose. Then, compile the PostgreSQL Operator using the Makefile and deploy the operator to your Kubernetes cluster.
146151
....
147152
cd $COROOT
153+
make setup
148154
make all
149-
which pgo
150-
....
151-
152-
Finally, deploy the operator to your Kubernetes cluster.
153-
....
154-
cd $COROOT
155155
make deployoperator
156156
....
157157

@@ -160,7 +160,7 @@ make deployoperator
160160
== Makefile Targets
161161

162162
The following table describes the Makefile targets -
163-
163+
164164
.Makefile Targets
165165
[width="80%",frame="topbot",options="header"]
166166
|======================

0 commit comments

Comments
 (0)