galera with docker: how synchronous replication and linux containers mesh together
Post on 16-Jul-2015
343 Views
Preview:
TRANSCRIPT
Galera with DockerHow Synchronous Replication and Linux
Containers mesh togetherLinux.conf.au 2015
Raghavendra Prabhu raghavendra.d.prabhu@gmail.com
Percona raghavendra.prabhu@percona.com randomsurfer wnohang.net rdprabhu ronin13
Galera
Introduction
Galera
▶ Data-centric approach▶ EVS▶ Causality and Synchronous▶ Latency
Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 3 / 27
Containers!
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
Introduction
Containers
▶ Manipulation♦ nsenter/setns♦ unshare♦ clone
▶ CRIU- Migration and High Availability
Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 6 / 27
The uptime whale!
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
Symmetry in replication anddeployment
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
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
Introduction
Together :: Networking
▶ Linking▶ Dnsmasq▶ Weave▶ libswarm▶ OVS▶ Andromeda
Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 12 / 27
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
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
Introduction
Together :: Patterns
▶ Systemd and Docker▶ Packaging testing▶ Management of process
♦ Supervisor pattern
Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 15 / 27
Orchestration
Introduction
Orchestration
▶ Fig && Docker Compose♦ Limitations
▶ Mesos and Docker swarm▶ Flannel and Kubernates
Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 17 / 27
Container deployment
Introduction
Deployment
▶ Amazon EC2▶ Google Container Engine▶ Azure▶ DigitalOcean▶ Joyent SmartCloud▶ Virtual Machines
Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 19 / 27
Who contains the containers?
Introduction
Environment
▶ Project Atomic: rpm-ostree▶ Snappy▶ CoreOS▶ Apache Mesos▶ Docker swarm
Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 21 / 27
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
Introduction
Others
▶ lxc/lxd▶ systemd-nspawn▶ Rocket
♦ App Container Specification
Raghavendra Prabhu (Percona) Galera with Docker 12 January, 2015 23 / 27
What you see is whatyou get to attack
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
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
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
top related