Skip to content

Commit 54cedf7

Browse files
author
Jeff McCormick
committed
2 parents db893d8 + 285e684 commit 54cedf7

File tree

6 files changed

+49
-29
lines changed

6 files changed

+49
-29
lines changed

README.asciidoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
== PostgreSQL Operator
1+
= PostgreSQL Operator
22
v1.0.0, {docdate}
33

4-
# Overview
4+
== Overview
55

66
The PostgreSQL Operator provides a Kubernetes operator capability for managing PostgreSQL Databases and Clusters deployed within a Kubernetes.
77

@@ -23,13 +23,13 @@ What actually gets created on the Kube cluster for a *pgdatabase* or
2323
*pgcluster* resource is defined as a *deployment strategy*. Strategies
2424
are documented in detail here link:docs/strategies.asciidoc[Deployment Strategies]
2525

26-
# Requirements
26+
== Requirements
2727

2828
* Kubernetes 1.5.3+
2929
* link:https://hub.docker.com/r/crunchydata/crunchy-postgres/[PostgreSQL 9.5+ Container]
3030
* link:https://hub.docker.com/r/crunchydata/crunchy-backup/[PostgreSQL Backup Container]
3131

32-
# Example Commands Usage
32+
== Example Commands Usage
3333

3434
Some examples of using the command line interface:
3535

@@ -78,7 +78,7 @@ Details on the *pgo* commands are found in the
7878
link:docs/user-guide.asciidoc[User Guide]
7979

8080

81-
# postgres-operator Container
81+
== postgres-operator Container
8282

8383
In the following diagram, the postgres operator client, *pgo*, is
8484
shown interacting with the postgres operator that runs within
@@ -94,7 +94,7 @@ is available on link:https://hub.docker.com/r/crunchydata/postgres-operator/[Doc
9494
You can also build the Docker image for *postgres-operator* using
9595
the build instructions link:docs/build.asciidoc[Build and Setup].
9696

97-
# Command Line Interface
97+
== Command Line Interface
9898

9999
With the operator deployed, you can then use the *pgo* command line
100100
interface to execute commands that the *postgres-operator* understands
@@ -105,12 +105,12 @@ the Releases page on the github repository or build
105105
it yourself using the build instructions.
106106

107107

108-
# Build and Setup Instructions
108+
== Build and Setup Instructions
109109

110110
Build instructions are documented here.
111111
link:docs/build.asciidoc[Build and Setup]
112112

113-
# Configuration
113+
== Configuration
114114

115115
You can configure both the client and the operator. The
116116
configuration options are documented here.

docs/build.asciidoc

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
== PostgreSQL Operator Build and Setup
1+
= PostgreSQL Operator Build and Setup
22
v1.0.0, {docdate}
33

44
== Overview
55

66
This document describes how to build from source code the
77
Postgres Operator. If you don't want to build the images
88
from source, you can download them from the following:
9+
910
* Dockerhub (crunchydata/lspvc and crunchydata/postgres-operator images)
10-
* Github Releases (pgo client and client configuration files, extracted to your $HOME)
11+
* link:https://github.com/CrunchyData/postgres-operator/releases[Github Releases] (pgo client and client configuration files, extracted to your $HOME)
1112

12-
=== Requirements
13+
== Requirements
1314

1415
* Kubernetes 1.5.3+
1516
* link:https://hub.docker.com/r/crunchydata/crunchy-postgres/[PostgreSQL 9.5+ Container]
16-
* link:https://hub.docker.com/r/crunchydata/crunchy-backup/ [PostgreSQL Backup Container]
17+
* link:https://hub.docker.com/r/crunchydata/crunchy-backup/[PostgreSQL Backup Container]
1718

18-
=== Kubernetes Environment
19+
== Kubernetes Environment
1920

2021
To test the *postgres-operator* you will need a Kubernetes cluster
2122
environment. There are many ways to install a Kube cluster, but for the
@@ -36,7 +37,7 @@ required dependencies:
3637
yum -y install git
3738
....
3839

39-
=== Create Project and Clone
40+
== Create Project and Clone
4041
In your .bashrc file, include the following:
4142
....
4243
export GOPATH=$HOME/odev
@@ -57,7 +58,26 @@ git clone https://github.com/CrunchyData/postgres-operator.git
5758
cd postgres-operator
5859
....
5960

60-
==== Get the dependencies:
61+
== Get Pre-built Images
62+
At this point if you want to avoid building the images and binary
63+
from source, you can pull down the Docker images as follows:
64+
....
65+
docker pull crunchydata/lspvc:centos7-1.0.0
66+
docker pull crunchydata/postgres-operator:centos7-1.0.0
67+
....
68+
69+
Then to get the *pgo* client, go to the Releases page and download the tar ball, uncompress
70+
it into your $HOME directory:
71+
....
72+
cd $HOME
73+
wget https://github.com/CrunchyData/postgres-operator/releases/download/v1.0/postgres-operator.1.0.0.tar.gz
74+
tar xvzf ./postgres-operator.1.0.0.tar.gz
75+
....
76+
77+
Lastly, add the *pgo* client into your PATH.
78+
79+
80+
== Source Dependencies
6181

6282
Install a golang compiler, this can be done with either
6383
your package manager or by following directions
@@ -81,14 +101,14 @@ sudo systemctl restart docker
81101
newgrp docker
82102
....
83103

84-
==== Compile the CLI:
104+
== Compile *pgo*
85105
....
86106
cd $COROOT
87107
make pgo
88108
which pgo
89109
....
90110

91-
==== Compile and build the operator Docker images:
111+
== Build the Docker Images
92112
....
93113
cd $COROOT
94114
make operatorimage
@@ -97,7 +117,7 @@ docker images | grep crunchydata
97117
....
98118

99119

100-
==== Deploy the PostgreSQL Operator
120+
== Deploy the PostgreSQL Operator
101121
note that this will create and use */data* on your
102122
local system as the persistent store for the operator to use
103123
for its persistent volume:
@@ -115,7 +135,7 @@ desired PVC to use when databases and clusters are created.
115135
When you first run the operator, it will create the required
116136
ThirdPartyResources.
117137

118-
==== Setup initial configuration file for the postgres operator CLI
138+
== Setup *pgo* Configuration File
119139

120140
The *pgo* client requires two configuration files be copied
121141
to your $HOME as follows:
@@ -137,7 +157,7 @@ located in */etc/kubernetes/admin.conf*. Update this kubeconfig
137157
path to match your local Kube config file location. Also, update
138158
the location of the LSPVC_TEMPLATE value to match your $HOME value.
139159

140-
==== Viewing Operator Resources
160+
== Viewing Operator Resources
141161

142162
When you first run the operator, it will look for the presence
143163
of its third party resources, and create them if not found. You can view the various resources created and used by the

docs/config.asciidoc

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

44

docs/design.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
== postgres Operator Design
1+
= postgres Operator Design
22
v1.0.0, {docdate}
33

44
image::crunchy_logo.png?raw=true[]
@@ -19,7 +19,7 @@ A Database is made up of Pods and Services, whereas a Cluster is
1919
made up of multiple Pods, Services, and Proxies.
2020

2121

22-
=== Command Line Interface
22+
== Command Line Interface
2323

2424
The pgo command line interface (CLI) is used by a normal end-user
2525
to create databases or clusters, or make changes to existing databases.
@@ -36,7 +36,7 @@ From the CLI, users can view existing databases and clusters that
3636
were deployed using the CLI and Operator. Objects that were
3737
not created by the Crunchy Operator are now viewable from the CLI.
3838

39-
=== Operator Deployment
39+
== Operator Deployment
4040

4141
The postgres Operator runs within a Pod Deployment in the Kubernetes
4242
cluster. An administrator will deploy the postgres Operator pod
@@ -49,7 +49,7 @@ the CLI creates for example a new *pgdatabase* third party
4949
resource, the operator catches that event and creates pods and services
5050
for that new database request.
5151

52-
=== CLI Design
52+
== CLI Design
5353

5454
The CLI uses the cobra package to implement CLI functionality
5555
like help text, config file processing, and command line parsing.

docs/strategies.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
== PostgreSQL Operator Deployment Strategies
1+
= PostgreSQL Operator Deployment Strategies
22
v1.0.0, {docdate}
33

44

@@ -21,15 +21,15 @@ in their Kube cluster.
2121

2222
Being open source, users can also write their own strategy!
2323

24-
=== Specifying a Strategy
24+
== Specifying a Strategy
2525

2626
In the pgo client configuration file, there is a *DB.STRATEGY*
2727
and *CLUSTER.STRATEGY* settings. The current value of the
2828
default strategy is *1*. If you don't set that value, the
2929
default strategy is assumed. If you set that value to something
3030
not supported, the operator will log an error.
3131

32-
=== Strategy Template Files
32+
== Strategy Template Files
3333

3434
Each strategy supplies its set of templates used by the operator
3535
to create new pods, services, etc.

docs/user-guide.asciidoc

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

44
This document is meant for users and demonstrates

0 commit comments

Comments
 (0)