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.

This example will create two vhosts; inviqa and inviqa.ssl. inviqa.ssl will be configured to respond on port 443 with some sensible SSL default settings (including limiting to secure protocols and ciphersuites).

It is assumed that projects that use this cookbook also use the data-bag-merge cookbook from https://cookbooks.opscode.com/cookbooks/data-bag-merge. This cookbook merges encrypted data bags in to your chef attributes to enabled encrypted attributes for cookbooks that do not directly support them.

Server params

To add fastcgi_param for Nginx or SetEnv for Apache use php_server_variables under sites key, like in this example for apache (it's similiar for nginx):

A shared_folders folder containing a '.' will apply permissions recursively
from the dot onwards, and not preceding directory names. A shared_folder section
that doesn't have owner or group will inherit the top-level owner and group.

Second, it will create the Capistrano deploy user if there is the appropriate
data bag item for a user e.g. data_bags/users/deploy.json. Note since the
private key is sensitive, it should be an encrypted data bag.

It will also load the appropriate known SSH host keys to the global
/etc/sshd/ssh_known_hosts so that these SSH hosts will already be trusted at
deployment time to avoid interactivity problems. The default will add
github.com's host key, but can be configured via
node['capistrano']['known_hosts']

This attribute will take either an array of SSH host domains (which ssh_known_hosts
cookbook will look up the SSH host key for, or a Hash of {host=>host key}.

Nginx sites

The nginx sites helper is very similar to the apache sites helper with the exception that it does not proxy to any kind of web_app helper and uses the nginx top level attribute instead.

This will create a firewall with http port 8080, along with the default ssh port
as inherited from the cookbook attributes, leaving the https port blocked.

Mysql databases

The mysql database helper enables you to create mysql databases from attributes. It proxies the attributes to the mysql_database resource defined by the database cookbook here: https://github.com/opscode-cookbooks/database#database. This means that any attributes valid there are valid here.

Add config-driven-helper::mysql-databases to enable it.

The following example creates the database my_database with no additional options.

{
"mysql": {
"databases": {
"my_database": { }
}
}
}

Packages

The packages helper simply enables you to define a list of packages to install. Due to the way that chef merges array attributes you should take care to define all packages at the same precedence level. We may in the future support hash lists to enable purges too.

Add config-driven-helper::packages to enable it.

The following example installs both git and java packages.

{
"packages": [ "git", "java" ]
}

Services

The services helper enables you to perform simple actions on pre-defined services such as start / stop / enable / disable them. Note that the service name should be name used by chef, not that of the underlying OS (though they are often the same).

Add config-driven-helper::services to enable it.

The following example shows how to make sure that the mysql service is both enabled and started.

"services": {
"mysql": [ "enable", "start" ]
}

Mysql ruby

This recipe is primarily for internal use by the mysql helpers. It forces the install of the mysql gem in to the chef ruby. This is provided because chef_gem is not an appropriate solution where mysql is installed in the same run and depends on a different version of mysql-libs (or your OS equivalent) to the version of MySQL being installed. A simple example of this is installing Percona on CentOS 6.5.

Add config-driven-helper::mysql-ruby to enable it (although it is explicitly included by the mysql helpers so this should only be necessary if used standalone).

Contributing

Fork the repository on Github

Create a named feature branch (like add_component_x)

Write you change

Write tests for your change (if applicable)

Run the tests, ensuring they all pass

Submit a Pull Request using Github

Supermarket share

stove is used to create git tags and
publish the cookbook on supermarket.chef.io.

To tag/publish you need to be a contributor to the cookbook on Supermarket and
run: