Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

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.

Select Badges

Select Supported Platforms

Select Status

RSS

wordpress (25) Versions 1.2.0

Installs/Configures WordPress

Policyfile
Berkshelf
Knife
cookbook 'wordpress', '= 1.2.0', :supermarket
cookbook 'wordpress', '= 1.2.0'
knife supermarket install wordpress
knife supermarket download wordpress
README
Dependencies
Quality -%

Chef Wordpress Cookbook

The Chef Wordpress cookbook installs and configures Wordpress according to the instructions at http://codex.wordpress.org/Installing_WordPress.

This cookbook does not set up the WordPress blog. You will need to do this manually by going to http://hostname/wp-admin/install.php (this URL may be different if you change the attribute values).

Installation

Install the cookbook using knife:

$ knife cookbook site install wordpress

Or, if you are using Berkshelf, add the cookbook to your Berksfile:

cookbook 'wordpress'

Usage

Add the cookbook to your run_list in a node or role:

{
  "run_list": [
    "recipe[wordpress::default]"
  ]
}

Or include it in a recipe:

# other_cookbook/metadata.rb
# ...
depends 'wordpress'
# other_cookbook/recipes/default.rb
# ...
include_recipe 'wordpress::default'

If a different version than the default is desired, download that version and get the SHA256 checksum (sha256sum on Linux systems), and set the version and checksum attributes.

Attributes

node['wordpress'] attributes:

<table>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Example</th>
<th>Default</th>
</tr>
</thead>

<tbody>
<tr>
<td>version</td>
<td>version of the wordpress to install</td>
<td><tt>1.2.3</tt></td>
<td><tt>'latest'</tt></td>
</tr>
<tr>
<td>checksum</td>
<td>sha256sum of the tarball</td>
<td><tt>abcd1234</tt></td>
<td><tt>''</tt></td>
</tr>
<tr>
<td>dir</td>
<td>location for wordpress files</td>
<td><tt>/nfs/wp</tt></td>
<td><tt>/var/www</tt></td>
</tr>
<tr>
<td>server_aliases</td>
<td>server aliases for Apache</td>
<td><tt>['foo.com']</tt></td>
<td><tt>[(node's FQDN)]</tt></td>
</tr>
</tbody>
</table>

node['wordpress']['db'] attributes:

<table>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Example</th>
<th>Default</th>
</tr>
</thead>

<tbody>
<tr>
<td>database</td>
<td>name of the database to use</td>
<td><tt>bob-wordpress</tt></td>
<td><tt>wordpressdb</tt></td>
</tr>
<tr>
<td>user</td>
<td>the user to connect to MySQL</td>
<td><tt>user</tt></td>
<td><tt>wordpressuser</tt></td>
</tr>
<tr>
<td>password</td>
<td>the password to connect to MySQL</td>
<td><tt>P@s$w0rD</tt></td>
<td><tt>(randomly generated)</tt></td>
</tr>
</tbody>
</table>

node['wordpress']['languages'] attributes:

<table>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Example</th>
<th>Default</th>
</tr>
</thead>

<tbody>
<tr>
<td>lang</td>
<td>WPLANG value</td>
<td><tt>ja</tt></td>
<td><tt>''</tt></td>
</tr>
<tr>
<td>version</td>
<td>version of the <a href="http://translate.wordpress.org/projects/wp">WordPress translation projects</a></td>
<td><tt>3.6.x</tt></td>
<td><tt>''</tt></td>
</tr>
<tr>
<td>projects</td>
<td>translation project names to install</td>
<td><tt>['main']</tt></td>
<td><tt>['main', 'admin', 'admin_network', 'continents_cities']</tt></td>
</tr>
<tr>
<td>themes</td>
<td>theme translation project names to install</td>
<td><tt>['twentytwelve']</tt></td>
<td><tt>[]</tt></td>
</tr>
</tbody>
</table>

Attributes will probably never need to change (these all default to randomly generated strings):

  • node['wordpress']['keys']['auth']
  • node['wordpress']['keys']['secure_auth']
  • node['wordpress']['keys']['logged_in']
  • node['wordpress']['keys']['nonce']

Development

This cookbook uses Test Kitchen (1.0). To run the tests, clone the repository, install the gems, and run test kitchen:

$ git clone git://github.com/opscode-cookbooks/wordpress.git
$ cd wordpress
$ bundle install
$ bundle exec strainer test
  1. Fork the cookbook on GitHub
  2. Make changes
  3. Write appropriate tests
  4. Submit a Pull Request back to the project
  5. Open a JIRA ticket, linking back to the Pull Request

License & Authors

Copyright:: 2010-2011, Opscode, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

No quality metric results found