Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Manage MySQL like a devops
sysadmin
Webinar – Oct 2012
Frédéric Descamps
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
www.percona.com
To start with...
Let's use
devops like
slides...
4
Let's use devops
like slides...
5
from
6
7
to
8
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
devops is about
communication !
11
devops is about
communication !
between
dev and ops
12
devs ops
Small and frequent
successful iterations
This is one of the most fundamental ideas in devops:
the feedback loop !
13
We can say that
devops is bringing
together people and
practices from
development and
operations
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
devops now
=
●
being professional
●
improving the collaboration
by increasing trust and
respect
16
/me likes !
HOW can I reach that
goal ?
17
devops
requires
visibility !
18
Everybody should have
a status overview
Is there any problem ?
How are the test going ?
How is performance ?
19
devops
is about
CAMS
20
CULTURE
AUTOMATION
MEASUREMENT
SHARING
@botchagalupe @damonedwards
http://www.opscode.com/blog/2010/07/16/what-devops-means-to-me/
21
What
techniques
can I use ?
22
Monitoring
Infrastructure as
Code
Continuous
Improvement
23
What about DBAs ?
24
Join the team,
follow the
movement !
25
You are already
between devs
and ops
26
You are already
between devs
and ops
I am a happy dba !
27
But we are still
closer to the
dark side of the
force: sysadmins
28
But we are still
closer to the
dark side of the
force: sysadmins
29
How can we
apply devops
ideas to our dba
job ?
30
1. communication
2. configuration
management
3. testing
4. visibility
31
1. Communication
Usually DEVS
communicate
with managers,
quality managers,
products managers, ...
32
OPS
“communicate”
with support,
ISP's and... their
servers
33
DBAs don't communicate
34
The interaction between
developers, sysadmins,
dbas and all the actors
should begin from the start
of any projects
35
36
37
Discuss everything database
related with developers and
sysadmins:
●
disks and raid design
●
schema design & partitions
●
additional columns & indexes
●
tables repair, ...
38
2. configuration
management
Can we automate DBAs
job ?
Should we ?
Even if we have only one
database ?
39
40
41
A lot of things to configure
●
binaries
●
databases
●
configs
●
cron jobs
●
monitoring
●
grants
●
replication
42
Documentation is
needed and must be up
to date
43
Needs to be reproducible
quickly without missing
anything !
44
Keep track of any changes
Mind the gap
45
3. testing
Test
every changes
every new package...
EVERYTHING
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
Use all these metrics to plan
ahead all the changes !
NOT ALONE BUT WITH
EVERYBODY
48
notions
practices
ideas
methodologies
49
We are DBAs we
work with data,
we need
something more
concrete !
50
We are DBA's
we work with
data, we need
something more
concrete !
51
TRUE !
52
communication
53
Use an agile
method to
handle your
projects
54
For operations a
good method is
kanban
55
56
57
Use dashboards
and make them
available to
EVERYONE
58
share all your
dashboards with
everybody in
your company
59
configuration
management
60
consider your
infrastructure as
code
61
Use puppet (or any other
configuration management tool)
to deploy
everything related
to your database
62
Save your
puppet recipes
into a version
control system
63
but also save
your database
schema changes
in that system
64
test
65
66
What should you
test as a devops
dba ?
67
Test if you can
deploy
everything and if
you didn't forget
anything
68
Test also the
performance !
Is it faster with
this change ?
69
use
Percona
Toolkit
70
automate
your
tests
71
visibility
72
monitoring
73
Monitor your database
with an alerting system
(nagios).
Disk/IO, CPU load, Network
traffic, disk usage
74
But do you want to be
woken up at night
because replication of
the machine taking
backups is 60sec
behind ?
75
NO!
76
Then do you want to be
woken up in the middle
of the night because
they are 1000 more
selects than usual ?
77
NO!
78
Your alerting should answer
those questions:
Is the database server running ?
Does it allow connections ?
Is replication lagging on production
slaves ?
79
trending
80
The most interesting facts
for a DBA are the trending
results !
Use cacti ... with Percona
Monitoring Plugins
They provide very good
metrics
81
Correlate changes in
the trending results
with your configuration
changes...
everything should be
tracked
82
others ?
83
You can also
use other
“devops”
oriented tools
like :
84
puppet-dashboard
with kanban plugin
85
If there is only
one thing you
remember from
this presentation
86
Yes, even a
schema change
MUST be
considered like a
migration !
87
review it
test it
plan it
do it
88
and now that we
have a
devdbaops
team
89
we can start
working on
really interesting
tasks for
everyone
90
the
smooth
migration
91
When this goal is
achieved
DEVS have less pressure
OPS have less pressure
DBAs have less pressure
92
collaboration
=
less pressure
93
94
v 1.9application v 2.0
db schema
v 1.9 v 2.0
present future
95
v 1.9application v 2.0
db schema
v 1.9 v 2.0
present future
96
v 1.9application v 2.0
db schema
v 1.9 v 2.0
present
97
v 1.9application v 2.0
db schema
v 1.9 v 2.0
present Issue !!
98
v 1.9application v 2.0
db schema
v 1.9 v 2.0
99
v 1.9application v 2.0
db schema
v 1.9 v 2.0
Issue !!
100
v 1.9application v 2.0
db schema
v 1.9 v 2.0
101
This can only be
the result of
102
collaboration
between DEVS,
DBAs & OPS
103
demo
104
git
puppet
Percona server
Jenkins
VirtualBox
vagrant
mcollective
105
Change the schema
(add an index for example)
Commit !
106
Launches a new
virtual machine from
scratch using vagrant
Install everything and
populate a test db
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
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
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/
www.percona.com
You can find all these recipes here !
www.percona.com
Speaking at
In London,
December 3rd & 4th
www.percona.com
Speaking at
In London,
December 3rd & 4th
40% off passes
using the discount
code
“MySQL-UK”
lefred@percona.com
@lefred

More Related Content

Webinar manage MySQL like a devops sysadmin