Skip to content

Instantly share code, notes, and snippets.

@nickjenkin
Created April 10, 2015 04:30
Show Gist options
  • Save nickjenkin/ceabd0bbcab10ad46a76 to your computer and use it in GitHub Desktop.
Save nickjenkin/ceabd0bbcab10ad46a76 to your computer and use it in GitHub Desktop.
holland mysql puppet backups
node db3 {
include racknode
lvm::volume { 'mysqllv':
ensure => present,
vg => 'mysqlvg',
pv => '/dev/xvde1',
fstype => 'xfs',
size => '100G',
}
->
lvm::volume {'mysqlbackup':
ensure => present,
vg => 'mysqlbackupvg',
pv => '/dev/xvdb',
fstype => 'xfs',
size => '70G',
}
->
file {"/var/lib/mysql":
ensure => directory,
owner => mysql,
group => mysql
}
->
file {"/var/spool/holland":
ensure => directory,
owner => root,
group => root,
}
->
mount {"/var/lib/mysql":
ensure => mounted,
device => '/dev/mysqlvg/mysqllv',
fstype => 'xfs',
options => 'defaults'
}
->
mount {"/var/spool/holland":
ensure => mounted,
device => '/dev/mysqlbackupvg/mysqlbackup',
fstype => 'xfs',
options => 'defaults',
}
->
class {"mrmysql":}
->
class {"holland":}
->
cron {"holland backups":
command => "holland bk",
hour => 2
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment