galera with docker: how synchronous replication and linux containers mesh together

27
Galera with Docker How Synchronous Replication and Linux Containers mesh together Linux.conf.au 2015 Raghavendra Prabhu [email protected] Percona [email protected] randomsurfer wnohang.net rdprabhu ronin13

Upload: raghavendra-prabhu

Post on 16-Jul-2015

343 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Galera with DockerHow Synchronous Replication and Linux

Containers mesh togetherLinux.conf.au 2015

Raghavendra Prabhu [email protected]

Percona [email protected] randomsurfer wnohang.net rdprabhu ronin13

Page 2: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Galera

Page 3: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Galera

▶ Data-centric approach▶ EVS▶ Causality and Synchronous▶ Latency

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 3 / 27

Page 4: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Containers!

Page 5: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Containers

▶ Linux namespaces♦ PID♦ Network♦ Mount♦ User

▶ Cgroups♦ Metrics♦ Good fences make good neighbors!

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 5 / 27

Page 6: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Containers

▶ Manipulation♦ nsenter/setns♦ unshare♦ clone

▶ CRIU- Migration and High Availability

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 6 / 27

Page 7: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

The uptime whale!

Page 8: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Docker

▶ Layers▶ Volumes▶ Storage

♦ Btrfs♦ Device mapper♦ Union mounts - OverlayFS

▶ Dockerfile and determinism▶ Simplified networking

♦ Batteries included!

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 8 / 27

Page 9: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Symmetry in replication anddeployment

Page 10: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Together

▶ Elastic requirements▶ Fast scalability▶ Packing for saturation

♦ Strategies/Filters/Metadata♦ KSM

▶ Snapshot Transfer and COW▶ Runtime instantiation

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 10 / 27

Page 11: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Together :: Images

▶ Build and start♦ Minimal♦ Inheritance♦ Extensibility♦ Immutability♦ Registry: go get!

▶ Minimal Assumptions▶ Galera images

♦ http://github.com/percona/pxc-docker♦ https://hub.docker.com/u/ronin/

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 11 / 27

Page 12: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Together :: Networking

▶ Linking▶ Dnsmasq▶ Weave▶ libswarm▶ OVS▶ Andromeda

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 12 / 27

Page 13: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Together :: Networking :: Issues

▶ IP address and restart▶ dhcpcd▶ Socket interface▶ Linking

♦ Patterns▶ Kernel ABI

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 13 / 27

Page 14: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Together :: Use cases

▶ Testing- https://github.com/percona/pxc-docker/tree/master/chaos-galera

▶ Benchmarking▶ Production Deployment▶ Rolling Upgrades▶ Rapid Development

♦ https://github.com/percona/pxc-docker/tree/master/docker-bld

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 14 / 27

Page 15: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Together :: Patterns

▶ Systemd and Docker▶ Packaging testing▶ Management of process

♦ Supervisor pattern

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 15 / 27

Page 16: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Orchestration

Page 17: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Orchestration

▶ Fig && Docker Compose♦ Limitations

▶ Mesos and Docker swarm▶ Flannel and Kubernates

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 17 / 27

Page 18: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Container deployment

Page 19: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Deployment

▶ Amazon EC2▶ Google Container Engine▶ Azure▶ DigitalOcean▶ Joyent SmartCloud▶ Virtual Machines

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 19 / 27

Page 20: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Who contains the containers?

Page 21: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Environment

▶ Project Atomic: rpm-ostree▶ Snappy▶ CoreOS▶ Apache Mesos▶ Docker swarm

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 21 / 27

Page 22: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Environment :: CoreOS

▶ Systemd integration▶ etcd - Raft▶ fleet▶ Bootstrapping and voting

♦ Queues♦ Test and Set♦ TTL and Watch♦ Sidekicks

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 22 / 27

Page 23: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Others

▶ lxc/lxd▶ systemd-nspawn▶ Rocket

♦ App Container Specification

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 23 / 27

Page 24: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

What you see is whatyou get to attack

Page 25: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Security

▶ sVirt▶ seccomp▶ Visibility: Namespaces▶ Capabilities / Privileged▶ Verifiability upto bare-metal▶ Remote images

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 25 / 27

Page 26: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

About

▶ /me: Raghavendra Prabhu, Product Lead, Percona XtraDBCluster, Percona.

▶ Slides will be at slideshare.net/slidunder.▶ About.me: raghavendra.prabhu▶ Keybase.io: rdprabhu▶ Presentation under CC BY-SA 4.0

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 26 / 27

Page 27: Galera with Docker: How Synchronous Replication and Linux Containers mesh together

Introduction

Image Credits▶ https://commons.wikimedia.org/wiki/File:

Venice_galley,_rowing_alla_sensile2.jpg▶ https://commons.wikimedia.org/wiki/File:ShippingContainerSFBay.jpg▶ https://www.flickr.com/photos/stephanie_in_love/5412368995/▶ http://en.wikipedia.org/wiki/Orchestra▶ https://www.google.com/hostednews/getty/article/ALeqM5ht_B847adBMPN2_

8ivClssq937Eg?docId=164893212▶ http://pixabay.com/en/container-port-hamburg-49538/▶ https://i.ytimg.com/vi/Q5POuMHxW-0/maxresdefault.jpg▶ https://upload.wikimedia.org/wikipedia/commons/e/e6/Order-3_heptakis_

heptagonal_tiling.png

Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 27 / 27