1- == PostgreSQL Operator Build and Setup
1+ = PostgreSQL Operator Build and Setup
22v1.0.0, {docdate}
33
44== Overview
55
66This document describes how to build from source code the
77Postgres Operator. If you don't want to build the images
88from 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
2021To test the *postgres-operator* you will need a Kubernetes cluster
2122environment. There are many ways to install a Kube cluster, but for the
@@ -36,7 +37,7 @@ required dependencies:
3637yum -y install git
3738....
3839
39- === Create Project and Clone
40+ == Create Project and Clone
4041In your .bashrc file, include the following:
4142....
4243export GOPATH=$HOME/odev
@@ -57,7 +58,26 @@ git clone https://github.com/CrunchyData/postgres-operator.git
5758cd 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
6282Install a golang compiler, this can be done with either
6383your package manager or by following directions
@@ -81,14 +101,14 @@ sudo systemctl restart docker
81101newgrp docker
82102....
83103
84- ==== Compile the CLI:
104+ == Compile *pgo*
85105....
86106cd $COROOT
87107make pgo
88108which pgo
89109....
90110
91- ==== Compile and build the operator Docker images:
111+ == Build the Docker Images
92112....
93113cd $COROOT
94114make operatorimage
@@ -97,7 +117,7 @@ docker images | grep crunchydata
97117....
98118
99119
100- ==== Deploy the PostgreSQL Operator
120+ == Deploy the PostgreSQL Operator
101121note that this will create and use */data* on your
102122local system as the persistent store for the operator to use
103123for its persistent volume:
@@ -115,7 +135,7 @@ desired PVC to use when databases and clusters are created.
115135When you first run the operator, it will create the required
116136ThirdPartyResources.
117137
118- ==== Setup initial configuration file for the postgres operator CLI
138+ == Setup *pgo* Configuration File
119139
120140The *pgo* client requires two configuration files be copied
121141to your $HOME as follows:
@@ -137,7 +157,7 @@ located in */etc/kubernetes/admin.conf*. Update this kubeconfig
137157path to match your local Kube config file location. Also, update
138158the location of the LSPVC_TEMPLATE value to match your $HOME value.
139159
140- ==== Viewing Operator Resources
160+ == Viewing Operator Resources
141161
142162When you first run the operator, it will look for the presence
143163of its third party resources, and create them if not found. You can view the various resources created and used by the
0 commit comments