Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
- Puppet >= 5.5.8 < 7.0.0
- Archlinux , , , ,
Tasks:
- redis_cli
Start using this module
Add this module to your Puppetfile:
mod 'puppet-redis', '4.2.1'
Learn more about managing modules with a PuppetfileDocumentation
Puppet Redis
Example usage
Standalone
include ::redis
Master node
class { '::redis':
bind => '10.0.1.1',
}
With authentication
class { '::redis':
bind => '10.0.1.1',
masterauth => 'secret',
}
Slave node
class { '::redis':
bind => '10.0.1.2',
slaveof => '10.0.1.1 6379',
}
With authentication
class { '::redis':
bind => '10.0.1.2',
slaveof => '10.0.1.1 6379',
masterauth => 'secret',
}
Redis 3.0 Clustering
class { '::redis':
bind => '10.0.1.2',
appendonly => true,
cluster_enabled => true,
cluster_config_file => 'nodes.conf',
cluster_node_timeout => 5000,
}
Manage repositories
Disabled by default but if you really want the module to manage the required repositories you can use this snippet:
class { '::redis':
manage_repo => true,
}
On Ubuntu, "chris-lea/redis-server" ppa repo will be added. You can change it by using ppa_repo parameter:
class { '::redis':
manage_repo => true,
ppa_repo => 'ppa:rwky/redis',
}
Redis Sentinel
Optionally install and configuration a redis-sentinel server.
With default settings:
include ::redis::sentinel
With adjustments:
class { '::redis::sentinel':
master_name => 'cow',
redis_host => '192.168.1.5',
failover_timeout => 30000,
}
redis::get()
function
This function is used to get data from redis. You must have the 'redis' gem installed on your puppet master.
Functions are documented in REFERENCE.md
Unit testing
Plain RSpec:
$ rake spec
Using bundle:
$ bundle exec rake spec
Test against a specific Puppet or Facter version:
$ PUPPET_VERSION=3.2.1 bundle update && bundle exec rake spec
$ PUPPET_VERSION=4.10.0 bundle update && bundle exec rake spec
$ FACTER_VERSION=1.6.8 bundle update && bundle exec rake spec
Contributing
- Fork it
- Create a feature branch (
git checkout -b my-new-feature
) - Run rspec tests (
bundle exec rake spec
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Reference
Table of Contents
Classes
Public Classes
redis
: This class installs redisredis::administration
: Allows various adminstrative settings for Redis As documented in the FAQ and https://redis.io/topics/adminredis::config
: = Class: redis::config This class provides configuration for Redis.redis::install
: = Class: redis::install This class installs the application.redis::params
: = Class: redis::params This class provides a number of parameters.redis::preinstall
: = Class: redis::preinstall This class provides anything required by the install class. Such as package repositories.redis::sentinel
: = Class: redis::sentinel This class installs redis-sentinel == Parameters: [auth_pass] The password to use to authenticate with the mredis::service
: = Class: redis::service This class manages the Redis daemon.
Private Classes
redis::ulimit
: Redis class for configuring ulimit Used to DRY up the config class, and move the logic for ulimit changes all into one place. Parameters are
Defined types
redis::instance
: Allows the configuration of multiple redis configurations on one machine
Functions
redis::get
: Returns the value of the key being looked up orundef
if the key does not exist. Takes two arguments with an optional third. The first bein
Data types
Tasks
redis_cli
: Executes a redis-cli command on the target system
Classes
redis
This class installs redis
Examples
Default install
include redis
Slave Node
class { '::redis':
bind => '10.0.1.2',
slaveof => '10.0.1.1 6379',
}
Binding on multiple interfaces
class { 'redis':
bind => ['127.0.0.1', '10.0.0.1', '10.1.0.1'],
}
Binding on all interfaces
class { 'redis':
bind => [],
}
Parameters
The following parameters are available in the redis
class.
activerehashing
Data type: String
Enable/disable active rehashing.
Default value: $redis::params::activerehashing
aof_load_truncated
Data type: String
Enable/disable loading truncated AOF file
Default value: $redis::params::aof_load_truncated
aof_rewrite_incremental_fsync
Data type: String
Enable/disable fsync for AOF file
Default value: $redis::params::aof_rewrite_incremental_fsync
appendfilename
Data type: String
The name of the append only file
Default value: $redis::params::appendfilename
appendfsync
Data type: Enum['no', 'always', 'everysec']
Adjust fsync mode. Default: everysec
Default value: $redis::params::appendfsync
appendonly
Data type: String
Enable/disable appendonly mode.
Default value: $redis::params::appendonly
auto_aof_rewrite_min_size
Data type: String
Adjust minimum size for auto-aof-rewrite.
Default value: $redis::params::auto_aof_rewrite_min_size
auto_aof_rewrite_percentage
Data type: String
Adjust percentatge for auto-aof-rewrite.
Default value: $redis::params::auto_aof_rewrite_percentage
bind
Data type: Variant[Stdlib::IP::Address, Array[Stdlib::IP::Address]]
Configure which IP address(es) to listen on. To bind on all interfaces, use an empty array.
Default value: $redis::params::bind
config_dir
Data type: Stdlib::Absolutepath
Directory containing the configuration files.
Default value: $redis::params::config_dir
config_dir_mode
Data type: Stdlib::Filemode
Adjust mode for directory containing configuration files.
Default value: $redis::params::config_dir_mode
config_file_orig
Data type: String
The location and name of a config file that provides the source
Default value: $redis::params::config_file_orig
config_file
Data type: String
Adjust main configuration file.
Default value: $redis::params::config_file
config_file_mode
Data type: Stdlib::Filemode
Adjust permissions for configuration files.
Default value: $redis::params::config_file_mode
config_group
Data type: String
Adjust filesystem group for config files.
Default value: $redis::params::config_group
config_owner
Data type: String
Adjust filesystem owner for config files.
Default value: $redis::params::config_owner
conf_template
Data type: String
Define which template to use.
Default value: $redis::params::conf_template
daemonize
Data type: String
Have Redis run as a daemon.
Default value: $redis::params::daemonize
default_install
Data type: Boolean
Configure a default install of redis.
Default value: $redis::params::default_install
databases
Data type: String
Set the number of databases.
Default value: $redis::params::databases
dbfilename
Data type: String
The filename where to dump the DB
Default value: $redis::params::dbfilename
extra_config_file
Data type: String
Description
Default value: $redis::params::extra_config_file
hash_max_ziplist_entries
Data type: String
Set max ziplist entries for hashes.
Default value: $redis::params::hash_max_ziplist_entries
hash_max_ziplist_value
Data type: String
Set max ziplist values for hashes.
Default value: $redis::params::hash_max_ziplist_value
hll_sparse_max_bytes
Data type: String
HyperLogLog sparse representation bytes limit
Default value: $redis::params::hll_sparse_max_bytes
hz
Data type: String
Set redis background tasks frequency
Default value: $redis::params::hz
latency_monitor_threshold
Data type: String
Latency monitoring threshold in milliseconds
Default value: $redis::params::latency_monitor_threshold
list_max_ziplist_entries
Data type: String
Set max ziplist entries for lists.
Default value: $redis::params::list_max_ziplist_entries
list_max_ziplist_value
Data type: String
Set max ziplist values for lists.
Default value: $redis::params::list_max_ziplist_value
log_dir
Data type: Stdlib::Absolutepath
Specify directory where to write log entries.
Default value: $redis::params::log_dir
log_dir_mode
Data type: Stdlib::Filemode
Adjust mode for directory containing log files.
Default value: $redis::params::log_dir_mode
log_file
Data type: Stdlib::Absolutepath
Specify file where to write log entries.
Default value: $redis::params::log_file
log_level
Data type: String
Specify the server verbosity level.
Default value: $redis::params::log_level
manage_repo
Data type: Boolean
Enable/disable upstream repository configuration.
Default value: $redis::params::manage_repo
manage_package
Data type: Boolean
Enable/disable management of package
Default value: $redis::params::manage_package
managed_by_cluster_manager
Data type: String
Choose if redis will be managed by a cluster manager such as pacemaker or rgmanager
Default value: $redis::params::managed_by_cluster_manager
masterauth
Data type: String
If the master is password protected (using the "requirepass" configuration
Default value: $redis::params::masterauth
maxclients
Data type: String
Set the max number of connected clients at the same time.
Default value: $redis::params::maxclients
maxmemory
Data type: String
Don't use more memory than the specified amount of bytes.
Default value: $redis::params::maxmemory
maxmemory_policy
Data type: String
How Redis will select what to remove when maxmemory is reached.
Default value: $redis::params::maxmemory_policy
maxmemory_samples
Data type: String
Select as well the sample size to check.
Default value: $redis::params::maxmemory_samples
min_slaves_max_lag
Data type: String
The lag in seconds
Default value: $redis::params::min_slaves_max_lag
min_slaves_to_write
Data type: String
Minimum number of slaves to be in "online" state
Default value: $redis::params::min_slaves_to_write
no_appendfsync_on_rewrite
Data type: String
If you have latency problems turn this to 'true'. Otherwise leave it as
Default value: $redis::params::no_appendfsync_on_rewrite
notify_keyspace_events
Data type: String
Which events to notify Pub/Sub clients about events happening
Default value: $redis::params::notify_keyspace_events
notify_service
Data type: String
You may disable service reloads when config files change if you
Default value: $redis::params::notify_service
package_ensure
Data type: String
Default action for package.
Default value: $redis::params::package_ensure
package_name
Data type: String
Upstream package name.
Default value: $redis::params::package_name
pid_file
Data type: String
Where to store the pid.
Default value: $redis::params::pid_file
port
Data type: Stdlib::Port
Configure which port to listen on.
Default value: $redis::params::port
protected_mode
Data type: String
Whether protected mode is enabled or not. Only applicable when no bind is set.
Default value: $redis::params::protected_mode
ppa_repo
Data type: String
Specify upstream (Ubuntu) PPA entry.
Default value: $redis::params::ppa_repo
rdbcompression
Data type: String
Enable/disable compression of string objects using LZF when dumping.
Default value: $redis::params::rdbcompression
repl_backlog_size
Data type: String
The replication backlog size
Default value: $redis::params::repl_backlog_size
repl_backlog_ttl
Data type: String
The number of seconds to elapse before freeing backlog buffer
Default value: $redis::params::repl_backlog_ttl
repl_disable_tcp_nodelay
Data type: String
Enable/disable TCP_NODELAY on the slave socket after SYNC
Default value: $redis::params::repl_disable_tcp_nodelay
repl_ping_slave_period
Data type: Integer[1]
Slaves send PINGs to server in a predefined interval. It's possible
Default value: $redis::params::repl_ping_slave_period
repl_timeout
Data type: String
Set the replication timeout for:
Default value: $redis::params::repl_timeout
requirepass
Data type: String
Require clients to issue AUTH before processing any other commands.
Default value: $redis::params::requirepass
save_db_to_disk
Data type: String
Set if save db to disk.
Default value: $redis::params::save_db_to_disk
save_db_to_disk_interval
Data type: String
save the dataset every N seconds if there are at least M changes in the dataset
Default value: $redis::params::save_db_to_disk_interval
service_manage
Data type: Boolean
Specify if the service should be part of the catalog.
Default value: $redis::params::service_manage
service_enable
Data type: String
Enable/disable daemon at boot.
Default value: $redis::params::service_enable
service_ensure
Data type: String
Specify if the server should be running.
Default value: $redis::params::service_ensure
service_group
Data type: String
Specify which group to run as.
Default value: $redis::params::service_group
service_hasrestart
Data type: String
Does the init script support restart?
Default value: $redis::params::service_hasrestart
service_hasstatus
Data type: String
Does the init script support status?
Default value: $redis::params::service_hasstatus
service_name
Data type: String
Specify the service name for Init or Systemd.
Default value: $redis::params::service_name
service_provider
Data type: String
Specify the service provider to use
Default value: $redis::params::service_provider
service_user
Data type: String
Specify which user to run as.
Default value: $redis::params::service_user
set_max_intset_entries
Data type: String
The following configuration setting sets the limit in the size of the set in order to use this special memory saving encoding. Default: 512
Default value: $redis::params::set_max_intset_entries
slave_priority
Data type: String
The priority number for slave promotion by Sentinel
Default value: $redis::params::slave_priority
slave_read_only
Data type: String
You can configure a slave instance to accept writes or not.
Default value: $redis::params::slave_read_only
slave_serve_stale_data
Data type: String
When a slave loses its connection with the master, or when the replication is still in progress, the slave can act in two different ways: 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will still reply to client requests, possibly with out of date data, or the data set may just be empty if this is the first synchronization.
2) if slave-serve-stale-data is set to 'no' the slave will reply with an error "SYNC with master in progress" to all the kind of commands but to INFO and SLAVEOF.
Default: true
Default value: $redis::params::slave_serve_stale_data
slaveof
Data type: String
Use slaveof to make a Redis instance a copy of another Redis server.
Default value: $redis::params::slaveof
slowlog_log_slower_than
Data type: String
Tells Redis what is the execution time, in microseconds, to exceed in order for the command to get logged. Default: 10000
Default value: $redis::params::slowlog_log_slower_than
slowlog_max_len
Data type: String
Tells Redis what is the length to exceed in order for the command to get logged. Default: 1024
Default value: $redis::params::slowlog_max_len
stop_writes_on_bgsave_error
Data type: String
If false then Redis will continue to work as usual even if there are problems with disk, permissions, and so forth. Default: true
Default value: $redis::params::stop_writes_on_bgsave_error
syslog_enabled
Data type: String
Enable/disable logging to the system logger.
Default value: $redis::params::syslog_enabled
syslog_facility
Data type: String
Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7. Default: undef
Default value: $redis::params::syslog_facility
tcp_backlog
Data type: String
Sets the TCP backlog
Default value: $redis::params::tcp_backlog
tcp_keepalive
Data type: String
TCP keepalive.
Default value: $redis::params::tcp_keepalive
timeout
Data type: String
Close the connection after a client is idle for N seconds (0 to disable).
Default value: $redis::params::timeout
ulimit
Data type: String
Limit the use of system-wide resources.
Default value: $redis::params::ulimit
unixsocket
Data type: String
Define unix socket path
Default value: $redis::params::unixsocket
unixsocketperm
Data type: String
Define unix socket file permissions
Default value: $redis::params::unixsocketperm
workdir
Data type: Stdlib::Absolutepath
The DB will be written inside this directory, with the filename specified above using the 'dbfilename' configuration directive. Default: /var/lib/redis/
Default value: $redis::params::workdir
workdir_mode
Data type: Stdlib::Filemode
Adjust mode for data directory.
Default value: $redis::params::workdir_mode
zset_max_ziplist_entries
Data type: String
Set max entries for sorted sets.
Default value: $redis::params::zset_max_ziplist_entries
zset_max_ziplist_value
Data type: String
Set max values for sorted sets.
Default value: $redis::params::zset_max_ziplist_value
cluster_enabled
Data type: Boolean
Enables redis 3.0 cluster functionality
Default value: $redis::params::cluster_enabled
cluster_config_file
Data type: String
Config file for saving cluster nodes configuration. This file is never touched by humans. Only set if cluster_enabled is true Default: nodes.conf
Default value: $redis::params::cluster_config_file
cluster_node_timeout
Data type: String
Node timeout Only set if cluster_enabled is true Default: 5000
Default value: $redis::params::cluster_node_timeout
cluster_slave_validity_factor
Data type: Integer[0]
Control variable to disable promoting slave in case of disconnection from master Only set if cluster_enabled is true Default: 0
Default value: $redis::params::cluster_slave_validity_factor
cluster_require_full_coverage
Data type: Boolean
If false Redis Cluster will server queries even if requests about a subset of keys can be processed Only set if cluster_enabled is true Default: true
Default value: $redis::params::cluster_require_full_coverage
cluster_migration_barrier
Data type: Integer[0]
Minimum number of slaves master will remain connected with, for another slave to migrate to a master which is no longer covered by any slave Only set if cluster_enabled is true Default: 1
Default value: $redis::params::cluster_migration_barrier
output_buffer_limit_slave
Data type: Any
Default value: $redis::params::output_buffer_limit_slave
output_buffer_limit_pubsub
Data type: Any
Default value: $redis::params::output_buffer_limit_pubsub
manage_service_file
Data type: Boolean
Default value: $redis::params::manage_service_file
redis::administration
Allows various adminstrative settings for Redis As documented in the FAQ and https://redis.io/topics/admin
Examples
include redis::administration
class {'redis::administration':
disable_thp => false,
}
Parameters
The following parameters are available in the redis::administration
class.
enable_overcommit_memory
Data type: Boolean
Enable the overcommit memory setting (Defaults to true)
Default value: true
disable_thp
Data type: Boolean
Disable Transparent Huge Pages (Defaults to true)
Default value: true
somaxconn
Data type: String
Set somaxconn value (Defaults to '65535')
Default value: '65535'
redis::config
= Class: redis::config
This class provides configuration for Redis.
redis::install
= Class: redis::install
This class installs the application.
redis::params
= Class: redis::params
This class provides a number of parameters.
redis::preinstall
= Class: redis::preinstall
This class provides anything required by the install class. Such as package repositories.
redis::sentinel
= Class: redis::sentinel
This class installs redis-sentinel
== Parameters:
[auth_pass] The password to use to authenticate with the master and slaves.
Default: undef
[config_file] The location and name of the sentinel config file.
Default for deb: /etc/redis/redis-sentinel.conf Default for rpm: /etc/redis-sentinel.conf
[config_file_orig] The location and name of a config file that provides the source of the sentinel config file. Two different files are needed because sentinel itself writes to its own config file and we do not want override that when puppet is run unless there are changes from the manifests.
Default for deb: /etc/redis/redis-sentinel.conf.puppet Default for rpm: /etc/redis-sentinel.conf.puppet
[config_file_mode] Permissions of config file.
Default: 0644
[conf_template] Define which template to use.
Default: redis/redis-sentinel.conf.erb
[daemonize] Have Redis sentinel run as a daemon.
Default: true
[down_after] Number of milliseconds the master (or any attached slave or sentinel) should be unreachable (as in, not acceptable reply to PING, continuously, for the specified period) in order to consider it in S_DOWN state.
Default: 30000
[failover_timeout] Specify the failover timeout in milliseconds.
Default: 180000
[init_script] Specifiy the init script that will be created for sentinel.
Default: undef on rpm, /etc/init.d/redis-sentinel on apt.
[log_file] Specify where to write log entries.
Default: /var/log/redis/redis.log
[log_level] Specify how much we should log.
Default: notice
[master_name] Specify the name of the master redis server. The valid charset is A-z 0-9 and the three characters ".-_".
Default: mymaster
[redis_host] Specify the bound host of the master redis server.
Default: 127.0.0.1
[redis_port] Specify the port of the master redis server.
Default: 6379
[package_name] The name of the package that installs sentinel.
Default: 'redis-server' on apt, 'redis' on rpm
[package_ensure] Do we ensure this package.
Default: 'present'
[parallel_sync] How many slaves can be reconfigured at the same time to use a new master after a failover.
Default: 1
[pid_file] If sentinel is daemonized it will write its pid at this location.
Default: /var/run/redis/redis-sentinel.pid
[quorum] Number of sentinels that must agree that a master is down to signal sdown state.
Default: 2
[sentinel_bind] Allow optional sentinel server ip binding. Can help overcome issues arising from protect-mode added Redis 3.2
Default: undef
[sentinel_port] The port of sentinel server.
Default: 26379
[service_group] The group of the config file.
Default: redis
[service_name] The name of the service (for puppet to manage).
Default: redis-sentinel
[service_owner] The owner of the config file.
Default: redis
[service_enable] Enable the service at boot time.
Default: true
[working_dir] The directory into which sentinel will change to avoid mount conflicts.
Default: /tmp
[notification_script] Path to the notification script
Default: undef
[client_reconfig_script] Path to the client-reconfig script
Default: undef == Actions:
- Install and configure Redis Sentinel
== Sample Usage:
class { 'redis::sentinel': }
class {'redis::sentinel': down_after => 80000, log_file => '/var/log/redis/sentinel.log', }
Parameters
The following parameters are available in the redis::sentinel
class.
auth_pass
Data type: Any
Default value: $redis::params::sentinel_auth_pass
config_file
Data type: Any
Default value: $redis::params::sentinel_config_file
config_file_orig
Data type: Any
Default value: $redis::params::sentinel_config_file_orig
config_file_mode
Data type: Stdlib::Filemode
Default value: $redis::params::sentinel_config_file_mode
conf_template
Data type: Any
Default value: $redis::params::sentinel_conf_template
daemonize
Data type: Any
Default value: $redis::params::sentinel_daemonize
down_after
Data type: Any
Default value: $redis::params::sentinel_down_after
failover_timeout
Data type: Any
Default value: $redis::params::sentinel_failover_timeout
init_script
Data type: Any
Default value: $redis::params::sentinel_init_script
init_template
Data type: Any
Default value: $redis::params::sentinel_init_template
log_level
Data type: Any
Default value: $redis::params::log_level
log_file
Data type: Any
Default value: $redis::params::log_file
master_name
Data type: Any
Default value: $redis::params::sentinel_master_name
redis_host
Data type: Stdlib::Host
Default value: $redis::params::sentinel_redis_host
redis_port
Data type: Stdlib::Port
Default value: $redis::params::port
package_name
Data type: Any
Default value: $redis::params::sentinel_package_name
package_ensure
Data type: Any
Default value: $redis::params::sentinel_package_ensure
parallel_sync
Data type: Any
Default value: $redis::params::sentinel_parallel_sync
pid_file
Data type: Any
Default value: $redis::params::sentinel_pid_file
quorum
Data type: Any
Default value: $redis::params::sentinel_quorum
sentinel_bind
Data type: Any
Default value: $redis::params::sentinel_bind
sentinel_port
Data type: Stdlib::Port
Default value: $redis::params::sentinel_port
service_group
Data type: Any
Default value: $redis::params::service_group
service_name
Data type: Any
Default value: $redis::params::sentinel_service_name
service_ensure
Data type: Any
Default value: $redis::params::service_ensure
service_enable
Data type: Boolean
Default value: $redis::params::service_enable
service_user
Data type: Any
Default value: $redis::params::service_user
working_dir
Data type: Any
Default value: $redis::params::sentinel_working_dir
notification_script
Data type: Any
Default value: $redis::params::sentinel_notification_script
client_reconfig_script
Data type: Any
Default value: $redis::params::sentinel_client_reconfig_script
redis::service
= Class: redis::service
This class manages the Redis daemon.
Defined types
redis::instance
redis::instance
This is an defined type to allow the configuration of multiple redis instances on one machine without conflicts
Examples
redis::instance {'6380':
port => 6380,
}
Parameters
The following parameters are available in the redis::instance
defined type.
activerehashing
Data type: String
Enable/disable active rehashing.
Default value: $redis::activerehashing
aof_load_truncated
Data type: String
Enable/disable loading truncated AOF file
Default value: $redis::aof_load_truncated
aof_rewrite_incremental_fsync
Data type: String
Enable/disable fsync for AOF file
Default value: $redis::aof_rewrite_incremental_fsync
appendfilename
Data type: String
The name of the append only file
Default value: $redis::appendfilename
appendfsync
Data type: Enum['no', 'always', 'everysec']
Adjust fsync mode. Valid options: always, everysec, no. Default: everysec
Default value: $redis::appendfsync
appendonly
Data type: String
Enable/disable appendonly mode.
Default value: $redis::appendonly
auto_aof_rewrite_min_size
Data type: String
Adjust minimum size for auto-aof-rewrite.
Default value: $redis::auto_aof_rewrite_min_size
auto_aof_rewrite_percentage
Data type: String
Adjust percentatge for auto-aof-rewrite.
Default value: $redis::auto_aof_rewrite_percentage
bind
Data type: Variant[Stdlib::IP::Address, Array[Stdlib::IP::Address]]
Configure which IP address(es) to listen on. To bind on all interfaces, use an empty array.
Default value: $redis::bind
config_dir
Data type: Stdlib::Absolutepath
Directory containing the configuration files.
Default value: $redis::config_dir
config_dir_mode
Data type: Stdlib::Filemode
Adjust mode for directory containing configuration files.
Default value: $redis::config_dir_mode
config_file_orig
Data type: String
The location and name of a config file that provides the source
Default value: $redis::config_file_orig
config_file
Data type: String
Adjust main configuration file.
Default value: $redis::config_file
config_file_mode
Data type: Stdlib::Filemode
Adjust permissions for configuration files.
Default value: $redis::config_file_mode
config_group
Data type: String
Adjust filesystem group for config files.
Default value: $redis::config_group
config_owner
Data type: String
Adjust filesystem owner for config files.
Default value: $redis::config_owner
conf_template
Data type: String
Define which template to use.
Default value: $redis::conf_template
daemonize
Data type: String
Have Redis run as a daemon.
Default value: $redis::daemonize
databases
Data type: String
Set the number of databases.
Default value: $redis::databases
dbfilename
Data type: String
The filename where to dump the DB
Default value: $redis::dbfilename
extra_config_file
Data type: String
Description
Default value: $redis::extra_config_file
hash_max_ziplist_entries
Data type: String
Set max ziplist entries for hashes.
Default value: $redis::hash_max_ziplist_entries
hash_max_ziplist_value
Data type: String
Set max ziplist values for hashes.
Default value: $redis::hash_max_ziplist_value
hll_sparse_max_bytes
Data type: String
HyperLogLog sparse representation bytes limit
Default value: $redis::hll_sparse_max_bytes
hz
Data type: String
Set redis background tasks frequency
Default value: $redis::hz
latency_monitor_threshold
Data type: String
Latency monitoring threshold in milliseconds
Default value: $redis::latency_monitor_threshold
list_max_ziplist_entries
Data type: String
Set max ziplist entries for lists.
Default value: $redis::list_max_ziplist_entries
list_max_ziplist_value
Data type: String
Set max ziplist values for lists.
Default value: $redis::list_max_ziplist_value
log_dir
Data type: Stdlib::Absolutepath
Specify directory where to write log entries.
Default value: $redis::log_dir
log_dir_mode
Data type: Stdlib::Filemode
Adjust mode for directory containing log files.
Default value: $redis::log_dir_mode
log_file
Data type: Optional[Stdlib::Absolutepath]
Specify file where to write log entries.
Default value: undef
log_level
Data type: String
Specify the server verbosity level.
Default value: $redis::log_level
masterauth
Data type: String
If the master is password protected (using the "requirepass" configuration
Default value: $redis::masterauth
maxclients
Data type: String
Set the max number of connected clients at the same time.
Default value: $redis::maxclients
maxmemory
Data type: String
Don't use more memory than the specified amount of bytes.
Default value: $redis::maxmemory
maxmemory_policy
Data type: String
How Redis will select what to remove when maxmemory is reached.
Default value: $redis::maxmemory_policy
maxmemory_samples
Data type: String
Select as well the sample size to check.
Default value: $redis::maxmemory_samples
min_slaves_max_lag
Data type: String
The lag in seconds
Default value: $redis::min_slaves_max_lag
min_slaves_to_write
Data type: String
Minimum number of slaves to be in "online" state
Default value: $redis::min_slaves_to_write
no_appendfsync_on_rewrite
Data type: String
If you have latency problems turn this to 'true'. Otherwise leave it as
Default value: $redis::no_appendfsync_on_rewrite
notify_keyspace_events
Data type: String
Which events to notify Pub/Sub clients about events happening
Default value: $redis::notify_keyspace_events
pid_file
Data type: String
Where to store the pid.
Default value: "/var/run/redis/redis-server-${name}.pid"
port
Data type: Stdlib::Port
Configure which port to listen on.
Default value: $redis::port
protected_mode
Data type: String
Whether protected mode is enabled or not. Only applicable when no bind is set.
Default value: $redis::protected_mode
rdbcompression
Data type: String
Enable/disable compression of string objects using LZF when dumping.
Default value: $redis::rdbcompression
repl_backlog_size
Data type: String
The replication backlog size
Default value: $redis::repl_backlog_size
repl_backlog_ttl
Data type: String
The number of seconds to elapse before freeing backlog buffer
Default value: $redis::repl_backlog_ttl
repl_disable_tcp_nodelay
Data type: String
Enable/disable TCP_NODELAY on the slave socket after SYNC
Default value: $redis::repl_disable_tcp_nodelay
repl_ping_slave_period
Data type: Integer[1]
Slaves send PINGs to server in a predefined interval. It's possible
Default value: $redis::repl_ping_slave_period
repl_timeout
Data type: String
Set the replication timeout for:
Default value: $redis::repl_timeout
requirepass
Data type: String
Require clients to issue AUTH before processing any other commands.
Default value: $redis::requirepass
save_db_to_disk
Data type: String
Set if save db to disk.
Default value: $redis::save_db_to_disk
save_db_to_disk_interval
Data type: String
save the dataset every N seconds if there are at least M changes in the dataset
Default value: $redis::save_db_to_disk_interval
service_enable
Data type: String
Enable/disable daemon at boot.
Default value: $redis::service_enable
service_ensure
Data type: String
Specify if the server should be running.
Default value: $redis::service_ensure
service_group
Data type: String
Specify which group to run as.
Default value: $redis::service_group
service_hasrestart
Data type: String
Does the init script support restart?
Default value: $redis::service_hasrestart
service_hasstatus
Data type: String
Does the init script support status?
Default value: $redis::service_hasstatus
service_user
Data type: String
Specify which user to run as.
Default value: $redis::service_user
set_max_intset_entries
Data type: String
The following configuration setting sets the limit in the size of the set in order to use this special memory saving encoding. Default: 512
Default value: $redis::set_max_intset_entries
slave_priority
Data type: String
The priority number for slave promotion by Sentinel
Default value: $redis::slave_priority
slave_read_only
Data type: String
You can configure a slave instance to accept writes or not.
Default value: $redis::slave_read_only
slave_serve_stale_data
Data type: String
When a slave loses its connection with the master, or when the replication is still in progress, the slave can act in two different ways: 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will still reply to client requests, possibly with out of date data, or the data set may just be empty if this is the first synchronization.
2) if slave-serve-stale-data is set to 'no' the slave will reply with an error "SYNC with master in progress" to all the kind of commands but to INFO and SLAVEOF.
Default: true
Default value: $redis::slave_serve_stale_data
slaveof
Data type: String
Use slaveof to make a Redis instance a copy of another Redis server.
Default value: $redis::slaveof
slowlog_log_slower_than
Data type: String
Tells Redis what is the execution time, in microseconds, to exceed in order for the command to get logged. Default: 10000
Default value: $redis::slowlog_log_slower_than
slowlog_max_len
Data type: String
Tells Redis what is the length to exceed in order for the command to get logged. Default: 1024
Default value: $redis::slowlog_max_len
stop_writes_on_bgsave_error
Data type: String
If false then Redis will continue to work as usual even if there are problems with disk, permissions, and so forth. Default: true
Default value: $redis::stop_writes_on_bgsave_error
syslog_enabled
Data type: String
Enable/disable logging to the system logger.
Default value: $redis::syslog_enabled
syslog_facility
Data type: String
Specify the syslog facility. Must be USER or between LOCAL0-LOCAL7. Default: undef
Default value: $redis::syslog_facility
tcp_backlog
Data type: String
Sets the TCP backlog
Default value: $redis::tcp_backlog
tcp_keepalive
Data type: String
TCP keepalive.
Default value: $redis::tcp_keepalive
timeout
Data type: String
Close the connection after a client is idle for N seconds (0 to disable).
Default value: $redis::timeout
ulimit
Data type: String
Limit the use of system-wide resources.
Default value: $redis::ulimit
unixsocket
Data type: String
Define unix socket path
Default value: "/var/run/redis/redis-server-${name}.sock"
unixsocketperm
Data type: String
Define unix socket file permissions
Default value: $redis::unixsocketperm
workdir
Data type: Stdlib::Absolutepath
The DB will be written inside this directory, with the filename specified above using the 'dbfilename' configuration directive. Default: /var/lib/redis/
Default value: "${redis::workdir}/redis-server-${name}"
workdir_mode
Data type: Stdlib::Filemode
Adjust mode for data directory.
Default value: $redis::workdir_mode
zset_max_ziplist_entries
Data type: String
Set max entries for sorted sets.
Default value: $redis::zset_max_ziplist_entries
zset_max_ziplist_value
Data type: String
Set max values for sorted sets.
Default value: $redis::zset_max_ziplist_value
cluster_enabled
Data type: Boolean
Enables redis 3.0 cluster functionality
Default value: $redis::cluster_enabled
cluster_config_file
Data type: String
Config file for saving cluster nodes configuration. This file is never touched by humans. Only set if cluster_enabled is true Default: nodes.conf
Default value: $redis::cluster_config_file
cluster_node_timeout
Data type: String
Node timeout Only set if cluster_enabled is true Default: 5000
Default value: $redis::cluster_node_timeout
cluster_slave_validity_factor
Data type: Integer[0]
Control variable to disable promoting slave in case of disconnection from master Only set if cluster_enabled is true Default: 0
Default value: $redis::cluster_slave_validity_factor
cluster_require_full_coverage
Data type: Boolean
If false Redis Cluster will server queries even if requests about a subset of keys can be processed Only set if cluster_enabled is true Default: true
Default value: $redis::cluster_require_full_coverage
cluster_migration_barrier
Data type: Integer[0]
Minimum number of slaves master will remain connected with, for another slave to migrate to a master which is no longer covered by any slave Only set if cluster_enabled is true Default: 1
Default value: $redis::cluster_migration_barrier
output_buffer_limit_slave
Data type: Any
Default value: $redis::output_buffer_limit_slave
output_buffer_limit_pubsub
Data type: Any
Default value: $redis::output_buffer_limit_pubsub
minimum_version
Data type: Any
Default value: $redis::minimum_version
managed_by_cluster_manager
Data type: Any
Default value: $redis::managed_by_cluster_manager
package_ensure
Data type: Any
Default value: $redis::package_ensure
manage_service_file
Data type: Any
Default value: true
Functions
redis::get
Type: Ruby 4.x API
Returns the value of the key being looked up or undef
if the key does not
exist. Takes two arguments with an optional third. The first being a string
value of the key to be looked up, the second is the URL to the Redis service
and the third optional argument is a default value to be used if the lookup
fails.
example usage
$version = redis::get('version.myapp', 'redis://redis.example.com:6379')
$version_with_default = redis::get('version.myapp', 'redis://redis.example.com:6379', $::myapp_version)
redis::get(String[1] $key, Redis::RedisUrl $url, Optional[String] $default)
Returns the value of the key being looked up or undef
if the key does not
exist. Takes two arguments with an optional third. The first being a string
value of the key to be looked up, the second is the URL to the Redis service
and the third optional argument is a default value to be used if the lookup
fails.
example usage
$version = redis::get('version.myapp', 'redis://redis.example.com:6379')
$version_with_default = redis::get('version.myapp', 'redis://redis.example.com:6379', $::myapp_version)
Returns: Optional[String]
Returns the value of the key from Redis
key
Data type: String[1]
The key to look up in redis
url
Data type: Redis::RedisUrl
The endpoint of the Redis instance
default
Data type: Optional[String]
The value to return if the key is not found or the connection to Redis fails
Data types
Redis::RedisUrl
The Redis::RedisUrl data type.
Alias of Pattern[/(^redis:\/\/)/]
Tasks
redis_cli
Executes a redis-cli command on the target system
Supports noop? false
Parameters
command
Data type: String[1]
The command to run, including all arguments
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Tasks in this module release
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v4.2.1 (2019-09-19)
Fixed bugs:
Merged pull requests:
v4.2.0 (2019-07-22)
Implemented enhancements:
Closed issues:
Merged pull requests:
- Allow
puppetlabs/stdlib
6.x #314 (alexjfisher) - Fix manage_service_file variable #309 (CallumBanbery)
v4.1.0 (2019-05-02)
Implemented enhancements:
Closed issues:
- Please release v3.3.2 due to Ubuntu 18.04 / systemd fix. #283
Merged pull requests:
v4.0.0 (2019-03-12)
This is the first release since the module was migrated to the Vox Pupuli puppet
namespace.
Breaking changes:
- Support binding to all interfaces #302 (alexjfisher)
- Drop support for puppet 3 and 4 #297 (alexjfisher)
- Convert
redisget
toredis::get
API v4 function #293 (alexjfisher)
Implemented enhancements:
- Bind the service on all available interface #60
- Add some parameter validation using data types #303 (alexjfisher)
- Initial rhel 8 support #284 (mbaldessari)
Closed issues:
- Transparent Huge Pages (THP) Not Disabled on RHEL #278
- Looking for maintainer [Help needed] #277
- Travis Credential issues... still :( #267
- Outdated dependency puppetlabs-apt \< 3.0.0 #264
- cannot bind ipv4 and ipv6 #257
- Deprecate Puppet 3.X Support #152
- Get acceptance tests running again #292
- Convert function to API v4 ruby function #291
Merged pull requests:
- Re-enable and fix acceptance tests. (Don't manage
/var/run/redis
on Debian systems) #299 (alexjfisher) - Update metadata.json for Vox Pupuli migration #298 (alexjfisher)
- Update
apt
andstdlib
dependencies #296 (alexjfisher) - Fix github license detection #295 (alexjfisher)
- Add badges to README #294 (alexjfisher)
- Fix tests and initial Voxpupuli modulesync #290 (alexjfisher)
- Lint and rubocop (autofixes only) #289 (alexjfisher)
v3.3.1 (2018-09-13)
Closed issues:
- Ulimit configuration broken for systemd #268
v3.3.0 (2018-06-19)
Closed issues:
- output_buffer_limit_pubsub and output_buffer_limit_slave #263
- Can't release - Require Forge Credential Refresh #262
- Module v3.2.0 not published to forge #255
- Inconsistent sentinel_package_name handling on Debian #253
- No pidfile for sentinel #238
- puppet-redis requires outdated puppetlabs-apt module #232
- Can't use as slave bound to localhost #229
- [Feature Request] Redis::Instance - Set default unixsocket #226
- Travis Forge Password Changed #216
Merged pull requests:
- Adds logic for installing redid-sentinel package #254 (petems)
- Update redis mode on wheezy #252 (petems)
- Fix spec for sentinel #251 (petems)
- get rid of getvar_emptystring function #249 (vicinus)
- Added log_level to sentinel. #248 (hp197)
- Adds redis_cli task #245 (petems)
- Bump Puppet version for acceptance to 4.10.8 #244 (petems)
- protected-mode configuration option (Redis 3.2+) #243 (Dan70402)
- Switch to using simp-beaker suites #241 (petems)
- Bumped apt version dependency to version \< 5.0.0 #237 (c4m4)
- Updates for EL6 #236 (petems)
- Pin version of redis gem #235 (petems)
- Added configuration options for client-output-buffer-limit #233 (Mike-Petersen)
- Allow
slaveof
when binding to localhost #231 (joshuaspence) - Fix issues with missing locale for Debian box #224 (petems)
- Instance service improvements #222 (kwevers)
- Make sure the service is en/disabled per user request #221 (kwevers)
- Split Redis instance socket files #220 (kwevers)
- Split Redis workdir #219 (kwevers)
- fix package_ensure version on ubuntu when it is in the 3:3.2.1 format #218 (sp-joseluis-ledesma)
- Split the redis instance logfiles by default #217 (kwevers)
- Use package_ensure if it specifies a version instead of the minimum_version #215 (sp-joseluis-ledesma)
v3.2.0 (2017-07-11)
Implemented enhancements:
- Cluster Support #62
Closed issues:
Merged pull requests:
- updated redis systemd unit file for better use with instances #214 (bostrowski13)
- Updates docker images for CentOS 6 and 7 #213 (petems)
- Update EPEL module #212 (petems)
- Refactor redisget() method #211 (petems)
- Update docs for puppet-strings #206 (petems)
- Add redis::instance defined type #200 (petems)
- Adding note about Puppet 3 support #153 (petems)
v3.1.1 (2017-05-19)
v3.1.0 (2017-05-19)
Implemented enhancements:
Fixed bugs:
- Sort problem in v1.2.4 template #195
Merged pull requests:
- Add an optional third parameter to redisget() to specify a default value #209 (petems)
- Updates docs for puppet functions #208 (petems)
- Add switch to manage File[/var/run/redis] #204 (petems)
- Ignore selinux default context for /etc/systemd/system/redis.service.d #202 (amoralej)
- Make TravisCI push to the Forge #191 (arioch)
v3.0.0 (2017-05-11)
Implemented enhancements:
- Ubuntu 16.04 support? #146
- [Whishlist] Extend ulimit parameter to support limits.conf and systemd #130
- Add overcommit.pp to deal with
Can't save in background: fork: Cannot allocate memory
? #105
Fixed bugs:
- The fix for issue #192 broke service_managed false #197
- Ubuntu 16.04 changed sentinel config filename #175
- sentinel support broken? #166
- Ownership problem with Ubuntu redis-server #150
- Parameters not valid for older Redis in config #111
Merged pull requests:
- Update sort to specify key #199 (petems)
- Adds tests for when Redis service is unmanaged #198 (petems)
- Changing Travis back to Trusty #194 (petems)
- Remove service notification #193 (petems)
- Improves ulimit configuration #192 (petems)
- Updates metadata supported versions #190 (petems)
- Adds tests for Ubuntu 1404 and Trusty package #189 (petems)
- Adds redis::administration class #188 (petems)
- Adds logic for managing redis-sentinel package #187 (petems)
- Bump to version 3.0.0 #186 (petems)
- Moves location of redis-sentinel file #184 (petems)
- (testing) Simplify command run by TravisCI #183 (ghoneycutt)
- Style #182 (ghoneycutt)
- Adds acceptance tests for the redisget() function #181 (petems)
- Add redisget() #179 (ghoneycutt)
- Fixes ordering of Apt repos #178 (petems)
- Add 2.4.10 config file for CentOS 6 #177 (petems)
- Refactoring common code patterns #174 (petems)
- Changes permission on /var/run/ directory #173 (petems)
- Bump Beaker Ruby versions #172 (petems)
- Fixes sentinel installation on Debian flavours #171 (petems)
- Adds vagrant beaker images #170 (petems)
- Adds acceptance test for master/slave testing #168 (petems)
- Renames spec file #165 (petems)
- Adds specific versions to fixtures #164 (petems)
- Changes for RHEL-ish specific configuration #162 (petems)
- Changes CentOS Docker images #160 (petems)
- Updates fact for CentOS 6 #159 (petems)
- Fixes lint arrow errors #158 (petems)
- README lint #155 (matonb)
- Archlinux: Added tests and update config_dir parameter #149 (bartjanssens92)
- Add CHANGELOG #148 (petems)
- Added Archlinux as supported OS #147 (bartjanssens92)
1.2.4 (2016-12-05)
Implemented enhancements:
- Speed up Travis #118
Fixed bugs:
- Wrong redis.conf after c45049986a7fcb1c9a0591de123c6bf97c761355 #142
- powerstack.org - No longer hosted #103
Closed issues:
- redis.conf under /etc/redis.conf #81
- Add socket option #79
- preinstall.pp fails on CEntOS 6.5 and Puppet Enterprise 2.7. #72
- How do I change from powerstack.org repo if I need to? Should I just edit manifests/preinstall.pp? #68
- puppet-redis || every time when puppet runs, the service restarts #59
- 'manage_repo => true' causes run to fail because add-apt-repository command isn't available #49
Merged pull requests:
- For folks that do not use redis to cache to disk #144 (petems)
- Revert "Changes templates to use scope" #143 (petems)
- Update sentinel.pp #141 (xprntl)
- Manage workdir and permissions #138 (petems)
- Adds minimum versions parameters #137 (petems)
- Adds redis-server version fact #136 (petems)
- adding /var/run/redis for Debian based hosts #135 (petems)
- Refactor unit tests #134 (petems)
- Update acceptance tests #133 (petems)
- Speed up Travis even more #125 (petems)
- Add fast finish to Travis #124 (petems)
- Changes package installation #123 (petems)
- Fix Beaker settings #122 (petems)
- Fixes gpg key for DotDeb #121 (petems)
- Sent bind address rebase #120 (petems)
- Changes templates to use scope #119 (petems)
- Add save interval squash #117 (petems)
- FreeBSD fixes #116 (petems)
- Consolidate travis and testing #115 (petems)
- Fix specs #114 (Phil-Friderici)
- Remove single quotes around variable #101 (rorybrowne)
1.2.3 (2016-09-19)
Merged pull requests:
- Adds spec for unixsocket and perms #99 (petems)
- Added the ability to configure Unix socket binding #97 (gcelestine)
- Lint and English cleanup in the redis.conf #93 (ryayon)
- Added more configuration options to redis.conf #90 (hanej)
- Make notification of service optional #89 (michaeltchapman)
1.2.2 (2016-03-17)
Closed issues:
- Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type redis #86
- Potential bug:
64min
should read64mb
#73 - Typo on sentinel.pp on if defined #69
- Does't configure EPEL repository on CentOS 7 #61
1.2.1 (2015-12-09)
Merged pull requests:
1.2.0 (2015-12-03)
Closed issues:
- $daemonize is defaulted to 'false' on Redhat OS, which causes service command to hang #64
- Redis service start fail on Debian stable (Wheezy 7.0) #52
Merged pull requests:
- Redis Cluster 3.0 Feature #71 (claudio-walser)
- Fix Support for EL7 and Puppet 4 #66 (trlinkin)
- Add a option to override the service provider #63 (nerzhul)
- add support for hz option #50 (nerzhul)
1.1.3 (2015-08-19)
Closed issues:
- Unable to bring in as a dependency #47
Merged pull requests:
1.1.2 (2015-08-06)
Closed issues:
- Error on CentOS 7 when manage_repo: true #44
1.1.1 (2015-08-04)
Closed issues:
- Commit edd7cb55931fe0336bfee475c738ac4b91308f98 seems to be pasting undef params into redis.conf #41
Merged pull requests:
- Save db to disk #46 (adrian-balcan-ygt)
- Use puppetlabs_spec_helper for testing #45 (jlyheden)
- copy variables used in template to local scope #42 (eoly)
1.1.0 (2015-06-22)
Merged pull requests:
1.0.7 (2015-06-02)
Fixed bugs:
- Sentinel init/upstart file doesn't exist #18
Closed issues:
- Default config_owner of redis #39
- Duplicate decleration Package[redis] when both include redis and redis::sentinel #36
- Does not work with Debian 7.8 with redis version 2.4.14-1 #24
Merged pull requests:
- Fixed duplicate declaration of package #38 (raiblue)
- fix issue with params.pp with strict_variables enabled #35 (eoly)
- Enable to not manage the Redis service #34 (Spredzy)
- Suse conf file fix #33 (christofhaerens)
- added Suse osfamily #32 (christofhaerens)
1.0.6 (2015-05-05)
1.0.5 (2015-03-30)
1.0.4 (2015-01-19)
1.0.3 (2015-01-05)
Implemented enhancements:
- Feature Request: support for redis-sentinel #13
1.0.2 (2014-12-17)
1.0.1 (2014-10-22)
1.0.0 (2014-10-22)
0.0.10 (2014-08-29)
0.0.9 (2014-08-29)
Closed issues:
- Amazon AMI Installation/Initialization Issue #11
0.0.8 (2014-03-27)
Closed issues:
0.0.7 (2014-01-13)
0.0.6 (2013-08-07)
Merged pull requests:
0.0.5 (2013-07-22)
Closed issues:
- Redis config 2.6 not compatible with EPELs 2.4 on Centos6 #2
0.0.4 (2013-07-17)
Closed issues:
- Default config path wrong for RedHat #1
0.0.3 (2013-07-08)
0.0.2 (2013-06-19)
0.0.1 (2013-06-19)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/apt (>= 2.3.0 < 8.0.0)
- puppetlabs/stdlib (>= 4.25.0 < 7.0.0)
- stahnma/epel (>= 1.2.2 < 2.0.0)
- herculesteam/augeasproviders_sysctl (>= 2.1.0 < 3.0.0)
- herculesteam/augeasproviders_core (>= 2.1.0 < 3.0.0)
Copyright (C) 2012 Tom De Vylder Copyright (C) 2017 Garrett Honeycutt <code@garretthoneycutt.com> 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.