Industrial PostgreSQL Christoph Mnch-Tegeder 2ndQuadrant - - PowerPoint PPT Presentation

industrial postgresql
SMART_READER_LITE
LIVE PREVIEW

Industrial PostgreSQL Christoph Mnch-Tegeder 2ndQuadrant - - PowerPoint PPT Presentation

Industrial PostgreSQL Christoph Mnch-Tegeder 2ndQuadrant http://www.2ndquadrant.com/ 2018-10-25 Introduction Consultant with 2ndQuadrant Based out of Karlsruhe, Germany Travelling and visiting customers This Customer. . . No


slide-1
SLIDE 1

Industrial PostgreSQL

Christoph Mönch-Tegeder

2ndQuadrant http://www.2ndquadrant.com/

2018-10-25

slide-2
SLIDE 2

Introduction

◮ Consultant with 2ndQuadrant ◮ Based out of Karlsruhe, Germany ◮ Travelling and visiting customers

slide-3
SLIDE 3

This Customer. . .

◮ No Names, please! ◮ well-established company ◮ world-wide presence

slide-4
SLIDE 4

This Customer: History

◮ in business: longer than any of us

◮ before IT was invented

◮ uses IT longer than PostgreSQL exists

slide-5
SLIDE 5

This Customer: Numbers

◮ employees: about 300000 ◮ revenue: some 100 Billion Euros

◮ enough for a small country

slide-6
SLIDE 6

What’s their Business?

Every business, regardless of what business they think they’re in, is an IT company.

Christopher Little (link not found)

◮ some actively ignore reality

slide-7
SLIDE 7

Their Business

slide-8
SLIDE 8

What’s Running?

◮ Lots of Linux ◮ Uses several commercial (closed-source) databases ◮ And Now: PostgreSQL officially supported

slide-9
SLIDE 9

Tons of Documentation

◮ Need to have operating concepts ◮ Special packaging process ◮ OS setup, file system layout, Linux users, . . . ◮ PostgreSQL configuration, extensions, . . . ◮ Backup and recovery strategies

slide-10
SLIDE 10

Tons of Documentation

◮ Need to have operating concepts ◮ Special packaging process ◮ OS setup, file system layout, Linux users, . . . ◮ PostgreSQL configuration, extensions, . . . ◮ Backup and recovery strategies ◮ A good stack of documents

slide-11
SLIDE 11

Security Framework

◮ Hardening Technical Controls ◮ Security checklist from Corporate IT

◮ Relevant configuration parameters ◮ SSL ciphers and certificates ◮ Schema hardening (REVOKE ALL PRIVILEGES FROM PUBLIC)

slide-12
SLIDE 12

Security Framework

◮ Hardening Technical Controls ◮ Security checklist from Corporate IT

◮ Relevant configuration parameters ◮ SSL ciphers and certificates ◮ Schema hardening (REVOKE ALL PRIVILEGES FROM PUBLIC)

◮ Mostly Common Sense

slide-13
SLIDE 13

Role Concept

◮ SUPERUSER not for end-users ◮ Group Roles with Default Privileges

◮ Schema Owners, for DDL ◮ Application Users, data r/w ◮ Read Only access

◮ Login Roles are assigned to the groups

slide-14
SLIDE 14

Landscape

◮ One Company, many data centers ◮ High degree of autonomy ◮ Central IT defines some standards

◮ Approves technology for different kinds of applications

slide-15
SLIDE 15

Corporate Guidelines

◮ Virtual Competence Team ◮ Committee formed by stakeholders ◮ Defines corporate standards ◮ Long-term planning

slide-16
SLIDE 16

Building a PostgreSQL Service

◮ Largest and most complex data center ◮ Traditional, Iron Age organisation ◮ Their Service Managers, Project Managers ◮ Contractors handling the products ◮ Operations outsourced & offshored ◮ Tickets for Everything

slide-17
SLIDE 17

Infrastructure

◮ Everything running on vmware ◮ The infrastructure rocks

# dd if=/dev/zero of=/dev/sdb1 bs=1M count=270000 270000+0 records in 270000+0 records out 283115520000 bytes (283 GB, 264 GiB) copied, 465.113 s, 609 MB/s

◮ Backups on IBM Spectrum Protect (TSM)

slide-18
SLIDE 18

Backup

◮ TSM is a must here

◮ base backup and archive, then let TSM backup that ◮ use barman, then backup barman ◮ special TSM agent: Repostor Data Protector

slide-19
SLIDE 19

Backup

◮ TSM is a must here

◮ base backup and archive, then let TSM backup that ◮ use barman, then backup barman ◮ special TSM agent: Repostor Data Protector

◮ Repostor Licence already bought by Backup Team ◮ so we have to use it (but it works!)

slide-20
SLIDE 20

How To PostgreSQL?

◮ Detailed Work Instructions

◮ CPU, RAM, storage specified by customer ◮ users, package installation, initdb, configuration ◮ backup configuration (TSM!) ◮ everthing as a ticket

slide-21
SLIDE 21

How To PostgreSQL?

◮ Detailed Work Instructions

◮ CPU, RAM, storage specified by customer ◮ users, package installation, initdb, configuration ◮ backup configuration (TSM!) ◮ everthing as a ticket

◮ Thanks, but No Thanks.

slide-22
SLIDE 22

Solution 1: Standardize Everything

◮ Standards for

◮ PostgreSQL configuration ◮ Linux configuration ◮ VMs (CPU, RAM) and Storage ◮ Authentication (use Active Directory)

◮ 4 Standard Sizes: S, M, L, XL (T-Shirt Sizes)

slide-23
SLIDE 23

Can We Script it?

◮ This is Linux, so we have shell?

Your simple script is someone else’s bad day

Rachel Kroll, http: // rachelbythebay. com/ w/ 2013/ 08/ 01/ script/

slide-24
SLIDE 24

Solution 2: Configuration Management

◮ Declarative System (just like SQL) ◮ Describe the desired System state ◮ Configuration Management executes any required changes ◮ Idempotency: subsequent invocations result in the same state

slide-25
SLIDE 25

Saltstack

◮ OS Team already uses Saltstack for initial configuration ◮ No central server (at first) ◮ Salt-States packaged and distributed as RPM ◮ Some scripting still required

◮ Test VM for compliance ◮ Write Salt grains

slide-26
SLIDE 26

Some Hacking Ensued. . .

◮ Initial setup and configuration ◮ SSL certificates (self-signed) ◮ Configuration changes ◮ Role management (add/remove) ◮ Software updates

slide-27
SLIDE 27

Some Pain Remains

◮ register database with TSM

◮ TSM is another team

◮ real centrally signed SSL certificates

◮ infrastructure not there (yet)

slide-28
SLIDE 28

Communications

◮ So many different roles

◮ Technology Partner, Business Partner, Technical Project Lead,

Service Team, Supplier, Operations, VCT

◮ Each and Every service

◮ Highly regulated communications ◮ Long cycle times, Chinese Whispers

slide-29
SLIDE 29

Infrastructure

◮ Building Infrastructure is about removing options ◮ Provide working and manageable solutions ◮ Variance across systems makes mass-management hard ◮ But: too many restrictions make the service unattractive

slide-30
SLIDE 30

Staying Ahead

◮ Find users and talk to them!

◮ Organisations sometimes make that harder than it should be

◮ Bring user feedback to Technology Management ◮ Coordinate with other Services

slide-31
SLIDE 31

What We Learned

◮ Make extra efforts to create communication channels ◮ Large organizations move slowly ◮ Patience: many people involved, much communication ◮ Work with the Operations Team (not against)! ◮ First few servers require extra care

slide-32
SLIDE 32

What They Learned

◮ Automation: much more than scripts ◮ Iterative Approaches are a Good Thing ◮ Building new services is not running a well-known service

slide-33
SLIDE 33

Questions?

slide-34
SLIDE 34

Thank You