Crunchy PostgreSQL Containers
v1.2.7, 2024-01-01
Crunchy Container Suite provides Docker containers that enable rapid deployment of PostgreSQL, including administration and monitoring tools. Multiple styles of deploying PostgreSQL clusters are supported.
The containers will execute in the following environments:
-
Docker 1.12
-
Openshift 3.3
-
Kubernetes 1.5
The project includes the following containers:
-
crunchy-postgres - executes Postgres
-
crunchy-postgres-gis - executes Postgres plus the PostGIS extensions
-
crunchy-backup - performs a full database backup
-
crunchy-pgpool - executes pgpool
-
crunchy-pgbadger - executes pgbadger
-
crunchy-watch - performs a form of automated failover
-
crunchy-collect - collects Postgres metrics
-
crunchy-prometheus -stores Postgres metrics
-
crunchy-grafana - graphs Postgres metrics
-
crunchy-dns - standalone DNS server useful for standalone execution
-
crunchy-pgbouncer - pgbouncer connection pooler and simple form of failover
-
crunchy-pgadmin4 - pgadmin4 web application
-
crunchy-dba - implements a cron scheduler to perform simple DBA tasks
Build Prerequisites
The Crunchy containers have been tested on Centos 7, RHEL 7, Openshift 3.3, Kubernetes 1.5.1, and Docker 1.12
1) Installing / configuring Docker
On an EL7 system, docker can be installed with the following commands:
-
sudo yum -y install docker
-
sudo groupadd docker
-
sudo usermod -a -G docker ${USER}
-
sudo systemctl enable docker;systemctl start docker
-
TIP: remember to log out $USER for the docker group to take effect!
2) Building the Containers (Optional)
If you don’t want to pull the containers from DockerHub, you can perform a build of all the containers locally on your development host.
Complete build and install documentation is found here: Install Docs. The provided Dockerfiles build the containers on a Centos 7 base image and use the community PostgreSQL RPMs.
Crunchy provides a commercially supported version of these containers built upon RHEL 7 and the Crunchy supported PostgreSQL. Contact Crunchy for more details at link:http://www.crunchydata.com.
Examples
Various examples are provided in the /examples directory and described in the documentation for running Docker, Kubernetes, and Openshift examples..
See the following link for documentation on the docker examples: docker-examples
To run the examples, you will need to set the CCP_IMAGE_TAG environment variable which indicates which version of the container you will pull down and execute, for example:
export BUILDBASE=$HOME/crunchy-containers export CCP_IMAGE_TAG=centos7-9.5-1.2.7
The BUILDBASE is the location of where you cloned the containers github repository.
The CCP_IMAGE_TAG is the version of the container you want to test with. That version is out on Dockerhub.