SlideShare a Scribd company logo
MariaDB + Docker
From Development to
Production
Conclusion
Containers + Databases = Happy Developers
Ephemeral Containers + Databases = DevOps headaches
4 Things you must use to evaluate
• Data Durability & Redundancy
• Dynamic Self Discovery & Cluster formation
• Self Healing (as containers enter and leave)
• Application Tier discovery of Database Cluster
Part One
Where are we now
We’re building a database that is
easy to use, easy to extend, and easy to deploy:
on premise, in the cloud, or hybrid, operational or analytical
– and with the languages and frameworks you prefer.
Existing Deployment Models Are Broken
Version
control
1. Development 2. Test 3. Stage / Production
Developer QA / QE Sysadmin
Architectures Are Complex & Static
Challenges
• Orchestration
• Complexity
• Maintainability
• Durability
• Consistency
• Scalability
• Cost ($)
• (Hybrid) CloudEnterprise Environment
Legacy Mainframe
Operational Database
Caching Layer
Pricing /
Inventory /
Billing
Real-time
Decisioning
Real-time
Consumer
facing
Streaming
Data
Data Warehouse
Data Lake
RDBMS Transactional
Systems
Part 2
Containers
What do Containers give me?
Encapsulation of Dependencies
• O/S packages & Patches
• Execution environment (e.g. Python 2.7)
• Application Code & Dependencies
Process Isolation
• Isolate the process from anything else running
Faster, Lightweight virtualization
Virtual Machines vs. Containers
App 1 App 2 App 3
Bins/Libs Bins/Libs Bins/Libs
Guest OS Guest OS Guest OS
Hypervisor
Host Operating System
Infrastructure
Docker Engine
Operating System
Infrastructure
App 1 App 2 App 3
Bins/Libs Bins/Libs Bins/Libs
Dockerfile - Example
FROM python:2.7
ADD . /code
WORKDIR /code
RUN apt-get update && apt-get -y install python-dev libssl-dev
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 5000
CMD python app.py
Open Container Initiative (OCI) – Polyglot Vendors
Coalition of industry leaders join forces to eliminate fragmentation
• Form a vendor-neutral, open source governance model under the Linux Foundation
• Establish common standards for container format and runtime
• Docker donated its container format, runtime and associated specifications
• Appoint maintainers for the libcontainer project
Docker Toolchain in pictures
Machine provisions
Docker Engines
Swarm clusters
Docker Engines
Compose orchestrates
Container deployment
Containers instantiate an
image and are run by
Docker Engine
Docker Machine Docker Compose
Docker Swarm
Docker Engine
Image
Images encapsulates your
code, dependencies…
What about orchestration and Management?
Orchestration and Management of Containers and higher-level
constructs (services, deployments, etc….) is evolving
Amazon ECS
Google Container
Engine
Azure Container
Service
Part 3
Databases & Docker
Requirements
Data Redundancy
• Containers are Ephemeral – Need more than one copy of the data
Dynamic Self Discovery & Cluster formation
• Need to start and stop Containers when needed
• Clusters needs to grow and shrink dynamically
Self Healing
• Loss of nodes must not be fatal to the cluster integrity
• Addition of nodes must scale capacity
Application Tier discovery of Database Cluster
• Automatic discovery of nodes
• Automatic routing of requests to the correct nodes
Part Four
MariaDB
MARIADB SERVER
Enterprise-grade secure,
highly available and
scalable relational database
with a modern, extensible
architecture
MARIADB MAXSCALE MARIADB CLUSTER
Next-generation database
proxy that manages security,
scalability and high availability
in scale-out deployments
Multi-Master, synchronous
replication - improves
availability and scales
reads and writes
MariaDB Portfolio
Max
Scale
MariaDB Cluster
Multi-Master
• Synchronous replication
Faster Failover
• All nodes synchronized,
therefore equal
Scale reads and writes
MariaDB
MariaDB
MariaDB
Load Balancing
and Failover
Application /
App Server
MaxScale + Galera
Use Case
Each application server
uses only 1 connection
MaxScale selects one node
as “master” and the other
nodes as “slaves”
If the “master” node fails,
a new one can be elected
immediately
Galera Cluster + R/W split routing
Max
Scale
Part Five
Demo
Demo: Development Through Production
Development
• Build & Run an App in Development
– Python + MariaDB
Production
• Deploy to a Swarm cluster in Production
• Scale Web nodes
– Add more Web containers behind HAProxy
• Database High Availability
– Deploy 3 nodes Galera cluster
– Deploy 2 node MaxScale
Python / Flask
Let’s Build An App!
Development
app
Production
Virtual
IP
Virtual
IP
MaxScale 1 MaxScale 2
HAProxy
1 2 3
Then Scale in Production...
Development
app
app1 app2 app3 app4 appN
Demo 1
Build an Application
Dockerfile
FROM python:2.7
RUN apt-get update && apt-get -y install python-dev libssl-dev
WORKDIR /app
RUN pip install Flask MySQL-python
ADD . /app
EXPOSE 5000
CMD ["python", "app.py"]
docker-compose.yml
services:
web:
build: .
ports:
- "5000:5000"
links:
- mariadb
hostname: dev.myapp.com
environment:
APP_MARIADB_HOST: dev_mariadb_1
APP_PASSWORD: foo
mariadb:
image: mariadb:10.1
environment:
MYSQL_ROOT_PASSWORD: foo
Roll The Application Behind Haproxy
Development
app
Production
Virtual
IP
Virtual
IP
MaxScale 1 MaxScale 2
HAProxy
1 2 3
app1
Scale the Application Tier
Development
app
Production
Virtual
IP
Virtual
IP
MaxScale 1 MaxScale 2
HAProxy
1 2 3
app1 app2 app3 app4 appN
Docker Networking
Docker Host (swarm-2)
MaxScale
Container
Endpoint
Docker Host (swarm-3)
MariaDB
Container
Endpoint
“Bridge” Network
“Prod” Overlay Network
Docker Host (swarm-1)
App
Container
Endpoint
Docker Host (swarm-0)
HAProxy
Container
Endpoint Endpoint
Docker Networking
$ docker network create -d overlay --attachable myapp_back
$ cat docker-compose.stack.yml
...
networks:
front:
back:
external:
name: myapp_back
Secrets… Opppsss
services:
web:
build: .
ports:
- "5000:5000"
links:
- mariadb
hostname: dev.myapp.com
environment:
APP_MARIADB_HOST: dev_mariadb_1
APP_PASSWORD: foo
mariadb:
image: mariadb:10.1
environment:
MYSQL_ROOT_PASSWORD: foo
Docker secrets
$ cat docker-compose.stack.yml
...
secrets:
app_password:
file: ./app_password.txt
mariadb_root_password:
file: ./mariadb_password.txt
xtrabackup_password:
file: ./xtrabackup_password.txt
$ more ./app_password.txt
appfoo
Demo 2
Scale Web Tier
haproxy & web services
services:
haproxy:
image: dockercloud/haproxy
networks:
- front
- back
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 80:80
deploy:
placement:
constraints: [node.role == manager]
web:
image: alvinr/demo-webapp-vote:mariadb
environment:
SERVICE_PORTS: "5000"
VIRTUAL_HOST: "prod.myapp.com"
APP_MARIADB_HOST: "maxscale"
APP_USER: "app"
APP_PASSWORD_FILE: "/run/secrets/app_password"
APP_DATABASE: "test"
networks:
- back
deploy:
placement:
constraints: [node.role != manger]
secrets:
- app_password
Demo 2
Harden Database Tier
MariaDB Galera Cluster
mariadb_cluster:
image: alvinr/mariadb-galera-swarm
environment:
...
NODE_ADDRESS: "eth0"
MYSQL_USER: "app"
MYSQL_DATABASE: "test"
MYSQL_PASSWORD_FILE:
"/run/secrets/app_password"
MAXSCALE_PRIVS: "true"
labels:
com.mariadb.cluster: "myapp-prod-cluster"
networks:
- back
command: seed
deploy:
replicas: 1
placement:
constraints:
[engine.labels.com.mariadb.cluster !=
myapp-prod-cluster]
secrets:
- mariadb_root_password
- xtrabackup_password
- app_password
MaxScale
maxscale:
image: alvinr/maxscale-swarm
...
labels:
com.mariadb.cluster: "myapp-maxscale"
networks:
- back
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
placement:
constraints: [engine.labels.com.mariadb.cluster != myapp-maxscale]
secrets:
- app_password
Part Six
Considerations & Conclusions
DNS RESOLUTION
• Docker assigns VIP to Service, each Task has
own IP
• nslookup, dig, getent etc.
3rd PARTY
• consul, etcd, zookeeper etc.
DOCKER EVENTS
• https://docs.docker.com/engine/
reference/api/docker_remote_api/
• Interlock -
ttps://github.com/ehazlett/interlock
Service Discovery - How to mesh nodes?
Storage: Inside or Outside the Container?
Inside
• Encapsulation
of Concerns
Outside
• Separation of Concerns
• Storage features (e.g. Snapshots)
• 3rd Party options
– NetApp, Google Compute Engine, Rancher Convoy
– Flocker
Host
Docker Daemon
Container
Docker Daemon
Container
/dev/xvdb
/mnt/xx:/var/lib/mysql
Networked
e.g. EBS
Volume
Local Disk e.g.
SSD / NVMe
Storage: Data Container?
Inside
• Managed like
other containers
• Special rule for
Destruction
• TBD: Performance
Host
Docker Daemon
Container
Docker Daemon
Container
--volumes-from
{container name}
Host
And...
• Swarm locking
• Image verification (trusted Images)
• AppArmor / Seccomp profiles
• Monitoring
• Heathchecks
• Rolling Upgrades
Summary
One Solution Development -> Production
• Define Images & Orchestration once
• Reuse when needed, inject required behaviours
MariaDB in Production with Docker
• Ops define the whitelisted images, security policies
• Dev approve images to build upon
• Eliminate complexity (and cost) of Deployment
• Scale easily, maintain SLA requirements of component
Thanks and Q&A
Code
• https://github.com/alvinr/docker-demo/tree/master/mariadb/vote
Docker Images
• https://hub.docker.com/_/mariadb/
MariaDB & Docker deployment guide
• https://mariadb.com/kb/en/mariadb/installing-and-using-mariadb-via-docker/
Thank you

More Related Content

What's hot

AWS database services
AWS database servicesAWS database services
AWS database services
Nagesh Ramamoorthy
 
The rise of microservices - containers and orchestration
The rise of microservices - containers and orchestrationThe rise of microservices - containers and orchestration
The rise of microservices - containers and orchestration
Andrew Morgan
 
AWS Cloud SAA Relational Database presentation
AWS Cloud SAA Relational Database presentationAWS Cloud SAA Relational Database presentation
AWS Cloud SAA Relational Database presentation
TATA LILIAN SHULIKA
 
Multitenant Full Deck Jan 2015 Cloud Team AJ Linkedin
Multitenant Full Deck Jan 2015 Cloud Team AJ LinkedinMultitenant Full Deck Jan 2015 Cloud Team AJ Linkedin
Multitenant Full Deck Jan 2015 Cloud Team AJ LinkedinArush Jain
 
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech TalksHow to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
Amazon Web Services
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Lucas Jellema
 
Azure and cloud design patterns
Azure and cloud design patternsAzure and cloud design patterns
Azure and cloud design patterns
Venkatesh Narayanan
 
NoSql presentation
NoSql presentationNoSql presentation
NoSql presentation
Mat Wall
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache
Amazon Web Services
 
Fault Tolerance with Kafka
Fault Tolerance with KafkaFault Tolerance with Kafka
Fault Tolerance with Kafka
Edureka!
 
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb Sharding
Araf Karsh Hamid
 
Power of OpenStack & Hadoop
Power of OpenStack & HadoopPower of OpenStack & Hadoop
Power of OpenStack & Hadoop
Tuan Yang
 
Intro to Apache Kafka
Intro to Apache KafkaIntro to Apache Kafka
Intro to Apache Kafka
Jason Hubbard
 
IBM Cloud Object Storage
IBM Cloud Object StorageIBM Cloud Object Storage
IBM Cloud Object Storage
Nagesh Ramamoorthy
 
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance DatabaseDay 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
Amazon Web Services
 
Responding to Digital Transformation With RDS Database Technology
Responding to Digital Transformation With RDS Database TechnologyResponding to Digital Transformation With RDS Database Technology
Responding to Digital Transformation With RDS Database Technology
Alibaba Cloud
 
Riak CS Build Your Own Cloud Storage
Riak CS Build Your Own Cloud StorageRiak CS Build Your Own Cloud Storage
Riak CS Build Your Own Cloud Storage
buildacloud
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheUnleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache
Amazon Web Services
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worlds
Andrew Morgan
 
M|18 Welcome Keynote
M|18 Welcome KeynoteM|18 Welcome Keynote
M|18 Welcome Keynote
MariaDB plc
 

What's hot (20)

AWS database services
AWS database servicesAWS database services
AWS database services
 
The rise of microservices - containers and orchestration
The rise of microservices - containers and orchestrationThe rise of microservices - containers and orchestration
The rise of microservices - containers and orchestration
 
AWS Cloud SAA Relational Database presentation
AWS Cloud SAA Relational Database presentationAWS Cloud SAA Relational Database presentation
AWS Cloud SAA Relational Database presentation
 
Multitenant Full Deck Jan 2015 Cloud Team AJ Linkedin
Multitenant Full Deck Jan 2015 Cloud Team AJ LinkedinMultitenant Full Deck Jan 2015 Cloud Team AJ Linkedin
Multitenant Full Deck Jan 2015 Cloud Team AJ Linkedin
 
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech TalksHow to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
How to Migrate from Cassandra to Amazon DynamoDB - AWS Online Tech Talks
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
 
Azure and cloud design patterns
Azure and cloud design patternsAzure and cloud design patterns
Azure and cloud design patterns
 
NoSql presentation
NoSql presentationNoSql presentation
NoSql presentation
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache
 
Fault Tolerance with Kafka
Fault Tolerance with KafkaFault Tolerance with Kafka
Fault Tolerance with Kafka
 
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb Sharding
 
Power of OpenStack & Hadoop
Power of OpenStack & HadoopPower of OpenStack & Hadoop
Power of OpenStack & Hadoop
 
Intro to Apache Kafka
Intro to Apache KafkaIntro to Apache Kafka
Intro to Apache Kafka
 
IBM Cloud Object Storage
IBM Cloud Object StorageIBM Cloud Object Storage
IBM Cloud Object Storage
 
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance DatabaseDay 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
Day 2 - Amazon RDS - Letting AWS run your Low Admin, High Performance Database
 
Responding to Digital Transformation With RDS Database Technology
Responding to Digital Transformation With RDS Database TechnologyResponding to Digital Transformation With RDS Database Technology
Responding to Digital Transformation With RDS Database Technology
 
Riak CS Build Your Own Cloud Storage
Riak CS Build Your Own Cloud StorageRiak CS Build Your Own Cloud Storage
Riak CS Build Your Own Cloud Storage
 
Unleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCacheUnleash the Power of Redis with Amazon ElastiCache
Unleash the Power of Redis with Amazon ElastiCache
 
FOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worldsFOSDEM 2015 - NoSQL and SQL the best of both worlds
FOSDEM 2015 - NoSQL and SQL the best of both worlds
 
M|18 Welcome Keynote
M|18 Welcome KeynoteM|18 Welcome Keynote
M|18 Welcome Keynote
 

Similar to Getting Started with MariaDB with Docker

MariaDB on Docker
MariaDB on DockerMariaDB on Docker
MariaDB on Docker
MariaDB plc
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Jeffrey Ellin
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
WaveMaker, Inc.
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013dotCloud
 
Running database infrastructure on containers
Running database infrastructure on containersRunning database infrastructure on containers
Running database infrastructure on containers
MariaDB plc
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Peng Xiao
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deploymentjavaonfly
 
Docker Practice in Alibaba Cloud by Li Yi (Mark) & Zuhe Li (Sogo)
Docker Practice in Alibaba Cloud by Li Yi (Mark) & Zuhe Li (Sogo)Docker Practice in Alibaba Cloud by Li Yi (Mark) & Zuhe Li (Sogo)
Docker Practice in Alibaba Cloud by Li Yi (Mark) & Zuhe Li (Sogo)
Docker, Inc.
 
Getting Started with Docker - Nick Stinemates
Getting Started with Docker - Nick StinematesGetting Started with Docker - Nick Stinemates
Getting Started with Docker - Nick Stinemates
Atlassian
 
Docker intro
Docker introDocker intro
Docker introspiddy
 
Webinar Docker Tri Series
Webinar Docker Tri SeriesWebinar Docker Tri Series
Webinar Docker Tri Series
Newt Global Consulting LLC
 
Was liberty profile and docker
Was liberty profile and dockerWas liberty profile and docker
Was liberty profile and dockersflynn073
 
Alibaba Cloud Conference 2016 - Docker Enterprise
Alibaba Cloud Conference   2016 - Docker EnterpriseAlibaba Cloud Conference   2016 - Docker Enterprise
Alibaba Cloud Conference 2016 - Docker Enterprise
John Willis
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
David Currie
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
nirajrules
 
Use Docker to Deliver Cognitive Services Running Cross Platform and Multi Clo...
Use Docker to Deliver Cognitive Services Running Cross Platform and Multi Clo...Use Docker to Deliver Cognitive Services Running Cross Platform and Multi Clo...
Use Docker to Deliver Cognitive Services Running Cross Platform and Multi Clo...
Docker, Inc.
 
Devoxx 2016 - Docker Nuts and Bolts
Devoxx 2016 - Docker Nuts and BoltsDevoxx 2016 - Docker Nuts and Bolts
Devoxx 2016 - Docker Nuts and Bolts
Patrick Chanezon
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
Web à Québec
 

Similar to Getting Started with MariaDB with Docker (20)

MariaDB on Docker
MariaDB on DockerMariaDB on Docker
MariaDB on Docker
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015Docker & aPaaS: Enterprise Innovation and Trends for 2015
Docker & aPaaS: Enterprise Innovation and Trends for 2015
 
OpenStack Summit
OpenStack SummitOpenStack Summit
OpenStack Summit
 
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
Write Once and REALLY Run Anywhere | OpenStack Summit HK 2013
 
Docker-Intro
Docker-IntroDocker-Intro
Docker-Intro
 
Running database infrastructure on containers
Running database infrastructure on containersRunning database infrastructure on containers
Running database infrastructure on containers
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Docker - Portable Deployment
Docker - Portable DeploymentDocker - Portable Deployment
Docker - Portable Deployment
 
Docker Practice in Alibaba Cloud by Li Yi (Mark) & Zuhe Li (Sogo)
Docker Practice in Alibaba Cloud by Li Yi (Mark) & Zuhe Li (Sogo)Docker Practice in Alibaba Cloud by Li Yi (Mark) & Zuhe Li (Sogo)
Docker Practice in Alibaba Cloud by Li Yi (Mark) & Zuhe Li (Sogo)
 
Getting Started with Docker - Nick Stinemates
Getting Started with Docker - Nick StinematesGetting Started with Docker - Nick Stinemates
Getting Started with Docker - Nick Stinemates
 
Docker intro
Docker introDocker intro
Docker intro
 
Webinar Docker Tri Series
Webinar Docker Tri SeriesWebinar Docker Tri Series
Webinar Docker Tri Series
 
Was liberty profile and docker
Was liberty profile and dockerWas liberty profile and docker
Was liberty profile and docker
 
Alibaba Cloud Conference 2016 - Docker Enterprise
Alibaba Cloud Conference   2016 - Docker EnterpriseAlibaba Cloud Conference   2016 - Docker Enterprise
Alibaba Cloud Conference 2016 - Docker Enterprise
 
WebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and DockerWebSphere Application Server Liberty Profile and Docker
WebSphere Application Server Liberty Profile and Docker
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platform
 
Use Docker to Deliver Cognitive Services Running Cross Platform and Multi Clo...
Use Docker to Deliver Cognitive Services Running Cross Platform and Multi Clo...Use Docker to Deliver Cognitive Services Running Cross Platform and Multi Clo...
Use Docker to Deliver Cognitive Services Running Cross Platform and Multi Clo...
 
Devoxx 2016 - Docker Nuts and Bolts
Devoxx 2016 - Docker Nuts and BoltsDevoxx 2016 - Docker Nuts and Bolts
Devoxx 2016 - Docker Nuts and Bolts
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 

More from MariaDB plc

MariaDB Paris Workshop 2023 - MaxScale 23.02.x
MariaDB Paris Workshop 2023 - MaxScale 23.02.xMariaDB Paris Workshop 2023 - MaxScale 23.02.x
MariaDB Paris Workshop 2023 - MaxScale 23.02.x
MariaDB plc
 
MariaDB Paris Workshop 2023 - Newpharma
MariaDB Paris Workshop 2023 - NewpharmaMariaDB Paris Workshop 2023 - Newpharma
MariaDB Paris Workshop 2023 - Newpharma
MariaDB plc
 
MariaDB Paris Workshop 2023 - Cloud
MariaDB Paris Workshop 2023 - CloudMariaDB Paris Workshop 2023 - Cloud
MariaDB Paris Workshop 2023 - Cloud
MariaDB plc
 
MariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB Paris Workshop 2023 - MariaDB EnterpriseMariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB plc
 
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance OptimizationMariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB plc
 
MariaDB Paris Workshop 2023 - MaxScale
MariaDB Paris Workshop 2023 - MaxScale MariaDB Paris Workshop 2023 - MaxScale
MariaDB Paris Workshop 2023 - MaxScale
MariaDB plc
 
MariaDB Paris Workshop 2023 - novadys presentation
MariaDB Paris Workshop 2023 - novadys presentationMariaDB Paris Workshop 2023 - novadys presentation
MariaDB Paris Workshop 2023 - novadys presentation
MariaDB plc
 
MariaDB Paris Workshop 2023 - DARVA presentation
MariaDB Paris Workshop 2023 - DARVA presentationMariaDB Paris Workshop 2023 - DARVA presentation
MariaDB Paris Workshop 2023 - DARVA presentation
MariaDB plc
 
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB plc
 
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-BackupMariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB plc
 
Einführung : MariaDB Tech und Business Update Hamburg 2023
Einführung : MariaDB Tech und Business Update Hamburg 2023Einführung : MariaDB Tech und Business Update Hamburg 2023
Einführung : MariaDB Tech und Business Update Hamburg 2023
MariaDB plc
 
Hochverfügbarkeitslösungen mit MariaDB
Hochverfügbarkeitslösungen mit MariaDBHochverfügbarkeitslösungen mit MariaDB
Hochverfügbarkeitslösungen mit MariaDB
MariaDB plc
 
Die Neuheiten in MariaDB Enterprise Server
Die Neuheiten in MariaDB Enterprise ServerDie Neuheiten in MariaDB Enterprise Server
Die Neuheiten in MariaDB Enterprise Server
MariaDB plc
 
Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®
MariaDB plc
 
Introducing workload analysis
Introducing workload analysisIntroducing workload analysis
Introducing workload analysis
MariaDB plc
 
Under the hood: SkySQL monitoring
Under the hood: SkySQL monitoringUnder the hood: SkySQL monitoring
Under the hood: SkySQL monitoring
MariaDB plc
 
Introducing the R2DBC async Java connector
Introducing the R2DBC async Java connectorIntroducing the R2DBC async Java connector
Introducing the R2DBC async Java connector
MariaDB plc
 
MariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introductionMariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introduction
MariaDB plc
 
Faster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDBFaster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDB
MariaDB plc
 
The architecture of SkySQL
The architecture of SkySQLThe architecture of SkySQL
The architecture of SkySQL
MariaDB plc
 

More from MariaDB plc (20)

MariaDB Paris Workshop 2023 - MaxScale 23.02.x
MariaDB Paris Workshop 2023 - MaxScale 23.02.xMariaDB Paris Workshop 2023 - MaxScale 23.02.x
MariaDB Paris Workshop 2023 - MaxScale 23.02.x
 
MariaDB Paris Workshop 2023 - Newpharma
MariaDB Paris Workshop 2023 - NewpharmaMariaDB Paris Workshop 2023 - Newpharma
MariaDB Paris Workshop 2023 - Newpharma
 
MariaDB Paris Workshop 2023 - Cloud
MariaDB Paris Workshop 2023 - CloudMariaDB Paris Workshop 2023 - Cloud
MariaDB Paris Workshop 2023 - Cloud
 
MariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB Paris Workshop 2023 - MariaDB EnterpriseMariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB Paris Workshop 2023 - MariaDB Enterprise
 
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance OptimizationMariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance Optimization
 
MariaDB Paris Workshop 2023 - MaxScale
MariaDB Paris Workshop 2023 - MaxScale MariaDB Paris Workshop 2023 - MaxScale
MariaDB Paris Workshop 2023 - MaxScale
 
MariaDB Paris Workshop 2023 - novadys presentation
MariaDB Paris Workshop 2023 - novadys presentationMariaDB Paris Workshop 2023 - novadys presentation
MariaDB Paris Workshop 2023 - novadys presentation
 
MariaDB Paris Workshop 2023 - DARVA presentation
MariaDB Paris Workshop 2023 - DARVA presentationMariaDB Paris Workshop 2023 - DARVA presentation
MariaDB Paris Workshop 2023 - DARVA presentation
 
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
MariaDB Tech und Business Update Hamburg 2023 - MariaDB Enterprise Server
 
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-BackupMariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
MariaDB SkySQL Autonome Skalierung, Observability, Cloud-Backup
 
Einführung : MariaDB Tech und Business Update Hamburg 2023
Einführung : MariaDB Tech und Business Update Hamburg 2023Einführung : MariaDB Tech und Business Update Hamburg 2023
Einführung : MariaDB Tech und Business Update Hamburg 2023
 
Hochverfügbarkeitslösungen mit MariaDB
Hochverfügbarkeitslösungen mit MariaDBHochverfügbarkeitslösungen mit MariaDB
Hochverfügbarkeitslösungen mit MariaDB
 
Die Neuheiten in MariaDB Enterprise Server
Die Neuheiten in MariaDB Enterprise ServerDie Neuheiten in MariaDB Enterprise Server
Die Neuheiten in MariaDB Enterprise Server
 
Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®Global Data Replication with Galera for Ansell Guardian®
Global Data Replication with Galera for Ansell Guardian®
 
Introducing workload analysis
Introducing workload analysisIntroducing workload analysis
Introducing workload analysis
 
Under the hood: SkySQL monitoring
Under the hood: SkySQL monitoringUnder the hood: SkySQL monitoring
Under the hood: SkySQL monitoring
 
Introducing the R2DBC async Java connector
Introducing the R2DBC async Java connectorIntroducing the R2DBC async Java connector
Introducing the R2DBC async Java connector
 
MariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introductionMariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introduction
 
Faster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDBFaster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDB
 
The architecture of SkySQL
The architecture of SkySQLThe architecture of SkySQL
The architecture of SkySQL
 

Recently uploaded

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Hivelance Technology
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 

Recently uploaded (20)

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
Multiple Your Crypto Portfolio with the Innovative Features of Advanced Crypt...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 

Getting Started with MariaDB with Docker

  • 1. MariaDB + Docker From Development to Production
  • 2. Conclusion Containers + Databases = Happy Developers Ephemeral Containers + Databases = DevOps headaches 4 Things you must use to evaluate • Data Durability & Redundancy • Dynamic Self Discovery & Cluster formation • Self Healing (as containers enter and leave) • Application Tier discovery of Database Cluster
  • 4. We’re building a database that is easy to use, easy to extend, and easy to deploy: on premise, in the cloud, or hybrid, operational or analytical – and with the languages and frameworks you prefer.
  • 5. Existing Deployment Models Are Broken Version control 1. Development 2. Test 3. Stage / Production Developer QA / QE Sysadmin
  • 6. Architectures Are Complex & Static Challenges • Orchestration • Complexity • Maintainability • Durability • Consistency • Scalability • Cost ($) • (Hybrid) CloudEnterprise Environment Legacy Mainframe Operational Database Caching Layer Pricing / Inventory / Billing Real-time Decisioning Real-time Consumer facing Streaming Data Data Warehouse Data Lake RDBMS Transactional Systems
  • 8. What do Containers give me? Encapsulation of Dependencies • O/S packages & Patches • Execution environment (e.g. Python 2.7) • Application Code & Dependencies Process Isolation • Isolate the process from anything else running Faster, Lightweight virtualization
  • 9. Virtual Machines vs. Containers App 1 App 2 App 3 Bins/Libs Bins/Libs Bins/Libs Guest OS Guest OS Guest OS Hypervisor Host Operating System Infrastructure Docker Engine Operating System Infrastructure App 1 App 2 App 3 Bins/Libs Bins/Libs Bins/Libs
  • 10. Dockerfile - Example FROM python:2.7 ADD . /code WORKDIR /code RUN apt-get update && apt-get -y install python-dev libssl-dev RUN pip install --no-cache-dir -r requirements.txt EXPOSE 5000 CMD python app.py
  • 11. Open Container Initiative (OCI) – Polyglot Vendors Coalition of industry leaders join forces to eliminate fragmentation • Form a vendor-neutral, open source governance model under the Linux Foundation • Establish common standards for container format and runtime • Docker donated its container format, runtime and associated specifications • Appoint maintainers for the libcontainer project
  • 12. Docker Toolchain in pictures Machine provisions Docker Engines Swarm clusters Docker Engines Compose orchestrates Container deployment Containers instantiate an image and are run by Docker Engine Docker Machine Docker Compose Docker Swarm Docker Engine Image Images encapsulates your code, dependencies…
  • 13. What about orchestration and Management? Orchestration and Management of Containers and higher-level constructs (services, deployments, etc….) is evolving Amazon ECS Google Container Engine Azure Container Service
  • 15. Requirements Data Redundancy • Containers are Ephemeral – Need more than one copy of the data Dynamic Self Discovery & Cluster formation • Need to start and stop Containers when needed • Clusters needs to grow and shrink dynamically Self Healing • Loss of nodes must not be fatal to the cluster integrity • Addition of nodes must scale capacity Application Tier discovery of Database Cluster • Automatic discovery of nodes • Automatic routing of requests to the correct nodes
  • 17. MARIADB SERVER Enterprise-grade secure, highly available and scalable relational database with a modern, extensible architecture MARIADB MAXSCALE MARIADB CLUSTER Next-generation database proxy that manages security, scalability and high availability in scale-out deployments Multi-Master, synchronous replication - improves availability and scales reads and writes MariaDB Portfolio Max Scale
  • 18. MariaDB Cluster Multi-Master • Synchronous replication Faster Failover • All nodes synchronized, therefore equal Scale reads and writes MariaDB MariaDB MariaDB Load Balancing and Failover Application / App Server
  • 19. MaxScale + Galera Use Case Each application server uses only 1 connection MaxScale selects one node as “master” and the other nodes as “slaves” If the “master” node fails, a new one can be elected immediately Galera Cluster + R/W split routing Max Scale
  • 21. Demo: Development Through Production Development • Build & Run an App in Development – Python + MariaDB Production • Deploy to a Swarm cluster in Production • Scale Web nodes – Add more Web containers behind HAProxy • Database High Availability – Deploy 3 nodes Galera cluster – Deploy 2 node MaxScale
  • 22. Python / Flask Let’s Build An App! Development app
  • 23. Production Virtual IP Virtual IP MaxScale 1 MaxScale 2 HAProxy 1 2 3 Then Scale in Production... Development app app1 app2 app3 app4 appN
  • 24. Demo 1 Build an Application
  • 25. Dockerfile FROM python:2.7 RUN apt-get update && apt-get -y install python-dev libssl-dev WORKDIR /app RUN pip install Flask MySQL-python ADD . /app EXPOSE 5000 CMD ["python", "app.py"]
  • 26. docker-compose.yml services: web: build: . ports: - "5000:5000" links: - mariadb hostname: dev.myapp.com environment: APP_MARIADB_HOST: dev_mariadb_1 APP_PASSWORD: foo mariadb: image: mariadb:10.1 environment: MYSQL_ROOT_PASSWORD: foo
  • 27. Roll The Application Behind Haproxy Development app Production Virtual IP Virtual IP MaxScale 1 MaxScale 2 HAProxy 1 2 3 app1
  • 28. Scale the Application Tier Development app Production Virtual IP Virtual IP MaxScale 1 MaxScale 2 HAProxy 1 2 3 app1 app2 app3 app4 appN
  • 29. Docker Networking Docker Host (swarm-2) MaxScale Container Endpoint Docker Host (swarm-3) MariaDB Container Endpoint “Bridge” Network “Prod” Overlay Network Docker Host (swarm-1) App Container Endpoint Docker Host (swarm-0) HAProxy Container Endpoint Endpoint
  • 30. Docker Networking $ docker network create -d overlay --attachable myapp_back $ cat docker-compose.stack.yml ... networks: front: back: external: name: myapp_back
  • 31. Secrets… Opppsss services: web: build: . ports: - "5000:5000" links: - mariadb hostname: dev.myapp.com environment: APP_MARIADB_HOST: dev_mariadb_1 APP_PASSWORD: foo mariadb: image: mariadb:10.1 environment: MYSQL_ROOT_PASSWORD: foo
  • 32. Docker secrets $ cat docker-compose.stack.yml ... secrets: app_password: file: ./app_password.txt mariadb_root_password: file: ./mariadb_password.txt xtrabackup_password: file: ./xtrabackup_password.txt $ more ./app_password.txt appfoo
  • 34. haproxy & web services services: haproxy: image: dockercloud/haproxy networks: - front - back volumes: - /var/run/docker.sock:/var/run/docker.sock ports: - 80:80 deploy: placement: constraints: [node.role == manager] web: image: alvinr/demo-webapp-vote:mariadb environment: SERVICE_PORTS: "5000" VIRTUAL_HOST: "prod.myapp.com" APP_MARIADB_HOST: "maxscale" APP_USER: "app" APP_PASSWORD_FILE: "/run/secrets/app_password" APP_DATABASE: "test" networks: - back deploy: placement: constraints: [node.role != manger] secrets: - app_password
  • 36. MariaDB Galera Cluster mariadb_cluster: image: alvinr/mariadb-galera-swarm environment: ... NODE_ADDRESS: "eth0" MYSQL_USER: "app" MYSQL_DATABASE: "test" MYSQL_PASSWORD_FILE: "/run/secrets/app_password" MAXSCALE_PRIVS: "true" labels: com.mariadb.cluster: "myapp-prod-cluster" networks: - back command: seed deploy: replicas: 1 placement: constraints: [engine.labels.com.mariadb.cluster != myapp-prod-cluster] secrets: - mariadb_root_password - xtrabackup_password - app_password
  • 37. MaxScale maxscale: image: alvinr/maxscale-swarm ... labels: com.mariadb.cluster: "myapp-maxscale" networks: - back deploy: replicas: 1 restart_policy: condition: on-failure delay: 5s placement: constraints: [engine.labels.com.mariadb.cluster != myapp-maxscale] secrets: - app_password
  • 39. DNS RESOLUTION • Docker assigns VIP to Service, each Task has own IP • nslookup, dig, getent etc. 3rd PARTY • consul, etcd, zookeeper etc. DOCKER EVENTS • https://docs.docker.com/engine/ reference/api/docker_remote_api/ • Interlock - ttps://github.com/ehazlett/interlock Service Discovery - How to mesh nodes?
  • 40. Storage: Inside or Outside the Container? Inside • Encapsulation of Concerns Outside • Separation of Concerns • Storage features (e.g. Snapshots) • 3rd Party options – NetApp, Google Compute Engine, Rancher Convoy – Flocker Host Docker Daemon Container Docker Daemon Container /dev/xvdb /mnt/xx:/var/lib/mysql Networked e.g. EBS Volume Local Disk e.g. SSD / NVMe
  • 41. Storage: Data Container? Inside • Managed like other containers • Special rule for Destruction • TBD: Performance Host Docker Daemon Container Docker Daemon Container --volumes-from {container name} Host
  • 42. And... • Swarm locking • Image verification (trusted Images) • AppArmor / Seccomp profiles • Monitoring • Heathchecks • Rolling Upgrades
  • 43. Summary One Solution Development -> Production • Define Images & Orchestration once • Reuse when needed, inject required behaviours MariaDB in Production with Docker • Ops define the whitelisted images, security policies • Dev approve images to build upon • Eliminate complexity (and cost) of Deployment • Scale easily, maintain SLA requirements of component
  • 44. Thanks and Q&A Code • https://github.com/alvinr/docker-demo/tree/master/mariadb/vote Docker Images • https://hub.docker.com/_/mariadb/ MariaDB & Docker deployment guide • https://mariadb.com/kb/en/mariadb/installing-and-using-mariadb-via-docker/