forked from saltstack-formulas/redis-formula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpillar.example
84 lines (73 loc) · 2.7 KB
/
pillar.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
redis:
disable_transparent_huge_pages: True # If set, it executes: "echo never > /sys/kernel/mm/transparent_hugepage/enabled"
# as it is recommended for redis deployments.
# Keep in mind that it not a persistent change so you have to put that command
# into a rc/systemd state or modify the grub setting the "transparent_hugepage=never" option
# and reloading the grub config
# include: # Will setup the following lines:
# - /path/to/local.conf # include /path/to/local.conf
# - /path/to/other.conf # include /path/to/other.conf
root_dir: /var/lib/redis
user: redis
port: 6379
bind: 127.0.0.1
snapshots:
- '900 1'
- '300 10'
- '60 10000'
# extra_opts:
# supervised: systemd
lookup:
svc_state: running
cfg_name: /etc/redis.conf
pkg_name: redis-server
svc_name: redis-server
overcommit_memory: True
# source_path: salt://redis/files/redis-3.2-ng.conf.jinja # To use the new more structured template, add this to the pillar
#
# Redis Sentinel Pillar
#
sentinel:
# The service can be enabled or disabled if needed
enabled: True
# To setup the configuration, you can either specify the salt:// source path
source_path: salt://hostname/redis-sentinel.conf
# or the options (most of them are setup by default)
bind: '127.0.0.1 192.168.1.1' # keep in mind: https://github.com/antirez/redis/issues/3416
# with: bind: '0.0.0.0' works
protected-mode: 'no'
port: 26379
announce-ip: 1.1.1.1
announce-port: 26379
dir: '/var/lib/redis'
# Options not explicitely defined in the template can be added with the following option
extra_opts:
maxclients: 1000
# List of masters to monitor
masters:
# More complex configuration
mymaster:
ip: 127.0.0.1
port: 6379
quorum: 2
down-after-milliseconds: 6000
failover-timeout: 180000
parallel-syncs: 1
auth-pass: supersecret
notification-script:
path: /var/redis/notify.sh
source_path: salt://hostname/notify.sh
client-reconfig-script:
path: /var/redis/localscript.sh
# Extra options for masters can be defined with the following option:
extra_opts:
opt1: value1 # will create the line: sentinel mymaster2 opt1 value1
# Simple example
mymaster2:
ip: 2.2.2.2
port: 6379
quorum: 3
# Even more simple example
# default port is 6379 and default quorum is 2
mymaster3:
ip: 3.3.3.3