Adoptable Cookbooks List

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Riak Cookbook

Overview

Riak is a Dynamo-inspired key/value store that scales predictably and easily. Riak combines a decentralized key/value store, a flexible map/reduce engine, and a friendly HTTP/JSON query interface to provide a database ideally suited for Web applications. And, without any object-relational mappers and other heavy middleware, applications built on Riak can be both simpler and more powerful. For complete documentation and source code, see the Riak home page at Basho.

Getting Started

The Riak cookbook can be used just by adding "riak" to the runlist for a node. The default settings will cause Riak to be installed and configured. All the config options exist in the node['riak']['config'] namespace and can be set to the appropriate Erlang data type with the methods : to_erl_string and to_erl_tuple . For more information see the erlang_template_helper repository

Package Installation

There are two options for package installation: package and custom_repository. If you are using a Red Hat, CentOS, Fedora, Debian or Ubuntu distributions, package installation is recommended and is the default.

The package parameters available are version, type and, optionally for source installation, an install prefix:

Networking

Riak clients communicate with the nodes in the cluster through either the HTTP or Protobufs interfaces, both of which may be used simultaneously. Configuration for each interface includes the IP address and TCP port on which to listen for client connections. The default for the HTTP interface is localhost:8098 and for Protobufs 0.0.0.0:8087, meaning client connections to any address on the server, TCP port 8087, are accepted. As the default HTTP configuration is inaccessible to other nodes, it must be changed if you want clients to use the HTTP interface.

Erlang

A number of Erlang parameters may be configured through the cookbook. The node name and cookie are most important for creating multi-node clusters. The rest of the parameters are primarily for performance tuning, with kernel polling and smp enabled by default. Any available Erlang environment variable may be set with the env vars hash.

Storage Backends

Riak requires specification of a storage backend along with various backend storage options, specific to each backend. While Riak supports specification of different backends for different buckets, the Chef cookbook does not yet allow such configurations. The backend options are Bitcask (the default) or LevelDB. The typical configuration options and their defaults are given below.

Bitcask

Bitcask is an Erlang application that provides an API for storing and retrieving key/value data into a log-structured hash table that provides very fast access.

eLevelDB

eLevelDB is an Erlang application that encapsulates LevelDB, an open source on-disk key-value store written by Google Fellows Jeffrey Dean and Sanjay Ghemawat. LevelDB's storage architecture is more like BigTable's memtable/sstable model than it is like Bitcask.