0% found this document useful (0 votes)
29 views19 pages

PostgreSQL in Containers at Scale

The document discusses containers, Kubernetes, and using PostgreSQL in OpenShift containers at scale. It provides an introduction to containers and orchestration with Kubernetes and demonstrates scaling PostgreSQL deployments on OpenShift through examples and a demo of building and deploying PostgreSQL containers on OpenShift.

Uploaded by

talker8432
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views19 pages

PostgreSQL in Containers at Scale

The document discusses containers, Kubernetes, and using PostgreSQL in OpenShift containers at scale. It provides an introduction to containers and orchestration with Kubernetes and demonstrates scaling PostgreSQL deployments on OpenShift through examples and a demo of building and deploying PostgreSQL containers on OpenShift.

Uploaded by

talker8432
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

PostgreSQL in Containers at Scale

Presented by:

Steven Pousty @TheSteve0


and
Jeff McCormick
Goals
● Introduction to containers, kubernetes, and
OpenShift
● Watch the easiest replication and scaling in
your life
PaaS

openshift.com
Defining Containers

■ In Docker parlance, a container is a running


instance of an image
■ Based on Linux containers (namespaces,
control groups)
■ Combines file system layers into a "Union File
System"
■ Includes all of the components necessary to
run a process, store persistent data, or both

openshift.com
Containers

openshift.com
Containers are Not
Enough
Orchestration,
Scheduling, Isolation are
Still Needed
History
● Comes out of Borg and Omega
● ~7000 containers a second inside Google
● Next iteration they wanted to Open Source
BUT...
Developer Experience,
Managing Applications,
And SysAdmin
Experience
Deployment
Source To Image Configuration Integrated Docker
(S2I) Registry

Build Replication
Image Stream
Configuration Controller

Persistent Pods
Volumes Pieces
and
Services Routes
Relations
SDN
OpenShift Demo
● Postgresql 9.4 + PostGIS Container at https://github.com/CrunchyData/crunchy-postgres-container-94
● Example of OpenShift templates - replication controller, standalone
● Volumes - emptyDir and NFS
● OpenShift console
Build Example
● requires docker is installed, builds a Centos7 or RHEL 7 docker image
mkdir test
git clone [email protected]:CrunchyData/crunchy-postgres-container-94.git
cd crunchy-postgres-container-94
make
● install openshift (see openshift/origin github project for details)
cd crunchy-postgresql-container-94/openshift
oc login <<username is test, password is test>>
oc new-project pgproject
oc process -f standalone.json | oc create -f -
oc get pods
oc get services
● https://localhost:8443
ping pg-standalone.pgproject.svc.cluster.local
Crunchy PostgreSQL Manager Demo
● Uses Docker for provisioning
● golang + angular.js + PostgreSQL 9.4
● multi-host
● Prometheus, monitoring
● extensible
● open-sourced at https://github.com/CrunchyData/crunchy-postgresql-manager
● creating a port to OpenShift
[email protected]
CPM Architecture
pg
9.4 pg
pg 9.4
cpm cpm-admin (REST)
(web) 9.4
pg
pg 9.4
Postgresql 9.4 9.4
(metadata)
pg
9.4

cpm-backup cpm-collect
(daemon) (daemon)

cpm-promdash
(web) cpm-prometheus
(web/datastore)
Community Powered Innovation

openshift.com
18
Take homes
● We are in a time of explosion
● Kubernetes And OpenShift get you beyond
containers
● There is a long runway in front of V3.
● Upstream FIRST!!!

You might also like