Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Webinar manage MySQL like a devops sysadmin

263 views

Published on

Manage MySQL like a devops sysadmin Webinar

Published in: Technology
  • Be the first to comment

Webinar manage MySQL like a devops sysadmin

  1. 1. Manage MySQL like a devops sysadmin Webinar – Oct 2012 Frédéric Descamps
  2. 2. www.percona.com Who am I ? Frédéric Descamps @lefred http://about.be/lefred Managing MySQL since 3.23 (as far as I remember) devops believer
  3. 3. www.percona.com To start with... Let's use devops like slides...
  4. 4. 4 Let's use devops like slides...
  5. 5. 5 from
  6. 6. 6
  7. 7. 7 to
  8. 8. 8
  9. 9. 9 devops is a movement willing to help aligning IT with company needs (starting by aligning devs and ops) @endemics - Gildas Le Nadan - “The Devops movement”, Mixit Lyon 2011
  10. 10. 10 devops is about communication !
  11. 11. 11 devops is about communication ! between dev and ops
  12. 12. 12 devs ops Small and frequent successful iterations This is one of the most fundamental ideas in devops: the feedback loop !
  13. 13. 13 We can say that devops is bringing together people and practices from development and operations
  14. 14. 14 We can say that devops is bringing together people and practices from development and operations I am a happy dev !I am a happy op !
  15. 15. 15 devops now = ● being professional ● improving the collaboration by increasing trust and respect
  16. 16. 16 /me likes ! HOW can I reach that goal ?
  17. 17. 17 devops requires visibility !
  18. 18. 18 Everybody should have a status overview Is there any problem ? How are the test going ? How is performance ?
  19. 19. 19 devops is about CAMS
  20. 20. 20 CULTURE AUTOMATION MEASUREMENT SHARING @botchagalupe @damonedwards http://www.opscode.com/blog/2010/07/16/what-devops-means-to-me/
  21. 21. 21 What techniques can I use ?
  22. 22. 22 Monitoring Infrastructure as Code Continuous Improvement
  23. 23. 23 What about DBAs ?
  24. 24. 24 Join the team, follow the movement !
  25. 25. 25 You are already between devs and ops
  26. 26. 26 You are already between devs and ops I am a happy dba !
  27. 27. 27 But we are still closer to the dark side of the force: sysadmins
  28. 28. 28 But we are still closer to the dark side of the force: sysadmins
  29. 29. 29 How can we apply devops ideas to our dba job ?
  30. 30. 30 1. communication 2. configuration management 3. testing 4. visibility
  31. 31. 31 1. Communication Usually DEVS communicate with managers, quality managers, products managers, ...
  32. 32. 32 OPS “communicate” with support, ISP's and... their servers
  33. 33. 33 DBAs don't communicate
  34. 34. 34 The interaction between developers, sysadmins, dbas and all the actors should begin from the start of any projects
  35. 35. 35
  36. 36. 36
  37. 37. 37 Discuss everything database related with developers and sysadmins: ● disks and raid design ● schema design & partitions ● additional columns & indexes ● tables repair, ...
  38. 38. 38 2. configuration management Can we automate DBAs job ? Should we ? Even if we have only one database ?
  39. 39. 39
  40. 40. 40
  41. 41. 41 A lot of things to configure ● binaries ● databases ● configs ● cron jobs ● monitoring ● grants ● replication
  42. 42. 42 Documentation is needed and must be up to date
  43. 43. 43 Needs to be reproducible quickly without missing anything !
  44. 44. 44 Keep track of any changes Mind the gap
  45. 45. 45 3. testing Test every changes every new package... EVERYTHING
  46. 46. 46 4. visibility Expose monitoring, trending, test results and project status to EVERYONE in your company!! Everybody should know why the database is slooooow !
  47. 47. 47 Use all these metrics to plan ahead all the changes ! NOT ALONE BUT WITH EVERYBODY
  48. 48. 48 notions practices ideas methodologies
  49. 49. 49 We are DBAs we work with data, we need something more concrete !
  50. 50. 50 We are DBA's we work with data, we need something more concrete !
  51. 51. 51 TRUE !
  52. 52. 52 communication
  53. 53. 53 Use an agile method to handle your projects
  54. 54. 54 For operations a good method is kanban
  55. 55. 55
  56. 56. 56
  57. 57. 57 Use dashboards and make them available to EVERYONE
  58. 58. 58 share all your dashboards with everybody in your company
  59. 59. 59 configuration management
  60. 60. 60 consider your infrastructure as code
  61. 61. 61 Use puppet (or any other configuration management tool) to deploy everything related to your database
  62. 62. 62 Save your puppet recipes into a version control system
  63. 63. 63 but also save your database schema changes in that system
  64. 64. 64 test
  65. 65. 65
  66. 66. 66 What should you test as a devops dba ?
  67. 67. 67 Test if you can deploy everything and if you didn't forget anything
  68. 68. 68 Test also the performance ! Is it faster with this change ?
  69. 69. 69 use Percona Toolkit
  70. 70. 70 automate your tests
  71. 71. 71 visibility
  72. 72. 72 monitoring
  73. 73. 73 Monitor your database with an alerting system (nagios). Disk/IO, CPU load, Network traffic, disk usage
  74. 74. 74 But do you want to be woken up at night because replication of the machine taking backups is 60sec behind ?
  75. 75. 75 NO!
  76. 76. 76 Then do you want to be woken up in the middle of the night because they are 1000 more selects than usual ?
  77. 77. 77 NO!
  78. 78. 78 Your alerting should answer those questions: Is the database server running ? Does it allow connections ? Is replication lagging on production slaves ?
  79. 79. 79 trending
  80. 80. 80 The most interesting facts for a DBA are the trending results ! Use cacti ... with Percona Monitoring Plugins They provide very good metrics
  81. 81. 81 Correlate changes in the trending results with your configuration changes... everything should be tracked
  82. 82. 82 others ?
  83. 83. 83 You can also use other “devops” oriented tools like :
  84. 84. 84 puppet-dashboard with kanban plugin
  85. 85. 85 If there is only one thing you remember from this presentation
  86. 86. 86 Yes, even a schema change MUST be considered like a migration !
  87. 87. 87 review it test it plan it do it
  88. 88. 88 and now that we have a devdbaops team
  89. 89. 89 we can start working on really interesting tasks for everyone
  90. 90. 90 the smooth migration
  91. 91. 91 When this goal is achieved DEVS have less pressure OPS have less pressure DBAs have less pressure
  92. 92. 92 collaboration = less pressure
  93. 93. 93
  94. 94. 94 v 1.9application v 2.0 db schema v 1.9 v 2.0 present future
  95. 95. 95 v 1.9application v 2.0 db schema v 1.9 v 2.0 present future
  96. 96. 96 v 1.9application v 2.0 db schema v 1.9 v 2.0 present
  97. 97. 97 v 1.9application v 2.0 db schema v 1.9 v 2.0 present Issue !!
  98. 98. 98 v 1.9application v 2.0 db schema v 1.9 v 2.0
  99. 99. 99 v 1.9application v 2.0 db schema v 1.9 v 2.0 Issue !!
  100. 100. 100 v 1.9application v 2.0 db schema v 1.9 v 2.0
  101. 101. 101 This can only be the result of
  102. 102. 102 collaboration between DEVS, DBAs & OPS
  103. 103. 103 demo
  104. 104. 104 git puppet Percona server Jenkins VirtualBox vagrant mcollective
  105. 105. 105 Change the schema (add an index for example) Commit !
  106. 106. 106 Launches a new virtual machine from scratch using vagrant Install everything and populate a test db
  107. 107. 107 Start some basic tests with cucumber- puppet to see if all puppet code was correctly performed No error is a success Otherwise is a fail
  108. 108. 108 Then start some tests with percona- playback and/or pt-query-digest and compares to old values Faster is a success Slower is a fail
  109. 109. 109 Photo Credit: http://www.flickr.com/photos/kuma-kigurumi/ http://www.flickr.com/photos/airforceone/2125791018/ http://www.flickr.com/photos/akosvaradi/2617404213/ http://www.flickr.com/photos/doberdad/2264130166 http://www.flickr.com/photos/tomsaint/2714401733 http://www.flickr.com/photos/10335017@N07/4570943373/ http://www.bxel.net/metro-de-bruxelles/metro_plan_bruxelles.jpg http://www.flickr.com/photos/youngkimstudio/6216328782 http://www.flickr.com/photos/26676383@N00/3690701110/ http://www.flickr.com/photos/blubbla/209864856 http://www.flickr.com/photos/chrishuffman/2336990347 http://geekandpoke.typepad.com/.a/6a00d8341d3df553ef0153922fa2ee970b-pi Projects links: http://puppetlabs.com/resources/overview-2/ http://puppetlabs.com/puppet/related-projects/dashboard/ http://theforeman.org/ http://git-scm.com/ http://www.redmine.org/ http://www.redmine.org/projects/redmine/wiki/PluginKanban http://vagrantup.com https://www.virtualbox.org/ http://jenkins-ci.org/ http://www.percona.com/software/percona-toolkit/ http://code.google.com/p/mysql-cacti-templates/
  110. 110. www.percona.com You can find all these recipes here !
  111. 111. www.percona.com Speaking at In London, December 3rd & 4th
  112. 112. www.percona.com Speaking at In London, December 3rd & 4th 40% off passes using the discount code “MySQL-UK”
  113. 113. lefred@percona.com @lefred

×