Class moxi::moxi
In: /modules/moxi/manifests/init.pp
Parent:

Class: moxi

Moxi Server. Everything is kept in /opt/moxi as this is where the upstream rpm package puts everything. Arguably ugly indeed.

Parameters:

 $options:
   Additional command-line moxi options. Default: none
 $cluster_url:
   Membase cluster URL. Mandatory.
 $usr:
   Optional Membase user. Default: no auth
 $pwd:
   Optional Membase password. Default: no auth
 $port_listen:
   Local port to listen on. Default: '11211'
 $default_bucket_name:
   Name of the default bucket. Default: 'default'
 $downstream_max,
 $downstream_conn_max,
 $downstream_conn_queue_timeout,
 $downstream_timeout,
 $wait_queue_timeout,
 $connect_max_errors,
 $connect_retry_interval,
 $connect_timeout,
 $auth_timeout,
 $cycle:
   Other Moxi parameters. See documentation.

Sample Usage :

 include moxi

Resources

Resources

File["/etc/logrotate.d/moxi"]
   content => template("moxi/logrotate.d/moxi.erb")
File["/opt/moxi"]
   owner => "moxi"
   group => "moxi"
   mode => "0755"
   ensure => directory
   require => Package["moxi-server"]

We make the directory writeable by moxi so that we can dump pid, log, sock… ugly, yeah.

File["/opt/moxi/etc/moxi-cluster.cfg"]
   owner => "moxi"
   group => "moxi"
   content => template("moxi/moxi-cluster.cfg.erb")
   require => Package["moxi-server"]
   notify => Service["moxi-server"]
File["/opt/moxi/etc/moxi.cfg"]
   owner => "moxi"
   group => "moxi"
   content => template("moxi/moxi.cfg.erb")
   require => Package["moxi-server"]
   notify => Service["moxi-server"]

The main configuration files

Package["moxi-server"]
   ensure => installed
Service["moxi-server"]
   enable => true
   ensure => running
   hasstatus => true
   require => Package["moxi-server"]
User["moxi"]
   comment => "Moxi system user"
   home => "/opt/moxi"
   shell => "/sbin/nologin"
   system => true
   require => Package["moxi-server"]

[Validate]