Skip to content

cybertec-postgresql/CYBERTEC-pg-container

Repository files navigation

CYBERTEC-pg-container: PostgreSQL-HA-Cluster based on Rocky-Linux

CYBERTEC-pg-container is a Docker suite that combines PostgreSQL, Patroni and etcd to create HA-PostgreSQL clusters based on containers. This suite is also the imagebase for the CYBERTEC-pg-operator(cpo).

Documentation

See the documentation for some examples of how to run this suite in Docker, Kubernetes or Kubernetes-based environments.

Operational area

These images can run locally on Docker, Kubernetes or on Kubernetes-based environments such as Openshift or Rancher. On Kubernetes and Kubernetes-based environments, the image uses the k8-etcd, otherwise etcd is included locally in the image

Build Images

To create the images via Makefile, you need the following environment variables and Go on your system.

export GOPATH=$HOME/cdev
export GOBIN=$GOPATH/bin
export CCPROOT=$GOPATH/src/github.com/cybertec/cybertec-pg-container
export PATH=$PATH:$GOBIN
export BASE_IMAGE=rockylinux:9
export IMAGE_REPOSITORY=docker.io
export BASEOS=rocky9
export PACKAGER=dnf
export CONTAINERSUITE=cybertec-pg-container
export PGBACKREST_VERSION=2.50
export PATRONI_VERSION=3.2.2
export PG_MAJOR=16
export PG_VERSION=16.2
export OLD_PG_VERSIONS="13 14 15"
export POSTGIS_VERSION=34
export BUILD=1
export ARCH=x86_64

You can build all images with make - make all - make base/postgres/pgbackrest

Run Images locally:

docker run -it IMAGEPATH:IMAGETAG

Take a look inside:

docker exec -it CONTAINERID /bin/bash