Difference between revisions of "Pgo"

From UVOO Tech Wiki
Jump to navigation Jump to search
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
https://access.crunchydata.com/documentation/postgres-operator/v5/quickstart/
 +
 +
https://access.crunchydata.com/documentation/postgres-operator/v5/
 +
 +
https://access.crunchydata.com/documentation/postgres-operator/v5/faq/
 +
 +
https://github.com/CrunchyData/postgres-operator
 +
 +
https://github.com/CrunchyData/postgres-operator-client/releases
 +
 +
https://github.com/CrunchyData/postgres-operator/releases # pgo client
 +
 +
https://access.crunchydata.com/documentation/postgres-operator/4.7.0/tutorial/tls/
 +
 +
 
# Install
 
# Install
 +
 +
- https://access.crunchydata.com/documentation/postgres-operator/v5/quickstart/
 +
= https://blog.crunchydata.com/blog/getting-started-with-pgo-postgres-operator-5.0
 +
 +
 
```
 
```
 
git clone https://github.com/CrunchyData/postgres-operator.git
 
git clone https://github.com/CrunchyData/postgres-operator.git
Line 13: Line 33:
 
.bashrc
 
.bashrc
 
```
 
```
export PGOUSER="${HOME?}/.pgo/pgo/pgouser"
+
export PGOUSER="$HOME/.pgo/pgo/pgouser"
export PGO_CA_CERT="${HOME?}/.pgo/pgo/client.crt"
+
export PGO_CA_CERT="$HOME/.pgo/pgo/client.crt"
export PGO_CLIENT_CERT="${HOME?}/.pgo/pgo/client.crt"
+
export PGO_CLIENT_CERT="$HOME/.pgo/pgo/client.crt"
export PGO_CLIENT_KEY="${HOME?}/.pgo/pgo/client.key"
+
export PGO_CLIENT_KEY="$HOME/.pgo/pgo/client.key"
 
export PGO_APISERVER_URL='https://127.0.0.1:8443'
 
export PGO_APISERVER_URL='https://127.0.0.1:8443'
 
export PGO_NAMESPACE=pgo
 
export PGO_NAMESPACE=pgo
Line 22: Line 42:
  
 
```
 
```
 +
grep "export PATH" ~/.bashrc && echo PATH update exists || echo export PATH="$HOME/.pgo/pgo:$PATH" >> ~/.bashrc
 
. ~/.bashrc
 
. ~/.bashrc
~/.pgo/pgo/pgo show
+
pgo
 +
# ~/.pgo/pgo/pgo show
 
```
 
```
  

Latest revision as of 02:35, 24 March 2023

https://access.crunchydata.com/documentation/postgres-operator/v5/quickstart/

https://access.crunchydata.com/documentation/postgres-operator/v5/

https://access.crunchydata.com/documentation/postgres-operator/v5/faq/

https://github.com/CrunchyData/postgres-operator

https://github.com/CrunchyData/postgres-operator-client/releases

https://github.com/CrunchyData/postgres-operator/releases # pgo client

https://access.crunchydata.com/documentation/postgres-operator/4.7.0/tutorial/tls/

Install

git clone https://github.com/CrunchyData/postgres-operator.git
cd postgres-operator/
git checkout REL_4_6
cd installers/kubectl
kubectl create namespace pgo
kubectl apply -f postgres-operator.yml
kubectl get pods -n pgo
./client-setup.sh

.bashrc

export PGOUSER="$HOME/.pgo/pgo/pgouser"
export PGO_CA_CERT="$HOME/.pgo/pgo/client.crt"
export PGO_CLIENT_CERT="$HOME/.pgo/pgo/client.crt"
export PGO_CLIENT_KEY="$HOME/.pgo/pgo/client.key"
export PGO_APISERVER_URL='https://127.0.0.1:8443'
export PGO_NAMESPACE=pgo
grep "export PATH" ~/.bashrc && echo PATH update exists || echo export PATH="$HOME/.pgo/pgo:$PATH" >> ~/.bashrc
. ~/.bashrc
pgo
# ~/.pgo/pgo/pgo show

Install client

https://github.com/jeremybusk/k8s-zabbix-deploy/blob/main/pgo/install-pgo.sh

kubectl -n pgo port-forward svc/postgres-operator 8443:8443

pgo create cluster hostcmd --service-type=NodePort --replica-count=2 --pod-anti-affinity=required

psql -h kub1 -U testuser -p 317xx -d postgres 

pgo create pgadmin -n pgo hostcmd

https://access.crunchydata.com/documentation/postgres-operator/latest/quickstart/

https://access.crunchydata.com/documentation/postgres-operator/latest/

https://access.crunchydata.com/documentation/postgres-operator/4.6.2/architecture/high-availability/

https://www.crunchydata.com/developers/download-postgres/containers/postgres-operator

Expose api

microk8s.kubectl port-forward -n pgo svc/postgres-operator 8443:8443

Run some commands

pgo create cluster hippo
pgo show cluster -n pgo --all
pgo show user hippo --show-system-accounts
pgo create cluster hacluster --replica-count=2 --pod-anti-affinity=preferred --pgbouncer