Created
June 21, 2011 17:51
-
-
Save chids/1038441 to your computer and use it in GitHub Desktop.
Puppet Riak Manifest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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