automating mysql deployments on kubernetes
play

Automating MySQL Deployments on Kubernetes Calin Don & Flavius - PowerPoint PPT Presentation

Automating MySQL Deployments on Kubernetes Calin Don & Flavius Mecea Presslabs Automating MySQL Deployments on Kubernetes Percona Live 2018 00. Who are we? Calin Don Flavius Mecea Co-founder & CTO Project Lead @Presslabs


  1. Automating MySQL Deployments on Kubernetes Calin Don & Flavius Mecea Presslabs

  2. Automating MySQL Deployments on Kubernetes Percona Live 2018

  3. 00. Who are we? Calin Don Flavius Mecea Co-founder & CTO Project Lead @Presslabs @Presslabs

  4. 01. Context 02. The Need 03. Solution 04. Use cases 05. Outcomes 06. Demo 07. Project status 08. Future plans

  5. 01. Context

  6. 01. Context 2007 2011 2013 2015 2018 WordPress Managed Record: 2,2 BN Top tier in Open-Source development WordPress pageviews in a Enterprise Stack agency hosting month hosting

  7. 01. Context / Why Kubernetes? Ubiquitous technology ● Open-source ● The core of our Stack ●

  8. 02. The Need

  9. 02. The Need 1. Easy MySQL Cluster deployment in Kubernetes 2. Scalable MySQL Cluster* 3. High availability for MySQL 4. Automated backups & restore 5. Built-in monitoring

  10. 03. The Need didn’t fit our scaling model didn’t provide enough automation

  11. 03. Solution

  12. 03. Solution Kubernetes Operator for managing MySQL Clusters with asynchronous or semi-synchronous replication. Self-healing clusters ● Highly available reads ● Virtually highly available writes ● Replication lag detection and mitigation ● Resource abuse control ● Automated backups and restores ●

  13. 03. Solution How it’s made

  14. 03. Solution Node internals

  15. 03. Solution Percona is battle-tested in Enterprise environments. NOW UPCOMING ● Percona XtraBackup Percona Monitoring & Management ● ● Percona Toolkit ● Percona Server for MySQL

  16. 04. Use Cases

  17. 04. Use Cases Microservices ● Ephemeral databases for testing ● On-premise DBaaS ●

  18. 05. Outcomes

  19. 05. Outcomes / Evaluation setup ~ $50 ~ $50

  20. 05. Outcomes / Evaluation setup Target performance vs required resources QPS

  21. 05. Outcomes / Evaluation setup Target performance vs required resources QPS

  22. 05. Outcomes / Evaluation setup Target performance vs required resources QPS

  23. 05. Outcomes / Evaluation setup Target performance vs required resources QPS

  24. 05. Outcomes / Evaluation setup Target performance vs required resources QPS

  25. 05. Outcomes / Costs ~ $250 ~ $50

  26. Calin Don

  27. 06. Demo time!

  28. Demo - install MySQL Operator $ helm repo add presslabs https://presslabs.github.io/charts $ helm install presslabs/mysql-operator --name mysql-operator

  29. Demo - install MySQL Operator $ helm repo add presslabs https://presslabs.github.io/charts $ helm install presslabs/mysql-operator --name mysql-operator NAME: mysql-operator LAST DEPLOYED: Fri Nov 2 12:09:24 2018 NAMESPACE: default STATUS: DEPLOYED ...

  30. Demo - create a cluster cluster.yaml apiVersion: v1 kind: Secret metadata: name: test-secret type: Opaque data: ROOT_PASSWORD: bm90LXNvLXNlY3VyZQ== # USER: # PASSWORD: # DATABASE: --- apiVersion: mysql.presslabs.org/v1alpha1 kind: MysqlCluster metadata: name: test spec: replicas: 1 secretName: test-secret

  31. Demo - create a cluster $ kubectl apply -f cluster.yaml secret/test-secret created mysqlcluster.mysql.presslabs.org/test created $ kubectl get pods NAME READY STATUS RESTARTS AGE test-mysql-0 4/4 Running 2 4m

  32. Demo - create a cluster $ kubectl describe mysqlcluster test ... Status: Conditions: Status: True Type: Ready Ready Nodes: 1 Nodes: Name: test-mysql-0.test-mysql-nodes.default Conditions: - Type: Lagged Status: Unknown - Type: Replicating Status: False - Type: Master Status: True - Type: ReadOnly Status: False

  33. Demo - connect to cluster $ kubectl port-forward svc/test-mysql-master 3306 & Forwarding from 127.0.0.1:3306 -> 3306 Forwarding from [::1]:3306 -> 3306 $ mysql --host=localhost -u app-user -papp-password If you don't see a command prompt, try pressing enter. mysql> SELECT @@hostname; +--------------+ | @@hostname | +--------------+ | test-mysql-0 | +--------------+ 1 row in set (0.01 sec)

  34. Demo - scale up cluster.yaml apiVersion: mysql.presslabs.org/v1alpha1 kind: MysqlCluster metadata: name: test spec: replicas: 2 secretName: test-secret

  35. Demo - scale up $ kubectl apply -f cluster.yaml mysqlcluster.mysql.presslabs.org/test updated

  36. 07. Project status

  37. 07. Project status ~ 250 commits, ~ 60 closed PRs 2 nd rewrite, version 0.2.0 - is almost complete Community Contributors

  38. 08. Future Plans

  39. 08. Future Plans Logical mysqldump backups ● Point in time backup and restore ● Integrate Percona Management & Monitoring ● Kubernetes Service Catalog integration ● ProxySQL integration ● Vault integration ● GUI ●

  40. Contribute! www.github.com/presslabs/mysql-operator

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend