Skip to content

Instantly share code, notes, and snippets.

@chids
Created June 21, 2011 17:51
Show Gist options
  • Save chids/1038441 to your computer and use it in GitHub Desktop.
Save chids/1038441 to your computer and use it in GitHub Desktop.
Puppet Riak Manifest
class riak {
$configbase = "/etc/riaksearch"
$riak_dir = "/var/lib/riaksearch"
$username = "riak"
package { "riak-search": ensure => latest, }
user { $username:
shell => '/bin/bash',
comment => 'Basho Riak',
ensure => present,
home => $riak_dir,
}
service { "riaksearch":
ensure => running,
enable => true,
hasrestart => true,
require => [ Package['riak-search'], File["${configbase}/app.config"], File["${configbase}/vm.args"] ],
}
file { $riak_dir:
ensure => directory,
owner => $username,
group => $username,
mode => 0750,
recurse => true,
}
file { '/etc/init.d/riaksearch':
source => 'puppet:///modules/riak/init.d',
ensure => present,
owner => root,
group => root,
mode => 0750,
}
file { "${configbase}/app.config":
source => 'puppet:///modules/riak/app.config',
ensure => present,
owner => root,
group => $username,
mode => 0640,
}
file { "${configbase}/vm.args":
source => 'puppet:///modules/riak/vm.args',
ensure => present,
owner => root,
group => $username,
mode => 0640,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment