Puppet Class: aerospike

Inherits:
::aerospike::params
Defined in:
manifests/init.pp

Overview

Class: aerospike

Manage an aerospike installation, configuration and service. It can optionally install the amc console and manage the corresponding service.

For the full documentation, please refer to: github.com/deric/puppet-aerospike/blob/master/README.md

Parameters:

  • asinstall (Boolean) (defaults to: true)
  • version (String) (defaults to: '5.7.0.11')
  • download_dir (Stdlib::Absolutepath) (defaults to: '/usr/local/src')
  • download_url (Optional[String]) (defaults to: undef)
  • remove_archive (Boolean) (defaults to: false)
  • edition (String) (defaults to: 'community')
  • target_os_tag (String) (defaults to: $::aerospike::params::target_os_tag)
  • download_user (Optional[String]) (defaults to: undef)
  • download_pass (Optional[String]) (defaults to: undef)
  • asinstall_params (Optional[String]) (defaults to: undef)
  • system_user (String) (defaults to: 'root')
  • system_uid (Optional[Integer]) (defaults to: undef)
  • system_group (String) (defaults to: 'root')
  • system_gid (Optional[Integer]) (defaults to: undef)
  • manage_service (Boolean) (defaults to: true)
  • restart_on_config_change (Boolean) (defaults to: true)
  • enable_logging (Boolean) (defaults to: true)
  • config_service (Hash) (defaults to: { 'paxos-single-replica-limit' => 1, 'pidfile' => '/var/run/aerospike/asd.pid', 'service-threads' => 4, 'transaction-queues' => 4, 'transaction-threads-per-queue' => 4, 'proto-fd-max' => 15000, })
  • config_logging (Hash) (defaults to: $::aerospike::params::config_logging)
  • config_mod_lua (Hash) (defaults to: {})
  • config_net_svc (Hash) (defaults to: { 'address' => 'any', 'port' => 3000, })
  • config_net_fab (Hash) (defaults to: { 'address' => 'any', 'port' => 3001, })
  • config_net_inf (Hash) (defaults to: { 'address' => 'any', 'port' => 3003, })
  • config_net_hb (Hash) (defaults to: { 'mode' => 'multicast', 'address' => 'any', 'port' => 9918, 'interval' => 150, 'timeout' => 10, })
  • config_ns (Hash) (defaults to: { 'foo' => { 'replication-factor' => 2, 'memory-size' => '1G', 'storage-engine device' => [ 'file /data/aerospike/data1.dat', 'file /data/aerospike/data2.dat', 'filesize 10G', 'data-in-memory false', ], }, })
  • config_cluster (Hash) (defaults to: {})
  • config_sec (Hash) (defaults to: {})
  • config_xdr (Hash) (defaults to: {})
  • config_xdr_credentials (Hash) (defaults to: {})
  • service_status (String) (defaults to: 'running')
  • service_enable (Boolean) (defaults to: true)
  • service_provider (Optional[String]) (defaults to: undef)
  • amc_install (Boolean) (defaults to: false)
  • amc_version (String) (defaults to: '4.0.19')
  • amc_download_dir (Stdlib::Absolutepath) (defaults to: '/usr/local/src')
  • amc_download_url (Optional[String]) (defaults to: undef)
  • amc_manage_service (Boolean) (defaults to: false)
  • amc_service_status (String) (defaults to: 'running')
  • amc_service_enable (Boolean) (defaults to: true)
  • tools_version (Optional[String]) (defaults to: undef)
  • tools_download_url (Optional[String]) (defaults to: undef)
  • tools_download_dir (Stdlib::Absolutepath) (defaults to: '/usr/local/src')
  • disable_irqbalance (Boolean) (defaults to: false)
  • device (Optional[String]) (defaults to: undef)
  • udf_path (Stdlib::Absolutepath) (defaults to: '/opt/aerospike/usr/udf/lua')
  • manage_udf (Boolean) (defaults to: false)


10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'manifests/init.pp', line 10

class aerospike (
  Boolean              $asinstall                = true,
  String               $version                  = '5.7.0.11',
  Stdlib::Absolutepath $download_dir             = '/usr/local/src',
  Optional[String]     $download_url             = undef,
  Boolean              $remove_archive           = false,
  String               $edition                  = 'community',
  String               $target_os_tag            = $::aerospike::params::target_os_tag,
  Optional[String]     $download_user            = undef,
  Optional[String]     $download_pass            = undef,
  Optional[String]     $asinstall_params         = undef,
  String               $system_user              = 'root',
  Optional[Integer]    $system_uid               = undef,
  String               $system_group             = 'root',
  Optional[Integer]    $system_gid               = undef,
  Boolean              $manage_service           = true,
  Boolean              $restart_on_config_change = true,
  Boolean              $enable_logging           = true,
  Hash                 $config_service           = {
    'paxos-single-replica-limit'    => 1,
    'pidfile'                       => '/var/run/aerospike/asd.pid',
    'service-threads'               => 4,
    'transaction-queues'            => 4,
    'transaction-threads-per-queue' => 4,
    'proto-fd-max'                  => 15000,
  },
  Hash $config_logging = $::aerospike::params::config_logging,
  Hash $config_mod_lua = {},
  Hash $config_net_svc = {
    'address' => 'any',
    'port'    => 3000,
  },
  Hash $config_net_fab = {
    'address' => 'any',
    'port'    => 3001,
  },
  Hash $config_net_inf = {
    'address' => 'any',
    'port'    => 3003,
  },
  Hash $config_net_hb  = {
    'mode'     => 'multicast',
    'address'  => 'any',
    'port'     => 9918,
    'interval' => 150,
    'timeout'  => 10,
  },
  Hash $config_ns      = {
    'foo'                     => {
      'replication-factor'    => 2,
      'memory-size'           => '1G',
      'storage-engine device' => [
        'file /data/aerospike/data1.dat',
        'file /data/aerospike/data2.dat',
        'filesize 10G',
        'data-in-memory false',
      ],
    },
  },
  Hash                 $config_cluster         = {},
  Hash                 $config_sec             = {},
  Hash                 $config_xdr             = {},
  Hash                 $config_xdr_credentials = {},
  String               $service_status         = 'running',
  Boolean              $service_enable         = true,
  Optional[String]     $service_provider       = undef,
  Boolean              $amc_install            = false,
  String               $amc_version            = '4.0.19',
  Stdlib::Absolutepath $amc_download_dir       = '/usr/local/src',
  Optional[String]     $amc_download_url       = undef,
  Boolean              $amc_manage_service     = false,
  String               $amc_service_status     = 'running',
  Boolean              $amc_service_enable     = true,
  Optional[String]     $tools_version          = undef,
  Optional[String]     $tools_download_url     = undef,
  Stdlib::Absolutepath $tools_download_dir     = '/usr/local/src',
  Boolean              $disable_irqbalance     = false,
  Optional[String]     $device                 = undef,
  Stdlib::Absolutepath $udf_path               = '/opt/aerospike/usr/udf/lua',
  Boolean              $manage_udf             = false,
) inherits ::aerospike::params {

  if $service_provider { validate_string($service_provider) }
  if $system_uid and ! is_integer($system_uid) { fail("invalid ${system_uid} provided") }
  if $system_gid and ! is_integer($system_gid) { fail("invalid ${system_gid} provided") }
  if $tools_version { validate_string($tools_version) }

  include aerospike::irqbalance
  include aerospike::service

  if $asinstall {
    include aerospike::install
    include aerospike::config

    Class['aerospike::install'] -> Class['aerospike::config'] -> Class['aerospike::service']

    if $manage_service and $restart_on_config_change {
      Class['aerospike::config'] ~> Class['aerospike::service']
    }
  }

  if $amc_install {
    include aerospike::amc
    Class['aerospike::amc'] -> Class['aerospike::service']
  }
}