{ "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\nredis_instance \"datastore\" do\n port 8866\n data_dir \"/mnt/redis/datastore\"\n master master_node\nend\n\n\n_port_, data_dir and _master_ are the only attributes directly configurable using the definition syntax. Other attributes can be configured using the normal attribute interface under the node[\"redis2\"][\"instances\"][instance_name] scope. Missing attributes will be merged from node[\"redis2\"][\"instances\"][\"default\"]\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\"][instance_name][\"replication\"][\"role\"] (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": "avishai@fewbytes.com", "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" }