SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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 orchestrationAndrew Morgan
 
AWS Cloud SAA Relational Database presentation
AWS Cloud SAA Relational Database presentationAWS Cloud SAA Relational Database presentation
AWS Cloud SAA Relational Database presentationTATA 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 TalksAmazon 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
 
NoSql presentation
NoSql presentationNoSql presentation
NoSql presentationMat 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 KafkaEdureka!
 
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingAraf Karsh Hamid
 
Power of OpenStack & Hadoop
Power of OpenStack & HadoopPower of OpenStack & Hadoop
Power of OpenStack & HadoopTuan Yang
 
Intro to Apache Kafka
Intro to Apache KafkaIntro to Apache Kafka
Intro to Apache KafkaJason Hubbard
 
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 DatabaseAmazon 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 TechnologyAlibaba 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 Storagebuildacloud
 
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 ElastiCacheAmazon 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 worldsAndrew Morgan
 
M|18 Welcome Keynote
M|18 Welcome KeynoteM|18 Welcome Keynote
M|18 Welcome KeynoteMariaDB plc
 

Was ist angesagt? (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
 

Ähnlich wie Getting Started with MariaDB with Docker

MariaDB on Docker
MariaDB on DockerMariaDB on Docker
MariaDB on DockerMariaDB plc
 
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 2015WaveMaker, 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 containersMariaDB plc
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng 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 StinematesAtlassian
 
Docker intro
Docker introDocker intro
Docker introspiddy
 
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 EnterpriseJohn 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 DockerDavid Currie
 
Dockerization of Azure Platform
Dockerization of Azure PlatformDockerization of Azure Platform
Dockerization of Azure Platformnirajrules
 
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 BoltsPatrick Chanezon
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerWeb à Québec
 

Ähnlich wie 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
 

Mehr von 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.xMariaDB plc
 
MariaDB Paris Workshop 2023 - Newpharma
MariaDB Paris Workshop 2023 - NewpharmaMariaDB Paris Workshop 2023 - Newpharma
MariaDB Paris Workshop 2023 - NewpharmaMariaDB plc
 
MariaDB Paris Workshop 2023 - Cloud
MariaDB Paris Workshop 2023 - CloudMariaDB Paris Workshop 2023 - Cloud
MariaDB Paris Workshop 2023 - CloudMariaDB plc
 
MariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB Paris Workshop 2023 - MariaDB EnterpriseMariaDB Paris Workshop 2023 - MariaDB Enterprise
MariaDB Paris Workshop 2023 - MariaDB EnterpriseMariaDB plc
 
MariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance OptimizationMariaDB Paris Workshop 2023 - Performance Optimization
MariaDB Paris Workshop 2023 - Performance OptimizationMariaDB 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 presentationMariaDB plc
 
MariaDB Paris Workshop 2023 - DARVA presentation
MariaDB Paris Workshop 2023 - DARVA presentationMariaDB Paris Workshop 2023 - DARVA presentation
MariaDB Paris Workshop 2023 - DARVA presentationMariaDB 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-BackupMariaDB 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 2023MariaDB plc
 
Hochverfügbarkeitslösungen mit MariaDB
Hochverfügbarkeitslösungen mit MariaDBHochverfügbarkeitslösungen mit MariaDB
Hochverfügbarkeitslösungen mit MariaDBMariaDB plc
 
Die Neuheiten in MariaDB Enterprise Server
Die Neuheiten in MariaDB Enterprise ServerDie Neuheiten in MariaDB Enterprise Server
Die Neuheiten in MariaDB Enterprise ServerMariaDB 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 analysisMariaDB plc
 
Under the hood: SkySQL monitoring
Under the hood: SkySQL monitoringUnder the hood: SkySQL monitoring
Under the hood: SkySQL monitoringMariaDB plc
 
Introducing the R2DBC async Java connector
Introducing the R2DBC async Java connectorIntroducing the R2DBC async Java connector
Introducing the R2DBC async Java connectorMariaDB plc
 
MariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introductionMariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introductionMariaDB plc
 
Faster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDBFaster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDBMariaDB plc
 
The architecture of SkySQL
The architecture of SkySQLThe architecture of SkySQL
The architecture of SkySQLMariaDB plc
 

Mehr von 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
 

Kürzlich hochgeladen

Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 

Kürzlich hochgeladen (20)

Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 

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/