Containers Demystified DOAG 2019

Daniel Westermann - Jan Karremans AGENDA

Intro History of containers What happened to ?? History k8s WHY Automation of the stuff Demo Intro

…boring About me

Daniel Westermann Principal Consultant Open Infrastructure Technology Leader

+41 79 927 24 46 daniel.westermann[at]dbi-services.com

EDB containers in Red Hat OpenShift 19.11.2019 Page 4 Who we are

The Company Founded in 2010 More than 70 specialists Specialized in the Middleware Infrastructure The invisible part of IT Customers in Switzerland and all over Europe

Our Offer Consulting Service Level Agreements (SLA) Trainings License Management

dbi services Template - DOAG 2019 19.11.2019 Page 5 Jan Karremans @Johnnyq72

BACKGROUND 25 years of database technology 15 years of consulting 15 years of management 10 years of software development 10 years of technology sales 5 years of community advocacy 5 years of international public speaking

EXPERTISE Oracle ACE Alumni EDB Postgres Advanced Server Professional Leader in the PostgreSQL community

To Postgres what RedHat is to

EnterpriseDB Enterprise-grade Postgres The Most Complete Open Source Database Platform Freeing companies from vendor lock-in • Bruce Momjian • PostgreSQL, Global Development Group, Founding member • PostgreSQL, Core Team member • EnterpriseDB, Senior Database Architect • Mr. Postgres

History of containers In the beginning

• It was 1960… Bill Joy Co-founder of Sun Microsystems • Sharing 1 single computer with many users

• It was then 1979…

• Introducing

• Bill Joy added chroot to Unix 7 in March / ’82

• Then it was 1990

• Crackers aren’t hackers William (Bill) Cheswick • Bill Cheswick creates the foundations for jail

11 chroot

• Create a new root-directory for the current running process and offspring

• Basic ”isolation” for processes

• Quite easy to “escape” from

12 jail

• Made usable on FreeBSD

• Partitions a computer into independent mini-systems

• Adding and better security to a system

13 In more recent years

• It became a new millenium

• The jail-command gets the ability to add an IP address and custom configuration

• And now it goes fast, 2004

• Solaris introduces containers (!) by using Solaris Zone technology

• 2006, we write…

• Google launches for isolation and limitation of resource usage

• Actually frantically trying to avoid the word “Container”!

14 “Today”

• Calendar flips to 2008

• cgroups becomes LCX (Linux Containers) as part of the kernel.

• Meanwhile we land in 2013

• Google launches the open source project LMCTFY

• LMCTFY is contributed to the Docker project libcontainer.

• Docker Hub is now home to over 100,000 container images

• Many repositories available (RedHat, openSuse, Quai.io, amm)

15 So…

• A container runs until it dies.

• It fails over

• Or it restarts

• It is effectively “built to break”

• “The avalange has already started, it’s too late for the pebbles to vote.”

• Kosh, Babylon 5, “Believers”-episode

Mr. Michael Willer - EDB

16 What happened to Docker?? Docker Swarm

• Docker Compose

• Defining and running Docker multi-container setup (services)

• Docker Swarm

• Docker container orchestration software

18

History of K8s A short history

• There was Google

• Based on the Google Borg Cluster Manager

or k8s was originally code-named…

• Google & form Cloud Native Computing Foundation [CNCF]

21 k8s

• Written in Go

• Pods Logical group of containers

• Replica sets Set of instantiations of a specific Pod

• Services Logical group of kinned Pods

• Volumes Persistent storage

• Namespaces Partitioning for dev / test / prod

• Configmaps & secrets Configuration data for the pods

• Stateful sets Enable stateful workloads… like Postgres

22

WHY

Big things in little containers

Perspectives

• Business • Operations

• Increase compute density • Manageability

• Standardization • Automation

• Idempotence

• Development • Portability

• Flexibility & agility !!

26 Automation of the stuff Why is it important

• Lots of repetitive tasks

• Everything is aimed at similarity

28 Why databases in containers Top 3 reasons from the field

Laetitia Avrot, Postgres expert and Senior Database Consultant at EnterpriseDB: Instantaneous online physical backup with snapshots (made possible thanks to the “pausing PID1 on my container”, something you won’t find with VM) Physical streaming replication by mirroring storage. That’s easy to implement and again, the “pausing PID1 on my container” makes it possible without corruption risk Simplified high availability as a container only stores processes and memory, if it dies, it can “say” it and another container will take it from here. Switchover and failover are way quicker

29 When not to containerize

• Just for the sake of…

• Wishing for miraculous advantages

• To become agile

• Implementing containers does not make it micro services

30 And now we stop talking… Questions & Answers

CONFIDENTIAL © Copyright EnterpriseDB Corporation, 2019. All rights reserved.