37
OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond . Serge Frezefond @sfrezefond Database Cluster as a Service in OpenStack Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

Embed Size (px)

DESCRIPTION

Paris, 5th December 2013 : OpenStack in Action 4! organized by eNovance, brings together members of the OpenStack community.

Citation preview

Page 1: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond .

Serge Frezefond @sfrezefond

Database  Cluster  as  a  Service  in  OpenStack  

Integrated, Scalable, Highly Available and Secure  

Page 2: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

SkySQL  • Leading  provider  of  open  source  databases,  services  and  solu=ons  • Home  for  the  founders  and  the  original  developers  of  the  core  of  MySQL  • The  creators  of  MariaDB,  the  drop-­‐in,  innova=ve  replacement  of  MySQL

Page 3: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL/MariaDB  in  the  Cloud  

Page 4: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL/MariaDB  High  Availability  • MySQL  Replica=on  with  MHA  and  Pacemaker  • MariaDB  Galera  Cluster  Synchronous  Replica=on  with  Codership  Galera  • Support  from  SkySQL  for:  • DRBD  • Shared  storage  

4

Page 5: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL  /MariaDB  Scalability  • In  MariaDB  5.5:  • XtraDB  5.5  • Group  commit  • MySQL  Replica=on  for  read  scalability  • TokuDB  and  ScaleDB  engine  

• Plus,  in  MariaDB  10:  • XtraDB  5.6  with  Improved  InnoDB  scalability  • Parallel  and  mul=-­‐source  replica=on  • CONNECT,  Spider  and  Cassandra  engine  

• MariaDB  Galera  Cluster  for  synchronous  replica=on  • MySQL  Cluster  for  high  volume/small  transac=ons  

5

Page 6: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL  /  MariaDB  Ease  of  Use  • MHA  

• Xtrabackup  • MariaDB  Manager  

• Enterprise  Monitor  

• Query  Editor  • MySQL  U=li=es  

• Percona  Toolkit    • MySQL  Workbench  

• Percona  Nagios  and  Cac=  plugins  6

Page 7: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL  in  Rackspace  

• Rackspace  Cloud  Database  • MySQL  Community  5.1  • Up  to  16GB  RAM,  150GB  storage  

• Standard  Servers  • Up  to  8  vCPUs,  30GB  RAM,  1.2TB  storage  • BYODBMS  

7

Page 8: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL  in  HPCloud  

• Manage  a  single  DB  instance  through  the  REST  API  

• Standard  Servers  • Up  to  8  vCPUs,  30GB  RAM,  960GB  storage  • BYODBMS  

• Marketplace  • GenieDB  • MariaDB  ScaleDB  

8

Page 9: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL  in  AWS  • Amazon  RDS  • MySQL  Community  5.1,  5.5  &  5.6  • Reserved  instances,  provisioned  IO  and  Flash  storage  • 32  vCPUs,  244GB  Memory,  10GB  network  

• Automa=c  backups,  Storage  replica=on,  MySQL  Replica=on  • Limited  tuning  

• Standard  Servers  and  Marketplace  • Similar  instances  • MariaDB  on  CentOS,  Debian  and  Ubuntu  • GenieDB  

9

Page 10: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL  in  Google  Cloud  

• MySQL  in  Google  Cloud  SQL    

• Google  compute  (GA)  

• Google App Engine

10

Page 11: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL  and  OpenStack  

Page 12: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL    in  OpenStack  

• Used  as  repository  -­‐  alterna=ve  to  SQLite  • Increased  portability  and  availability  

• High  Availability  is  the  key  factor:  • MySQL  Replica=on  • DRBD  • Galera  

12

Page 13: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL  Replica=on  

13

Node  Manager

HA  Manager

Control Network Compute

Page 14: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

DRBD  

14

Control Network Compute

Page 15: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Galera  Cluster  

15

Control Network Compute

Page 16: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MySQL  as  a  Service  

Page 17: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Automa=c  Provisioning  

• REST-­‐based  for  interopera=on  • GUI-­‐assisted  for  end-­‐users  • From  server  to  cluster  

17

Page 18: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

The  false  promise  of  the  elas=city  

• Distributed  MySQL  is  not  something  you  can  have  out  of  the  box  • Or  not  for  all  your  applica=ons  

18

Read-Write Read-Only Read-Only

binlog

relaylog relaylog relaylog relaylog

Page 19: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

DBaaS  vs  PaaS  

19

vs.

Page 20: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Storage  

• Backups  on  Swic  • Full  or  incremental  

• Moving  tablespaces  in  Cinder  • For  high  availability  • For  backups  and  archiving  • For  maintenance  

20

in01 in02 in03 in04 in05

Page 21: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Networking  

• Mul=ple  NICs  and  floa=ng  IPs  

• Public  IPs  • Local  proxies  vs  enhanced  connectors  

21

Page 22: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Security  

• LDAP  &  Keystone  • Integra=on  with  MySQL  • LDAP  /  OpenLDAP  • MySQL  Security  Plugin  using  OpenLDAP  

22

Keystone

LDAP

Page 23: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MariaDB  Cluster  in  OpenStack  

Page 24: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

What’s  new  with  MariaDB  

24

MariaDB Manager MariaDB Cluster

MariaDB Server(s)

MHA Galera GUI

API

Monitor

MaxScale Configuration & Provisioning

Page 25: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

SkySQL  MaxScale  

25

MaxScale Core

Data Stores

Client Applications

Backend Backend Backend

Frontend Frontend Frontend Frontend Frontend Clie

nt C

lient

Clie

nt C

lient

Clie

nt

Router Router Router

Monitor Monitor

Auth Auth Auth

Service Service Service

Listener Listener Listener Listener

Server Server Server Server Server

Page 26: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Introducing  MariaDB  Manager  

26

Page 27: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

MariaDB  Galera  Cluster  -­‐  State  

27

Page 28: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Provision  a  new  node  

28

HTTP  POST  method  -­‐  Create  a  node  

URI:  • .../resfulapi/system/systemid/node  

• Parameters:  • name  • hostname  • publicip,  privateip,  port  •  instanceid  • dbusername,  dbpassword  •  ...

1

Page 29: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Provision  a  new  node  

29

HTTP  POST  method  -­‐  Create  a  node  

URI:  • .../resfulapi/system/systemid/node  

• Parameters:  • name  • hostname  • publicip,  privateip,  port  •  instanceid  • dbusername,  dbpassword  •  ...

1

HTTP  POST  method  -­‐  Run  the  command  Connect  to  the  new  node  

URI:  • .../resfulapi/command/connect  • Parameters:  •  systemid  • nodeid  •  rootpassword

2

Page 30: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Provision  a  new  node  

30

HTTP  POST  method  -­‐  Create  a  node  

URI:  • .../resfulapi/system/systemid/node  

• Parameters:  • name  • hostname  • publicip,  privateip,  port  •  instanceid  • dbusername,  dbpassword  •  ...

1

HTTP  POST  method  -­‐  Run  the  command  Connect  to  the  new  node  

URI:  • .../resfulapi/command/connect  • Parameters:  •  systemid  • nodeid  •  rootpassword

2

HTTP  POST  method  -­‐  Run  the  command  Probe  the  state  of  the  node  

URI:  • .../resfulapi/command/probe  • Parameters:  •  systemid  • nodeid

3

Page 31: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Provision  a  new  node  

31

HTTP  POST  method  -­‐  Create  a  node  

URI:  • .../resfulapi/system/systemid/node  

• Parameters:  • name  • hostname  • publicip,  privateip,  port  •  instanceid  • dbusername,  dbpassword  •  ...

1

HTTP  POST  method  -­‐  Run  the  command  Connect  to  the  new  node  

URI:  • .../resfulapi/command/connect  • Parameters:  •  systemid  • nodeid  •  rootpassword

2

HTTP  POST  method  -­‐  Run  the  command  Probe  the  state  of  the  node  

URI:  • .../resfulapi/command/probe  • Parameters:  •  systemid  • nodeid

3

HTTP  POST  method  -­‐  Run  the  command  Provision  the  node  

URI:  • .../resfulapi/command/provision  • Parameters:  •  systemid  • nodeid

4

Page 32: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Start  a  node  

32

HTTP  POST  method  -­‐  Run  the  command  Start  the  node  

URI:  • .../resfulapi/command/start  • Parameters:  •  systemid  • nodeid

Page 33: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Retrieve  the  status  of  a  cluster  

33

• .../resfulapi/system/systemid

Page 34: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Monitor  the  #  of  connec=ons  of  a  node  

34

•  ../resfulapi/system/systemid/node/nodeid/monitor/{monitorid}/data

Page 35: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

What’s  coming  • MariaDB  Replica=on  and  MHA  

• MariaDB  10  

• MaxScale  integra=on  

• Juju  charms  for  MariaDB  Cluster  and  MariaDB  Manager  

• Puppet  &  Chef  manifests  and  recipes  

• MariaDB  and  Trove  

• Trove  for  MariaDB  Manager  35

Page 36: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

For  More  Informa=on...  

36

•  MariaDB  Enterprise:  www.mariadb.org  www.mariadb.com  

•  MariaDB  Manager  and  MaxScale:  hPp://downloads.skysql.com/archives  

•  Bugs:  hPp://bugs.skysql.com

Page 37: OpenStack in  Action 4! Serge Frezefond - Database Clusters as a Service in OpenStack: Integrated, Scalable, Highly Available and Secure

OpenStack in Action 4 ! - Paris - 5th December 2013 Serge Frezefond

Thank  You!  

[email protected]  

hop://serge.frezefond.com  www.slideshare.net/

sfrezefond  twioer:    @sfrezefond

www.skysql.com

Pictures  courtesy  of:  • www.pluralsight.com