forked from adler/redis2-cookbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetadata.json
326 lines (282 loc) · 10.3 KB
/
metadata.json
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
{
"name": "redis2",
"description": "Installs/Configures redis",
"long_description": "= DESCRIPTION:\nThis cookbooks installs Redis 2 key-value datastore server. Redis can be installed from packages (where available) or source.\n\n= REQUIREMENTS:\nFor compiling from source: build-essential\n\n= ATTRIBUTES: \n[\"redis2\"][\"install_from\"] - _package_ to install from distro packages, any other value to install from source.\n[\"redis2\"][\"instances\"][\"default\"] - default attributes for all redis instances, will be merged with per instance attributes\n[\"redis2\"][\"instances\"][instance_name] - per instance configuration attributes tree\n\n= USAGE:\nThis cookbook implements redis instances as a definition. If you plan to run only one instance, use the +redis::default_instance+ recipe which call a \"redis_default\" +redis_instance+.\nTo spawn instances of redis, use the +redis_instance+ definition, usage is pretty straight forward:\n<tt>\nredis_instance \"datastore\" do\n port 8866\n data_dir \"/mnt/redis/datastore\"\n master master_node\nend\n</tt>\n\n_port_, <em>data_dir</em> and _master_ are the only attributes directly configurable using the definition syntax. Other attributes can be configured using the normal attribute interface under the <tt>node[\"redis2\"][\"instances\"][<em>instance_name</em>]</tt> scope. Missing attributes will be merged from <tt>node[\"redis2\"][\"instances\"][\"default\"]</tt>\n\nThe _master_ attribute will set up redis as a slave of a the same redis instance on another server. It will not set node[\"redis2\"][\"instances\"][<em>instance_name</em>][\"replication\"][\"role\"]</tt> (which can be _slave_ or _master_), because redis can be both at the same time (e.g. chained masters).\n\n== Recipes\n* redis2::auto - automagically call redis_instance for every instance defined in the node[\"redis2\"][\"instances\"] tree.\n* redis2::default_instance - use this if you want a simple recipe with a single redis instance\nIt's generally not a good idea to use the redis2::default_instance recipe. If you want a single redis instance, either use redis_instance definition or redis2::auto and define your instance in the attributes tree.\n",
"maintainer": "Fewbytes Technologies, Inc.",
"maintainer_email": "[email protected]",
"license": "Apache 2.0",
"platforms": {
"ubuntu": ">= 9.04",
"debian": ">= 6.0",
"centos": ">= 5.5",
"redhat": ">= 5.5"
},
"dependencies": {
"runit": ">= 0.0.0"
},
"recommendations": {
},
"suggestions": {
},
"conflicting": {
},
"providing": {
},
"replacing": {
},
"attributes": {
"redis2/source_url": {
"display_name": "Redis source URL",
"default": "http://redis.googlecode.com/files/redis-2.2.2.tar.gz",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/build_dir": {
"display_name": "Redis build directory",
"default": "/opt/redis2/build",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/conf_dir": {
"display_name": "Redis configuration dir containing redis.conf",
"default": "/etc/redis",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/log_dir": {
"display_name": "Directory used for log files",
"default": "/var/log",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/timeout": {
"display_name": "Timeout before connection close",
"description": "Close the connection after a client is idle for N seconds (0 to disable)",
"default": "300",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/dumpdb_filename": {
"display_name": "Database dump filename",
"default": "dump.db",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/data_dir": {
"display_name": "Directory for storing the database persistance files",
"default": "/var/lib/redis",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/activerehashing": {
"display_name": "Rehash redis table in memory",
"description": "Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in order to help rehashing the main Redis hash table (the one mapping top-level keys to values). The hash table implementation redis uses (see dict.c) performs a lazy rehashing: the more operations you run into an hash table that is rehashing, the more rehashing \"steps\" are performed, so if the server is idle the rehashing is never complete and some more memory is used by the hash table.takes about 1ms every 100ms",
"default": "yes",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/databases": {
"display_name": "Number of Redis database",
"default": "16",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/vm/enabled": {
"display_name": "Enable Redis swapping to disk",
"default": "no",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/vm/swap_file": {
"display_name": "Swap file location",
"default": "/var/lib/redis2/swap",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/vm/max_memory": {
"display_name": "Maximum memory usage before swapping",
"desription": "Configures the VM to use at max the specified amount of RAM. Everything that deos not fit will be swapped on disk *if* possible, that is, if there is still enough contiguous space in the swap file.",
"default": "70% of total memory",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/vm/page_size": {
"display_name": "Memory page size (bytes) in swap file",
"description": "Redis swap files is split into pages. An object can be saved using multiple contiguous pages, but pages can't be shared between different objects. So if your page is too big, small objects swapped out on disk will waste a lot of space. If you page is too small, there is less space in the swap file (assuming you configured the same number of total swap file pages).",
"default": "32",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/vm/pages": {
"display_name": "Number of memory pages in the swap file",
"description": "Number of total memory pages in the swap file. Given that the page table (a bitmap of free/used pages) is taken in memory, every 8 pages on disk will consume 1 byte of RAM. The total swap size is vm-page-size * vm-pages. With the default of 32-bytes memory pages and 134217728 pages Redis will use a 4 GB swap file, that will use 16 MB of RAM for the page table. It's better to use the smallest acceptable value for your application, but the default is large in order to work in most conditions.",
"default": "134217728",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/vm/max_threads": {
"display_name": "Number of VM IO threads",
"default": "4",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/maxmemory": {
"display_name": "Maximum memory to use for redis",
"default": "Unset",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/maxmemory_samples": {
"display_name": "Sample size for eviction algorithms",
"default": "3",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/maxmemory_policy": {
"display_name": "Memory eviction algorithm",
"default": "volatile-lru",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/appendonly": {
"display_name": "Write append log",
"default": "no",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/appendfsync": {
"display_name": "Call fsync after writing to append log",
"default": "everysec",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/no_appendfsync_on_rewrite": {
"display_name": "Don't use fsync on rewrites",
"default": "no",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
},
"redis2/instances/default/replication/master_role": {
"display_name": "Master Redis chef role",
"choice": [
],
"calculated": false,
"type": "string",
"required": "optional",
"recipes": [
]
}
},
"groupings": {
},
"recipes": {
"redis2": "Installs and configures redis",
"redis2::auto": "Configures and activates redis instances defined by attributes"
},
"version": "0.4.4"
}