-
Notifications
You must be signed in to change notification settings - Fork 184
/
pillar.example
108 lines (93 loc) · 3.02 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
redis:
# 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
disable_transparent_huge_pages: true
# 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:
# These can be overridden but commenting here since used by Kitchen during
# the Travis run (breaks numerous platforms)
# cfg_name: /etc/redis.conf
# pkg_name: redis-server
# svc_name: redis-server
svc_state: running
overcommit_memory: true
# To use the new more structured template, add this to the pillar
# source_path: salt://redis/files/redis-3.2-ng.conf.jinja
#
# 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)
# keep in mind: https://github.com/antirez/redis/issues/3416
# with: bind: '0.0.0.0' works
bind: '127.0.0.1 192.168.1.1'
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
# Multiple-instances management.
# Note: Tested on debian stretch only.
instances:
# Special value, if you want to override something for all your instances
_default:
bind: 0.0.0.0
# Now, we define each instance, with its differences
cache:
port: 6380
sessions:
port: 6381