Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'deric-aerospike', '2.0.0'
Learn more about managing modules with a PuppetfileDocumentation
Aerospike Puppet module
Overview
This module installs the Aerospike NoSQL database engine and configures it. It can optionally install the Aerospike Management Console (aka. amc) and manage the corresponding service.
Module Description
What is this module capable of doing?
- Download and install the Aerospike database engine in a specific version
- Optionally download and install the Aerospike Management Console in a specific version
- Optionally download and install specific version of the Aerospike Tools
- Manage a specific user and group (with their corresponding fixed uid/gid) dedicated to the service
- Manage all the contexts configurable in an Aerospike server installation
- Manage the Aerospike database server service
- Optionnally manage the Aerospike Management Console service
Setup
What aerospike affects
Files managed by the module:
/etc/aerospike/aerospike.conf
Setup Requirements
The module requires:
Beginning with aerospike
The module can be used out of the box directly, it just requires puppet-community's archive module and puppetlab's stdlib to be in your modulepath.
To install, just use the following, puppet software will take care of puling the dependencies:
puppet module install deric/aerospike
If you are working on a version not coming from the forge but directly from the github repo, here is how you can install the dependencies of the module:
puppet module install puppetlabs/stdlib
puppet module install puppet/archive
Usage
Those examples include the puppet-only configuration, and the corresponding configuration for those who use hiera (I find it more convienient for copy/paste of a full configuration when you have both - yes, I'm lazy ;-) ).
Using the aerospike enterprise version
In this example you will setup an installation of an aerospike server 3.8.4 enterprise version using the default namespace:
class { 'aerospike':
version => '3.8.4',
edition => 'enterprise',
download_user => 'myuser',
download_pass => 'mypassword',
}
Or, using hiera, you just include 'aerospike' in your puppet profile and in hiera (of course, you use eyaml and encrypt your password with it! ;-) ):
---
aerospike::version: 3.8.4
aerospike::edition: enterprise
aerospike::download_user: myuser
aerospike::download_pass: mypassword
Note: If you plan to switch from a community installation to an enterprise one, you will need to uninstall the aerospike-server-community and optionally the aerospike-tools packages.
Defining namespaces
Configuring 2 namespaces 'bar' (stored in memory) and 'foo' (store in files on ssd devices) containing a hahaha set protected from eviction:
class { 'aerospike':
config_ns => {
'bar' => {
'replication-factor' => 2,
'memory-size' => '10G',
'default-ttl' => '30d',
'storage-engine' => 'memory',
},
'foo' => {
'replication-factor' => 2,
'memory-size' => '1G',
'default-ttl' => 172800,
'high-water-disk-pct' => 90,
'high-water-memory-pct' => 90,
'set hahaha' => [ 'set-disable-eviction true', ],
'storage-engine device' => [
'file /data/aerospike/foo1.dat',
'file /data/aerospike/foo2.dat',
'filesize 10G',
'data-in-memory false',
'write-block-size 128K',
'scheduler-mode noop',
]
},
},
}
Or, using hiera, you just include 'aerospike' in your puppet profile and in hiera:
---
aerospike::config_ns:
bar:
replication-factor: 2
memory-size: 10G
default-ttl: 30d
storage-engine: memory
foo:
replication-factor: 2
memory-size: 1G
default-ttl: 172800
high-water-disk-pct: 90
high-water-memory-pct: 90
set hahaha:
- set-disable-eviction true'
storage-engine device:
- 'file /data/aerospike/foo1.dat'
- 'file /data/aerospike/foo2.dat'
- 'filesize 10G'
- 'data-in-memory false'
- 'write-block-size 128K'
- 'scheduler-mode noop'
Installing the Aerospike Management Console
To install and the management console and have the service managed by puppet, use:
class { 'aerospike':
amc_install => true,
amc_manage_service => true,
}
Or, using hiera, you just include 'aerospike' in your puppet profile and in hiera:
---
aerospike::amc_install: true
aerospike::amc_manage_service: true
Installing specific version of the Aerospike Tools
To install specific version of the Aerospike Tools, use:
class { 'aerospike':
tools_version => '3.16.0',
}
Or, using hiera, you just include 'aerospike' in your puppet profile and in hiera:
---
aerospike::tools_version: '3.16.0'
Configuring a rack-aware cluster
In this example we will be configuring a 3 nodes rack-aware cluster in a non-multicast environment like in most cloud provider environments (so using Mesh heartbeats). The cluster group id is a totally arbitrary choice.
In this example, the servers IP are 192.168.1.100, 192.168.1.101 and 192.168.1.102
Note: You will need aerospike 3.7.0 or higher to support some of those parameters.
class { 'aerospike':
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,
'paxos-protocol' => 'v4',
'paxos-recovery-policy' => 'auto-reset-master',
},
config_net_hb => {
'mode' => 'mesh',
'address' => 'any',
'port' => 3002,
'mesh-seed-address-port 192.168.1.100' => 3002,
'mesh-seed-address-port 192.168.1.101' => 3002,
'mesh-seed-address-port 192.168.1.102' => 3002,
'interval' => 150,
'timeout' => 20,
},
config_cluster => {
'mode' => 'dynamic',
'self-group-id' => 666,
},
}
Which would result in the following hiera configuration:
---
aerospike::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
paxos-protocol: v4
paxos-recovery-policy: auto-reset-master
aerospike::config_net_hb:
mode: mesh
address: any
port: 3002
'mesh-seed-address-port 192.168.1.100': 3002
'mesh-seed-address-port 192.168.1.101': 3002
'mesh-seed-address-port 192.168.1.102': 3002
interval: 150
timeout: 20
aerospike::config_cluster:
mode: dynamic
self-group-id: 666
Defining credentials for XDR
To define credentials of remote cluster(s) for XDR in a separate secured file '/etc/aerospike/security-credentials_$DC_name.txt', use:
class { 'aerospike':
config_xdr_credentials => {"DC1"=>{"username"=>"xdr_user_DC1", "password"=>"xdr_password_DC1"}},
}
Or, using hiera, you just include 'aerospike' in your puppet profile and in hiera:
---
aerospike::config_xdr_credentials:
DC1:
username: 'xdr_user_DC1'
password: 'xdr_password_DC1'
Full real-life multi-datacenter replication example for XDR with security enabled
Note that this example requires you to run at least aerospike 3.8.1.
To define a XDR replication over a namespace to multiple datacenters, you can work based on the following example (note that it is based on a real-life prod example. Of course, IP and other security-sensitive informations here are fake or removed):
class { 'aerospike':
version => '3.8.4',
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,
'paxos-protocol' => 'v4',
'paxos-recovery-policy' => 'auto-reset-master',
'migrate-threads' => 2,
},
config_logging => {
'/var/logs/aerospike.log' => [ 'any info' ],
},
config_net_hb => {
'mode' => 'mesh',
'address' => 'any',
'port' => 3002,
'mesh-seed-address-port 10.0.0.101' => 3002,
'mesh-seed-address-port 10.0.0.102' => 3002,
'mesh-seed-address-port 10.0.0.103' => 3002,
'mesh-seed-address-port 10.0.0.104' => 3002,
'mesh-seed-address-port 10.0.0.105' => 3002,
'mesh-seed-address-port 10.0.0.106' => 3002,
'mesh-seed-address-port 10.0.0.107' => 3002,
'mesh-seed-address-port 10.0.0.108' => 3002,
'mesh-seed-address-port 10.0.0.109' => 3002,
'mesh-seed-address-port 10.0.0.110' => 3002,
'mesh-seed-address-port 10.0.0.111' => 3002,
'mesh-seed-address-port 10.0.0.112' => 3002,
'mesh-seed-address-port 10.0.0.113' => 3002,
'mesh-seed-address-port 10.0.0.114' => 3002,
'mesh-seed-address-port 10.0.0.115' => 3002,
'mesh-seed-address-port 10.0.0.116' => 3002,
'mesh-seed-address-port 10.0.0.117' => 3002,
'mesh-seed-address-port 10.0.0.118' => 3002,
'mesh-seed-address-port 10.0.0.119' => 3002,
'mesh-seed-address-port 10.0.0.120' => 3002,
'interval' => 150,
'timeout' => 20,
},
config_cluster => {
'mode' => 'dynamic',
'self-group-id' => 666,
},
config_ns => {
'replicatedns' => {
'enable-xdr' => 'true',
'xdr-remote-datacenter' => [ 'DC1', 'DC2' ],
'replication-factor' => 2,
'memory-size' => '100G',
'default-ttl' => '30D',
'high-water-disk-pct' => 55,
'high-water-memory-pct' => 65,
'storage-engine device' => [
'device /dev/xvdb /dev/xvdf',
'device /dev/xvdc /dev/xvdg',
'data-in-memory false',
'write-block-size 1024K',
'scheduler-mode noop',
'defrag-lwm-pct 55',
],
},
},
config_sec => {
'enable-security' => 'true',
},
config_xdr => {
'enable-xdr' => 'true',
'xdr-digestlog-path' => '/mnt/aerospike-digestlog 100G',
'xdr-ship-bins' => 'true',
'datacenter DC1' => [
'dc-node-address-port 192.168.1.100 3000',
'dc-node-address-port 192.168.1.101 3000',
'dc-node-address-port 192.168.1.102 3000',
'dc-node-address-port 192.168.1.103 3000',
'dc-node-address-port 192.168.1.104 3000',
'dc-node-address-port 192.168.1.105 3000',
'dc-node-address-port 192.168.1.106 3000',
'dc-node-address-port 192.168.1.107 3000',
'dc-use-alternate-services true',
'dc-security-config-file /etc/aerospike/security-credentials_DC1.txt'
],
'datacenter DC2' => [
'dc-node-address-port 193.168.2.100 3000',
'dc-node-address-port 192.168.2.102 3000',
'dc-node-address-port 192.168.2.103 3000',
'dc-node-address-port 192.168.2.104 3000',
'dc-node-address-port 192.168.2.105 3000',
'dc-node-address-port 192.168.2.106 3000',
'dc-node-address-port 192.168.2.107 3000',
'dc-node-address-port 192.168.2.108 3000',
'dc-use-alternate-services true',
'dc-security-config-file /etc/aerospike/security-credentials_DC2.txt'
],
},
config_xdr_credentials => {
'DC1' => {
'username' => 'svc_xdr_dc1',
'password' => 'password_encrypted_with_eyaml_goes_there',
},
'DC2' => {
'username' => 'svc_xdr_dc2',
'password' => 'password_encrypted_with_eyaml_goes_there',
},
}
}
Or, using hiera, you just include 'aerospike' in your puppet profile and in hiera:
---
aerospike::version: 3.8.4
aerospike::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
paxos-protocol: v4
paxos-recovery-policy: auto-reset-master
migrate-threads: 2
aerospike::config_logging:
'/var/logs/aerospike.log': [ 'any info' ]
aerospike::config_net_hb:
mode: mesh
address: any
port: 3002
'mesh-seed-address-port 10.0.0.101': 3002
'mesh-seed-address-port 10.0.0.102': 3002
'mesh-seed-address-port 10.0.0.103': 3002
'mesh-seed-address-port 10.0.0.104': 3002
'mesh-seed-address-port 10.0.0.105': 3002
'mesh-seed-address-port 10.0.0.106': 3002
'mesh-seed-address-port 10.0.0.107': 3002
'mesh-seed-address-port 10.0.0.108': 3002
'mesh-seed-address-port 10.0.0.109': 3002
'mesh-seed-address-port 10.0.0.110': 3002
'mesh-seed-address-port 10.0.0.111': 3002
'mesh-seed-address-port 10.0.0.112': 3002
'mesh-seed-address-port 10.0.0.113': 3002
'mesh-seed-address-port 10.0.0.114': 3002
'mesh-seed-address-port 10.0.0.115': 3002
'mesh-seed-address-port 10.0.0.116': 3002
'mesh-seed-address-port 10.0.0.117': 3002
'mesh-seed-address-port 10.0.0.118': 3002
'mesh-seed-address-port 10.0.0.119': 3002
'mesh-seed-address-port 10.0.0.120': 3002
interval: 150
timeout: 20
aerospike::config_cluster:
mode: dynamic
self-group-id: 666
aerospike::config_ns:
replicatedns:
enable-xdr: true
xdr-remote-datacenter:
- DC1
- DC2
replication-factor: 2
memory-size: 100G
default-ttl: 30D
high-water-disk-pct: 55
high-water-memory-pct: 65
storage-engine device:
- 'device /dev/xvdb /dev/xvdf'
- 'device /dev/xvdc /dev/xvdg'
- 'data-in-memory false'
- 'write-block-size 1024K'
- 'scheduler-mode noop'
- 'defrag-lwm-pct 55'
aerospike::config_sec:
enable-security: true
aerospike::config_xdr:
enable-xdr: true
xdr-digestlog-path: '/mnt/aerospike-digestlog 100G'
xdr-ship-bins: true
'datacenter DC1':
- 'dc-node-address-port 192.168.1.100 3000'
- 'dc-node-address-port 192.168.1.101 3000'
- 'dc-node-address-port 192.168.1.102 3000'
- 'dc-node-address-port 192.168.1.103 3000'
- 'dc-node-address-port 192.168.1.104 3000'
- 'dc-node-address-port 192.168.1.105 3000'
- 'dc-node-address-port 192.168.1.106 3000'
- 'dc-node-address-port 192.168.1.107 3000'
- 'dc-use-alternate-services true'
- 'dc-security-config-file /etc/aerospike/security-credentials_DC1.txt'
'datacenter DC2':
- 'dc-node-address-port 192.168.2.100 3000'
- 'dc-node-address-port 192.168.2.102 3000'
- 'dc-node-address-port 192.168.2.103 3000'
- 'dc-node-address-port 192.168.2.104 3000'
- 'dc-node-address-port 192.168.2.105 3000'
- 'dc-node-address-port 192.168.2.106 3000'
- 'dc-node-address-port 192.168.2.107 3000'
- 'dc-node-address-port 192.168.2.108 3000'
- 'dc-use-alternate-services true'
- 'dc-security-config-file /etc/aerospike/security-credentials_DC2.txt'
aerospike::config_xdr_credentials:
DC1:
username: svc_xdr_dc1
password: password_encrypted_with_eyaml_goes_there
DC2:
username: svc_xdr_dc2
password: password_encrypted_with_eyaml_goes_there
Note that if you are only doing xdr to 1 datacenter, you can use a string
instead of an array for the xdr-remote-datacenter
parameter:
xdr-remote-datacenter: DC1
Not restarting the service
There are 2 solutions for that. The most common usage for that would be the 1st solution proposed.
Not restarting when a config is changed
To still having puppet start or stop the service as you defined but not restart
the service when a configuration is changed, set the restart_on_config_change
parameter to false
.
This is the method you will want to choose if you are changing dynamic
parameters with the asinfo
or asadm
command-line tools and that you change
the config file just to avoid problems on next restart.
Note that this won't restart the service when credentials are modified either.
class { 'aerospike':
restart_on_config_change => false,
}
Or via hiera:
aerospike:
restart_on_config_change: false
Not managing the service with puppet at all
To do that you define the manage_service
parameter to false
but keep in mind
that if there's a problem and the service goes down, puppet won't restart it.
Puppet won't restart the service if there's a config change either.
class { 'aerospike':
manage_service => false,
}
Or via hiera:
aerospike:
manage_service: false
Reference
Public classes
aerospike
: Installs and configures Aerospike server and the management console.
Private classes and defines
aerospike::install
: Installs Aerospike server and the management console.aerospike::config
: Configures Aerospike server and the management console.aerospike::service
: Manages the Aerospike server and the management console services.aerospike::xdr_credentials_file
: manages the credential files for xdr.
Parameters
Class aerospike
asinstall
If set to false, this won't download and install the aerospike server package. Useful if need install only AMC.
Default: true
version
Version of the aerospike database engine to install.
Default: 3.8.4
download_dir
Directory where to download the archive before unpacking it.
Default: /usr/local/src
download_url
URL from where to download the tarball. Only populate it if you want the package to be downloaded from somewhere else than the aerospike website.
Note: It is mandatory to keep the name of the target file set to the
following pattern when using this custom url:
aerospike-server-${aerospike::edition}-${aerospike::version}-${aerospike::target_os_tag}.tgz
Default: http://www.aerospike.com/artifacts/aerospike-server-${aerospike::edition}/${aerospike::version}/aerospike-server-${aerospike::edition}-${aerospike::version}-${aerospike::target_os_tag}.tgz
remove_archive
Whether to remove the tarball once extracted for the aerospike server part. Is also used for the amc when downloading a tarball (not for the deb package).
Default: false
edition
The edition to use (enterprise or community).
Default: community
target_os_tag
Tag used in the target file name to identify the distribution package to use.
Default: ubuntu18.04
download_user
Username to use to download the enterprise version of the package. This is used for both the download of the aerospike server package and the amc. This parameter is not necessary when downloading the community version from the aerospike repositories but you can use it if you download from a password-protected custom url.
Default: undef
download_pass
Password to use to download the enterprise version of the package to use. It is used for both the download of the aerospike server package and the amc.
Default: undef
system_user
OS user that the service will use in the service configuration. This user will only be defined if not already defined somewhere else in your Puppet catalog.
Default: root
system_uid
UID of the OS user to be used by the service.
Default: undef
(number is assigned by the OS)
system_group
OS group that the service will use in the service configuration. This group will only be defined if not already defined somewhere else in your Puppet catalog.
Default: root
system_gid
GID of the OS user to be used by the service.
Default: undef
(number is assigned by the OS)
manage_service
Boolean indicating whether you want to manage the service status or not.
If set to false, the service_status
parameter will be ignored but the service
will still be configured.
Default: true
service_provider
String defining mechanism for managing service. See Puppet docs for supported values.
Default: undef
(Puppet will determine appropriate value)
restart_on_config_change
Boolean indicating whether or not you want to restart the aerospike service whenever there's a change in the configuration files or credential files.
Note that it is different from manage_service
because the service will still
be managed by puppet if you set it to false
(as long as manage_service
is set
to true
), so if the service goes down, puppet will still take care of
restarting it.
Default: true
config_service
Configuration parameters to define in the service context of the aerospike configuration file.
This parameter is a hash table with:
- the property name as key
- the property value as value
Note: The user and group are already defined by the system_user and system_group parameters. No need to specify them again.
The default value is:
{
'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,
}
Which generates the following configuration for the service context:
service {
user root
group root
paxos-single-replica-limit 1
pidfile /var/run/aerospike/asd.pid
proto-fd-max 15000
service-threads 4
transaction-queues 4
transaction-threads-per-queue 4
}
For more information, check the properties declared as in the "service" context in http://www.aerospike.com/docs/reference/configuration/
config_logging
Configuration parameters to define in the logging context of the aerospike configuration file.
This parameter is a hash table with:
* the log file path as key (Reminder: Log file must be an absolute path.)
* an array with the definition of all the contexts definitions as value
The default value is:
aerospike::config_logging:
'/var/log/aerospike/aerospike.log':
- any detail
Which generates the following configuration for the logging context:
logging {
file /var/log/aerospike/aerospike.log {
context any info
}
}
For systemd based system, the logs by default are configured to go to the console:
aerospike::config_logging:
console:
- any detail
Which generates following configuration:
logging {
console {
context any info
}
}
For more information about logging management in aerospike, check the documentation.
config_mod_lua
Configuration parameters for mod-lua
context.
This parameter is a hash which is empty by default.
{
'config_mod_lua' => {
'user-path' => '/opt/aerospike/usr/udf/lua'
},
}
Which generates the following configuration for the mod-lua
context:
mod-lua {
user-path /opt/aerospike/usr/udf/lua
}
config_net_svc
Configuration parameters to define in the service sub-stanza in the network context of the aerospike configuration file.
This parameter is a hash table with:
- the property name as key
- the property value as value
Default:
{
'address' => 'any',
'port' => 3000,
}
For more information about this sub-stanza: http://www.aerospike.com/docs/operations/configure/network/general/
config_net_fab
Configuration parameters to define in the fabric sub-stanza in the network context of the aerospike configuration file.
This parameter is a hash table with:
- the property name as key
- the property value as value
Default:
{
'address' => 'any',
'port' => 3001,
}
For more information about this sub-stanza: http://www.aerospike.com/docs/operations/configure/network/general/
config_net_inf
Configuration parameters to define in the info sub-stanza in the network context of the aerospike configuration file.
This parameter is a hash table with:
- the property name as key
- the property value as value
Default:
{
'address' => 'any',
'port' => 3003,
}
For more information about this sub-stanza: http://www.aerospike.com/docs/operations/configure/network/general/
config_net_hb
Configuration parameters to define in the heartbeat sub-stanza in the network context of the aerospike configuration file.
This parameter is a hash table with:
- the property name as key
- the property value as value
IMPORTANT: for declaring mesh-seed-address-port, you will need to use the 'mesh-seed-address-port <IP Address>'
as a key if you want it to work.
See Configuring a rack-aware cluster for an example using this.
Default:
{
'mode' => 'multicast',
'address' => 'any',
'port' => 9918,
'interval' => 150,
'timeout' => 10,
}
For more information about the heartbeat sub-stanza: http://www.aerospike.com/docs/operations/configure/network/heartbeat/
config_ns
Configuration parameters to define the namespaces contexts in the aerospike configuration file.
This parameter is a hash table with:
- the namespace name as key
- the value is another hash table composed by:
- the name of the property as key
- the value of the property as value.
When defining a sub-stanza in it for a property as you do for a storage-engine device, you have to concatenante the property and the value as the key (for example: "storage-engine device") and set the value as an array, each item of the array being a line of configuration that you want to have defined as-is in your sub-stanza. Check the example section of this file for a more concrete example.
Default:
{
'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',
]
},
}
Note: This module won't create the path to your data files. This path must exist. If not, aerospike won't start. In this example, you have to ensure of the existence of your /data/aerospike directory in your profile.
For more details on the properties you can define on the namespace context, check: http://www.aerospike.com/docs/reference/configuration/
config_cluster
Configuration parameters to define the cluster context in the aerospike configuration file.
This parameter is a hash table with:
- the property name as key
- the property value as value
Default: {}
For more information on how to define a rack-aware cluster, see: http://www.aerospike.com/docs/operations/configure/network/rack-aware/
config_sec
Configuration parameters to define the security context in the aerospike configuration file.
This parameter is a hash table with:
- the property name as key
- the value of the property as value.
Note: When defining a subcontext in it for a property as you do for the syslog or log subcontexts, set the subcontext name as the key and the value will be an array with each item of the array being a full line of configuration.
Default: {}
config_xdr
Configuration parameters to define the xdr context in the aerospike configuration file (for cross-datacenter replication).
This parameter is a hash table with:
- the property name as key
- the value of the property as value.
Note: When defining a subcontext in it for a property as you do for the datacenter subcontext, set the subcontext name as the key and the value will be an array with each item of the array being a full line of configuration.
Default: {}
For more informations about configuring xdr, check: http://www.aerospike.com/docs/operations/configure/cross-datacenter/
config_xdr_credentials
Configuration parameters to define the xdr credentials (user/password) for the remote cluster in the separate secured file when security enabled.
This parameter is a hash table with:
- the property name as key
- the value of the property as value.
Note: When defining a subcontext in it for a property as you do for the defining the name of datacenter subcontext, set the subcontext name as the key and the value will be a hash table with the property name (username/password) as key and the value of the property as value.
Default: {}
For more informations about configuring xdr when security enabled, check: http://www.aerospike.com/docs/operations/configure/cross-datacenter/
service_status
Controls the status of the service ("ensure" attribute in the puppet service declaration).
Default: running
amc_install
If set to true, this will download and install the amc console package.
Default: false
amc_version
Sets which version of the amc package to install.
Default: 4.0.19
amc_download_dir
Directory used to download the amc package.
Default: /usr/local/src
amc_download_url
URL from which to download the amc package. Only populate it if you want the package to be downloaded from somewhere else than the aerospike website.
Note: It is mandatory to keep the name of the target file set to the
same pattern as the original name when using this custom url aka:
aerospike-amc-${aerospike::edition}-${amc_version}${amc_pkg_extension}
The default url is:
http://www.aerospike.com/artifacts/aerospike-amc-${aerospike::edition}/${amc_version}/aerospike-amc-${aerospike::edition}-${amc_version}${amc_pkg_extension}
amc_manage_service
Boolean that defines if you want to control the amc service via puppet or not.
Default: false
amc_service_status
Controls the status of the management console service ("ensure" attribute in the puppet service declaration).
Default: running
amc_service_enable
Boolean indicating whether you want to manage the service status or not.
Default: true
tools_version
Sets which version of the "tools" package to install. If not specified, "tools" will be installed from Aerospike Server package.
Default: undef
tools_download_url
URL from which to download the "tools" package. Only populate it if you want the package to be downloaded from somewhere else than the aerospike website.
Note: It is mandatory to keep the name of the target file set to the
same pattern as the original name when using this custom url aka:
aerospike-tools-${aerospike::tools_version}-${aerospike::target_os_tag}
The default url is:
https://www.aerospike.com/artifacts/aerospike-tools/${aerospike::tools_version}/aerospike-tools-${aerospike::tools_version}-${aerospike::target_os_tag}.tgz
tools_download_dir
Directory used to download the "tools" package.
Default: /usr/local/src
Configuration file generated by default
The default parameters generates the following aerospike configuration file:
# Aerospike database configuration file.
# service context definition
service {
user root
group root
paxos-single-replica-limit 1
pidfile /var/run/aerospike/asd.pid
proto-fd-max 15000
service-threads 4
transaction-queues 4
transaction-threads-per-queue 4
}
# logging context definition
logging {
file /var/log/aerospike/aerospike.log {
context any info
}
}
# network context definition
network {
service {
address any
port 3000
}
fabric {
address any
port 3001
}
info {
address any
port 3003
}
heartbeat {
address any
interval 150
mode multicast
port 9918
timeout 10
}
}
namespace foo {
memory-size 1G
replication-factor 2
storage-engine device {
data-in-memory false
file /data/aerospike/data1.dat
file /data/aerospike/data2.dat
filesize 10G
}
}
Limitations
This module has only been tested against Ubuntu 14.04 - 18.04, but it should work with the Debian and the Red Hat family.
Development
See the CONTRIBUTING.md file.
Change Log
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
[Unreleased]
[2.0.0] - 2022-06-25
- Puppet 8 support
puppetlabs/stdlib
9 compatible- BC Fix proper module requirements
puppetlabs/stdlib
>= 4.13 needed because ofStdlib::AbsolutePath
typepuppet/archive
>= 7.0.0 is required
Added
-
Support installation from deb|rpm package (#2) from Github release page
[1.6.0] - 2022-04-07
Added
- Allow upgrading packages (#1)
Changed
- Use hierarchical facts
[1.5.0] - 2022-03-12
Changed
- Use Puppet Types for all parameters
[1.3.1] - 2018-04-04
Added
- Support for heartbeat unicast
- Support for define multiple
access-address
Changed
- Puppet archive version 1.3.0 is the last one compatible with puppet 3.x and
the last one compatible with this module for now. Changing the
.fixtures.yml
to reflect that.
Fixed
- Fixed some documentation cosmetics in the README
- Fixed some rubocop complains
- Fixed some gems dependencies with ruby 1.9
[1.3.0] - 2017-01-30
Added
- New parameter:
asinstall_params
: sets extra parameters to the installer - New parameter:
service_provider
: sets which provider to use for the service - New parameter:
service_enable
: enable or disable the aerospike service - New parameter:
amc_service_enable
: enable or disable the amc service - The
mod-lua
section has been added in the configuration - Travis jobs for rubocop testing
- Adding missing
stdlib
dependency to themetadata.json
- A
aerospike::params
class has been added to hold the default values - Update
.gitignore
to ignore all version-dependent files - Adding the support for the RedHat OS family in the
metadata.json
Changed
- The default values of
system_uid
andsystem_gid
have been changed from 0 to undef to avoid resource duplications if the User[root] is already declared somewhere else - Change
target_os_tag
to automatically pick the right one based on the OS family (extending the OS family to RedHat) - Updating the
Gemfile
,Rakefile
andspec_helper.rb
based on the modulesync and puppet-module-skeleton - Change of the travis test matrix to get quicker testing process
CHANGELOG
moved toCHANGELOG.md
and using keepachangelog.com amd semver
Fixed
- Massive code quality cleanup based on rubocop and rubocop-spec standards
- Fixed some puppet-lint warnings
- Fixed a typo on the shared tests for the AMC, making the AMC-specific tests not being called after the switch to shared examples
- Forcing the installation of asinstall to explicitly be non-interactive
- Fix filenames for RedHat OS family
Dropped
- Removed the
TODO
file as we switch to github issues for listing the taks - Removed the
CONTRIBUTORS
file. You can get the contributors via the GitHub API
[1.2.1] - 2016-09-13
Fixed
- Fix incorrect configuration generation when using multiple XDR targets for a namespace
[1.2.0] - 2016-09-09
Added
- Adding ways to not manage the service and not restart on config change
- Add examples in the documentation
Fixed
- Fixing documentation examples
- Fixing Json_pure dependency problems in the gemfile for the puppet-spec tests
- Fixing declaration of multi-datacenter replication inside namespaces
- The puppet/archive module has been test to work n version ~> 1.0
[1.1.2] - 2016-07-27
Fixed
- added fix on AMC upgrade and dependencies
[1.1.1] - 2016-07-19
Added
- Addded notify to refresh service after creating/modifying XDR credential file
- Added tests for puppet 4.4 and 4.5
Fixed
- Fixed a puppet-lint warning
[1.1.0] - 2016-07-18
Added
- Adding support for credential files on XDR
[1.0.1] - 2016-03-02
Fixed
- Fixing documentation issues
- Fixing metadata quality
[1.0.0] - 2016-02-17
Added
- Initial version of the module
Dependencies
- puppet/archive (>= 7.0.0 < 8.0.0)
- puppetlabs/stdlib (>= 4.13.0 < 10.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.