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/tubemogul/puppet-aerospike/blob/master/README.markdown

Parameters:

  • asinstall (Any) (defaults to: true)
  • version (Any) (defaults to: '3.8.4')
  • download_dir (Any) (defaults to: '/usr/local/src')
  • download_url (Any) (defaults to: undef)
  • remove_archive (Any) (defaults to: false)
  • edition (Any) (defaults to: 'community')
  • target_os_tag (Any) (defaults to: $::aerospike::params::target_os_tag)
  • download_user (Any) (defaults to: undef)
  • download_pass (Any) (defaults to: undef)
  • asinstall_params (Any) (defaults to: undef)
  • system_user (Any) (defaults to: 'root')
  • system_uid (Any) (defaults to: undef)
  • system_group (Any) (defaults to: 'root')
  • system_gid (Any) (defaults to: undef)
  • manage_service (Any) (defaults to: true)
  • restart_on_config_change (Any) (defaults to: true)
  • enable_logging (Any) (defaults to: true)
  • config_service (Any) (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 (Any) (defaults to: $::aerospike::params::config_logging)
  • config_mod_lua (Any) (defaults to: {})
  • config_net_svc (Any) (defaults to: { 'address' => 'any', 'port' => 3000, })
  • config_net_fab (Any) (defaults to: { 'address' => 'any', 'port' => 3001, })
  • config_net_inf (Any) (defaults to: { 'address' => 'any', 'port' => 3003, })
  • config_net_hb (Any) (defaults to: { 'mode' => 'multicast', 'address' => 'any', 'port' => 9918, 'interval' => 150, 'timeout' => 10, })
  • config_ns (Any) (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 (Any) (defaults to: {})
  • config_sec (Any) (defaults to: {})
  • config_xdr (Any) (defaults to: {})
  • config_xdr_credentials (Any) (defaults to: {})
  • service_status (Any) (defaults to: 'running')
  • service_enable (Any) (defaults to: true)
  • service_provider (Any) (defaults to: undef)
  • amc_install (Any) (defaults to: false)
  • amc_version (Any) (defaults to: '4.0.19')
  • amc_download_dir (Any) (defaults to: '/usr/local/src')
  • amc_download_url (Any) (defaults to: undef)
  • amc_manage_service (Any) (defaults to: false)
  • amc_service_status (Any) (defaults to: 'running')
  • amc_service_enable (Any) (defaults to: true)
  • tools_version (Any) (defaults to: undef)
  • tools_download_url (Any) (defaults to: undef)
  • tools_download_dir (Any) (defaults to: '/usr/local/src')
  • disable_irqbalance (Any) (defaults to: false)
  • device (Any) (defaults to: undef)
  • udf_path (Any) (defaults to: '/opt/aerospike/usr/udf/lua')
  • manage_udf (Any) (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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'manifests/init.pp', line 10

class aerospike (
  $asinstall                = true,
  $version                  = '3.8.4',
  $download_dir             = '/usr/local/src',
  $download_url             = undef,
  $remove_archive           = false,
  $edition                  = 'community',
  $target_os_tag            = $::aerospike::params::target_os_tag,
  $download_user            = undef,
  $download_pass            = undef,
  $asinstall_params         = undef,
  $system_user              = 'root',
  $system_uid               = undef,
  $system_group             = 'root',
  $system_gid               = undef,
  $manage_service           = true,
  $restart_on_config_change = true,
  $enable_logging           = true,
  $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,
  },
  $config_logging = $::aerospike::params::config_logging,
  $config_mod_lua = {},
  $config_net_svc = {
    'address' => 'any',
    'port'    => 3000,
  },
  $config_net_fab = {
    'address' => 'any',
    'port'    => 3001,
  },
  $config_net_inf = {
    'address' => 'any',
    'port'    => 3003,
  },
  $config_net_hb  = {
    'mode'     => 'multicast',
    'address'  => 'any',
    'port'     => 9918,
    'interval' => 150,
    'timeout'  => 10,
  },
  $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',
      ],
    },
  },
  $config_cluster         = {},
  $config_sec             = {},
  $config_xdr             = {},
  $config_xdr_credentials = {},
  $service_status         = 'running',
  $service_enable         = true,
  $service_provider       = undef,
  $amc_install            = false,
  $amc_version            = '4.0.19',
  $amc_download_dir       = '/usr/local/src',
  $amc_download_url       = undef,
  $amc_manage_service     = false,
  $amc_service_status     = 'running',
  $amc_service_enable     = true,
  $tools_version          = undef,
  $tools_download_url     = undef,
  $tools_download_dir     = '/usr/local/src',
  $disable_irqbalance     = false,
  $device                 = undef,
  $udf_path               = '/opt/aerospike/usr/udf/lua',
  $manage_udf             = false,
) inherits ::aerospike::params {

  validate_string(
    $version,
    $download_dir,
    $edition,
    $target_os_tag,
    $system_user,
    $system_group,
    $service_status,
    $amc_version,
    $amc_download_dir,
    $amc_service_status,
    $tools_download_dir,
  )
  validate_bool(
    $asinstall,
    $amc_install,
    $amc_manage_service,
    $amc_service_enable,
    $manage_service,
    $remove_archive,
    $restart_on_config_change,
    $service_enable,
  )
  validate_hash(
    $config_service,
    $config_logging,
    $config_mod_lua,
    $config_net_svc,
    $config_net_fab,
    $config_net_inf,
    $config_net_hb,
    $config_ns,
    $config_cluster,
    $config_sec,
    $config_xdr,
    $config_xdr_credentials,
  )
  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']
  }
}