PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff...
Transcript of PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff...
![Page 1: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/1.jpg)
PostgreSQL in Containers at ScalePresented by:
Steven Pousty @TheSteve0
and
Jeff McCormick
![Page 2: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/2.jpg)
Goals
● Introduction to containers, kubernetes, and OpenShift
● Watch the easiest replication and scaling in your life
![Page 3: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/3.jpg)
openshift.com
PaaS
![Page 4: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/4.jpg)
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
![Page 5: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/5.jpg)
openshift.com
Containers
![Page 6: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/6.jpg)
Containers are Not Enough
![Page 7: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/7.jpg)
Orchestration, Scheduling, Isolation are
Still Needed
![Page 8: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/8.jpg)
![Page 9: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/9.jpg)
History
● Comes out of Borg and Omega● ~7000 containers a second inside Google● Next iteration they wanted to Open Source
![Page 10: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/10.jpg)
BUT...
![Page 11: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/11.jpg)
Developer Experience, Managing Applications,
And SysAdmin Experience
![Page 12: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/12.jpg)
![Page 13: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/13.jpg)
Pods
Services Routes
SDN
Replication Controller
DeploymentConfiguration
Build Configuration Image Stream
Source To Image (S2I)
Integrated Docker Registry
Pieces and
Relations
Persistent Volumes
![Page 14: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/14.jpg)
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
![Page 15: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/15.jpg)
Build Example● requires docker is installed, builds a Centos7 or RHEL 7 docker image
mkdir testgit clone [email protected]:CrunchyData/crunchy-postgres-container-94.gitcd crunchy-postgres-container-94make
● install openshift (see openshift/origin github project for details)cd crunchy-postgresql-container-94/openshiftoc login <<username is test, password is test>>oc new-project pgprojectoc process -f standalone.json | oc create -f -oc get podsoc get services
● https://localhost:8443ping pg-standalone.pgproject.svc.cluster.local
![Page 16: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/16.jpg)
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]
![Page 17: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/17.jpg)
CPM Architecture
cpm (web)
cpm-admin (REST)
cpm-backup(daemon)
cpm-collect (daemon)
cpm-prometheus(web/datastore)
Postgresql 9.4(metadata)
cpm-promdash(web)
pg 9.4
pg 9.4
pg 9.4
pg 9.4
pg 9.4
pg 9.4
![Page 18: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/18.jpg)
openshift.com18
Community Powered Innovation
![Page 19: PostgreSQL in Containers at Scale · PostgreSQL in Containers at Scale Presented by: ... Jeff McCormick . Goals Introduction to containers, kubernetes, and OpenShift Watch the easiest](https://reader034.fdocuments.net/reader034/viewer/2022042219/5ec56fd0c82f0c182427b1e8/html5/thumbnails/19.jpg)
● 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!!!
Take homes