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).
Install the cookbook using knife:
$ knife cookbook site install wordpress
Or, if you are using Berkshelf, add the cookbook to your Berksfile:
cookbook 'wordpress'
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.
Attribute | Description | Example | Default |
---|---|---|---|
version | version of the wordpress to install | 1.2.3 | 'latest' |
checksum | sha256sum of the tarball | abcd1234 | '' |
dir | location for wordpress files | /nfs/wp | /var/www |
database | name of the database to use | bob-wordpress | wordpressdb |
user | the user to connect to MySQL | user | wordpressuser |
password | the password to connect to MySQL | P@s$w0rD | (randomly generated) |
server_aliases | server aliases for Apache | ['foo.com'] | [(node's FQDN)] |
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']
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
- Fork the cookbook on GitHub
- Make changes
- Write appropriate tests
- Submit a Pull Request back to the project
- Open a JIRA ticket, linking back to the Pull Request
- Author:: Barry Steinglass (barry@opscode.com)
- Author:: Joshua Timberman (joshua@opscode.com)
- Author:: Seth Chisamore (schisamo@opscode.com)
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.