Skip to content

Commit 98d650d

Browse files
author
Jeff McCormick
committed
update docs
1 parent 19731b9 commit 98d650d

File tree

6 files changed

+95
-96
lines changed

6 files changed

+95
-96
lines changed

README.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= PostgreSQL Operator
2-
v1.4, {docdate}
2+
v1.5, {docdate}
33

44
== Table of Contents
55

docs/build.asciidoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= PostgreSQL Operator Build and Setup
2-
v1.4.1, {docdate}
2+
v1.5, {docdate}
33

44
== Table of Contents
55

@@ -148,7 +148,7 @@ export GOBIN=$GOPATH/bin
148148
export PATH=$PATH:$GOBIN
149149
export COROOT=$GOPATH/src/github.com/crunchydata/postgres-operator
150150
export CO_BASEOS=centos7
151-
export CO_VERSION=1.4
151+
export CO_VERSION=1.5
152152
export CO_IMAGE_TAG=$CO_BASEOS-$CO_VERSION
153153
....
154154

@@ -167,16 +167,16 @@ cd postgres-operator
167167
At this point if you want to avoid building the images and binary
168168
from source, you can pull down the Docker images as follows:
169169
....
170-
docker pull crunchydata/lspvc:centos7-1.4
171-
docker pull crunchydata/postgres-operator:centos7-1.4
170+
docker pull crunchydata/lspvc:centos7-1.5
171+
docker pull crunchydata/postgres-operator:centos7-1.5
172172
....
173173

174174
Then to get the *pgo* client, go to the Releases page and download the tar ball, uncompress
175175
it into your $HOME directory:
176176
....
177177
cd $HOME
178-
wget https://github.com/CrunchyData/postgres-operator/releases/download/v1.4/postgres-operator.1.4.tar.gz
179-
tar xvzf ./postgres-operator.1.4.tar.gz
178+
wget https://github.com/CrunchyData/postgres-operator/releases/download/v1.5/postgres-operator.1.5.tar.gz
179+
tar xvzf ./postgres-operator.1.5.tar.gz
180180
....
181181

182182
Lastly, add the *pgo* client into your PATH.
@@ -189,7 +189,7 @@ your package manager or by following directions
189189
from https://golang.org/dl/
190190

191191
Then install the project library dependencies, starting
192-
with version 1.4.1 the godep dependency manager is used
192+
with version 1.5 the godep dependency manager is used
193193
as follows:
194194
....
195195
cd $COROOT

docs/config.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= PostgreSQL Operator Configuration
2-
v1.4, {docdate}
2+
v1.5, {docdate}
33

44

55
This document describes the configuration options
@@ -64,7 +64,7 @@ BACKUP_STORAGE:
6464
SUPPLEMENTALGROUPS: 65534
6565
PGO:
6666
LSPVC_TEMPLATE: /home/youruserid/.pgo.lspvc-template.json
67-
CO_IMAGE_TAG: centos7-1.4
67+
CO_IMAGE_TAG: centos7-1.5
6868
DEBUG: false
6969
....
7070

@@ -75,7 +75,7 @@ Values in the pgo configuration file have the following meaning:
7575
|======================
7676
|Setting | Definition
7777
|KUBECONFIG | the path to the kubeconfig file
78-
|CLUSTER.CCP_IMAGE_TAG |newly created containers will be based on this image version (e.g. centos7-9.6-1.4.0), unless you override it using the --ccp-image-tag command line flag
78+
|CLUSTER.CCP_IMAGE_TAG |newly created containers will be based on this image version (e.g. centos7-9.6-1.4.1), unless you override it using the --ccp-image-tag command line flag
7979
|CLUSTER.PORT | the PostgreSQL port to use for new containers (e.g. 5432)
8080
|CLUSTER.PG_MASTER_USER | the PostgreSQL master user name
8181
|CLUSTER.PG_MASTER_PASSWORD | the PostgreSQL master user password, when specified, it will be stored in the secret holding the master user credentials, if not specified the value will be generated

docs/design.asciidoc

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= postgres Operator Design
2-
v1.4, {docdate}
2+
v1.5, {docdate}
33

44
image::crunchy_logo.png?raw=true[]
55

@@ -111,3 +111,85 @@ PV (persistent volumes) is up to the administrator and insures that
111111
no data is deleted by the operator.
112112

113113

114+
== PostgreSQL Operator Deployment Strategies
115+
116+
117+
This section describes the various deployment strategies
118+
offered by the operator. A deployment in this case is
119+
the set of objects created in Kubernetes when a
120+
third party resource of type *pgcluster* is created.
121+
TPRs are created by the pgo client command and acted upon
122+
by the postgres operator.
123+
124+
=== Strategies
125+
126+
To support different types of deployments, the operator supports
127+
multiple strategy implementations. Currently there is
128+
only a default *cluster* strategy.
129+
130+
In the future, more deployment strategies will be supported
131+
to offer users more customization to what they see deployed
132+
in their Kube cluster.
133+
134+
Being open source, users can also write their own strategy!
135+
136+
=== Specifying a Strategy
137+
138+
In the pgo client configuration file, there is a
139+
*CLUSTER.STRATEGY* setting. The current value of the
140+
default strategy is *1*. If you don't set that value, the
141+
default strategy is assumed. If you set that value to something
142+
not supported, the operator will log an error.
143+
144+
=== Strategy Template Files
145+
146+
Each strategy supplies its set of templates used by the operator
147+
to create new pods, services, etc.
148+
149+
When the operator is deployed, part of the deployment process
150+
is to copy the required strategy templates into a ConfigMap (*operator-conf*)
151+
that gets mounted into */operator-conf* within the operator pod.
152+
153+
The directory structure of the strategy templates is as
154+
follows:
155+
....
156+
├── backup-job.json
157+
├── cluster
158+
│   └── 1
159+
│   ├── cluster-deployment-1.json
160+
│   ├── cluster-replica-deployment-1.json
161+
│   └── cluster-service-1.json
162+
├── pvc.json
163+
....
164+
165+
In this structure, each strategy's templates live in a subdirectory
166+
that matches the strategy identifier. The default strategy templates
167+
are denoted by the value of *1* in the directory structure above.
168+
169+
If you add another strategy, the file names *must* be unique within
170+
the entire strategy directory. This is due to the way the templates
171+
are stored within the ConfigMap.
172+
173+
174+
=== Default Cluster Deployment Strategy (1)
175+
176+
Using the default cluster strategy, a *cluster* when created by the operator will create the
177+
following on a Kube cluster:
178+
179+
image::operator-diagram-cluster.png?raw=true[]
180+
181+
The default cluster strategy creates the following:
182+
183+
* deployment running a Postgres *master* container with replica count of 1
184+
* service mapped to the *master* Postgres database
185+
* service mapped to the *replica* Postgres database
186+
* PVC for the *master* will be created if not specified in configuration, this
187+
assumes you are using a non-shared volume technology (e.g. Amazon EBS),
188+
if the CLUSTER.PVC_NAME value is set in your configuration then a
189+
shared volume technology is assumed (e.g. HostPath or NFS), if a PVC
190+
is created for the master, the naming convention is *clustername-pvc*
191+
where clustername is the name of your cluster.
192+
193+
If you want to add a Postgres replica to a cluster, you will
194+
*scale* the cluster, for each *replica-count*, a Deployment
195+
will be created that acts as a Postgres replica.

docs/strategies.asciidoc

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

docs/user-guide.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= postgres Operator User Guide
2-
v1.4, {docdate}
2+
v1.5, {docdate}
33

44
This document is meant for users and demonstrates
55
the basic interface of the *pgo* command line interface.

0 commit comments

Comments
 (0)