diff --git a/.kitchen.yml b/.kitchen.yml index a73a5ef..6bd283a 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -1,38 +1,23 @@ ---- driver_plugin: vagrant driver_config: require_chef_omnibus: true platforms: -- name: ubuntu-12.04 - driver_config: - box: opscode-ubuntu-12.04 - box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box - run_list: - - recipe[apt] -- name: ubuntu-10.04 - driver_config: - box: opscode-ubuntu-10.04 - box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box - run_list: - - recipe[apt] - -- name: centos-6.4 - driver_config: - box: opscode-centos-6.4 - box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box - -- name: centos-5.9 - driver_config: - box: opscode-centos-5.9 - box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-5.9_provisionerless.box + - name: ubuntu-10.04 + run_list: + - recipe[apt] + - name: ubuntu-12.10 + run_list: + - recipe[apt] + - name: centos-6.4 + - name: centos-5.9 suites: -- name: default - run_list: - - recipe[wordpress] - attributes: - mysql: - server_root_password: "Please-Dont-Use-In-Production" - server_debian_password: "Please-Dont-Use-In-Production" - server_repl_password: "Please-Dont-Use-In-Production" \ No newline at end of file + - name: default + run_list: + - recipe[wordpress] + attributes: + mysql: + server_root_password: "Please-Dont-Use-In-Production" + server_debian_password: "Please-Dont-Use-In-Production" + server_repl_password: "Please-Dont-Use-In-Production" diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..32ffbca --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +rvm: + - 1.9.3 + - 2.0.0 +before_script: + - bundle exec berks install +bundler_args: --without integration +script: bundle exec strainer test --except kitchen diff --git a/Berksfile b/Berksfile index 34a3b2d..3b5ff95 100644 --- a/Berksfile +++ b/Berksfile @@ -1,8 +1,6 @@ site :opscode - metadata group :integration do - cookbook "apt" - cookbook "yum" + cookbook 'apt', '~> 2.0' end diff --git a/CHANGELOG.md b/CHANGELOG.md index abafe87..c102aa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,45 +1,42 @@ -## v1.1.0 +CHANGELOG +========= -This version updates support for test kitchen to version 1.0. See -TESTING.md +v1.1.0 +------ +- Added Test Kitchen 1.0 -### Bug - -- [COOK-1393]: wordpress recipe should use mysql::ruby to ensure ruby - extension is installed +Bug Fixes: +- [COOK-1393]: wordpress recipe should use mysql::ruby to ensure ruby extension is installed - [COOK-2984]: wordpress cookbook has foodcritic failures -### Improvement - +Improvements: - [COOK-2661]: Allow downloads from other repos for wordpress install -## v1.0.0: - -* [COOK-1127] - update defaults to latest version -* [COOK-1222] - support installing "latest" version -* [COOK-1271] - Wordpress cookbook generates new password on every - chef run - -## v0.8.8: - -* [COOK-826] - recipe doesn't quote password string - -## v0.8.6: - -* [COOK-534] - allow server_aliases to overridden by an attribute -* [COOK-799] - fixed disables .htaccess breaking permalink feature -* [COOK-820] - guard node.save with check for chef-solo in our cookbooks - -## v0.8.4: - -* [COOK-406] - wp-config.php.erb has wrong CRLF encoding -* Dropping explicit support for Red Hat platforms due to issues in php - and mysql cookbooks (COOK-603, COOK-672, COOK-816, COOK-679) - -## v0.8.2: - -* [COOK-435] Don't set the mysql root user password in wordpress cookbook -* [COOK-535] - recursively create the directory -* RHEL/CentOS/Fedora support (yeah!) -* cleaned up node attribute keys -* cleaned up README.md +v1.0.0: +------- +- [COOK-1127] - update defaults to latest version +- [COOK-1222] - support installing "latest" version +- [COOK-1271] - Wordpress cookbook generates new password on every chef run + +v0.8.8 +------ +- [COOK-826] - recipe doesn't quote password string + +v0.8.6 +------ +- [COOK-534] - allow server_aliases to overridden by an attribute +- [COOK-799] - fixed disables .htaccess breaking permalink feature +- [COOK-820] - guard node.save with check for chef-solo in our cookbooks + +v0.8.4 +------ +- [COOK-406] - wp-config.php.erb has wrong CRLF encoding +- Dropping explicit support for Red Hat platforms due to issues in php and mysql cookbooks (COOK-603, COOK-672, COOK-816, COOK-679) + +v0.8.2 +------ +- [COOK-435] Don't set the mysql root user password in wordpress cookbook +- [COOK-535] - recursively create the directory +- RHEL/CentOS/Fedora support (yeah!) +- cleaned up node attribute keys +- cleaned up README.md diff --git a/CONTRIBUTING b/CONTRIBUTING deleted file mode 100644 index 89ac873..0000000 --- a/CONTRIBUTING +++ /dev/null @@ -1,29 +0,0 @@ -If you would like to contribute, please open a ticket in JIRA: - -* http://tickets.opscode.com - -Create the ticket in the COOK project and use the cookbook name as the -component. - -For all code contributions, we ask that contributors sign a -contributor license agreement (CLA). Instructions may be found here: - -* http://wiki.opscode.com/display/chef/How+to+Contribute - -When contributing changes to individual cookbooks, please do not -modify the version number in the metadata.rb. Also please do not -update the CHANGELOG.md for a new version. Not all changes to a -cookbook may be merged and released in the same versions. Opscode will -handle the version updates during the release process. You are welcome -to correct typos or otherwise make updates to documentation in the -README. - -If a contribution adds new platforms or platform versions, indicate -such in the body of the commit message(s), and update the relevant -COOK ticket. When writing commit messages, it is helpful for others if -you indicate the COOK ticket. For example: - - git commit -m '[COOK-1041] Updated pool resource to correctly delete.' - -In the ticket itself, it is also helpful if you include log output of -a successful Chef run, but this is not absolutely required. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5224c33 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,20 @@ +Contribution Guidelines +======================= + +If you would like to contribute to the Chef Wordpress cookbook, +you must open a ticket in [JIRA](http://tickets.opscode.com). + +1. Create the ticket in the [COOK] (use "wordpress" for the component) +2. [Sign a CLA](http://wiki.opscode.com/display/chef/How+to+Contribute) + +- Please do NOT modify the version number +- Please do NOT update the CHANGELOG + +We will update the version number and CHANGELOG when we release a new version. + +If a contribution adds new platforms or platform versions, indicate +such in the body of the commit message(s), and update the relevant +COOK ticket. When writing commit messages, it is helpful for others if +you indicate the COOK ticket. For example: + + $ git commit -m '[COOK-1041] Updated pool resource to correctly delete.' diff --git a/Gemfile b/Gemfile index f04cf4b..ff2d454 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,14 @@ -source :rubygems +source 'https://rubygems.org' -group :kitchen do - gem 'test-kitchen', '< 1.0' +gem 'chef', '~> 11.6' +gem 'berkshelf', '~> 2.0' + +group :test do + gem 'foodcritic', '~> 2.2' + gem 'strainer', '~> 3.1' +end + +group :integration do + gem 'test-kitchen', '~> 1.0.0.beta' + gem 'kitchen-vagrant', '~> 0.11' end diff --git a/README.md b/README.md index bba0994..7f05d99 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,110 @@ -Description -=========== +Chef Wordpress Cookbook +======================= +The Chef Wordpress cookbook installs and configures Wordpress according to the instructions at http://codex.wordpress.org/Installing_WordPress. -Installs and configures Wordpress according to the instructions at http://codex.wordpress.org/Installing_WordPress. Does not set up a 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). +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). -Requirements -============ -Platform --------- +Installation +------------ +Install the cookbook using knife: -* Debian, Ubuntu + $ knife cookbook site install wordpress -Tested on: +Or, if you are using Berkshelf, add the cookbook to your Berksfile: -* Ubuntu 9.04, 9.10, 10.04 +```ruby +cookbook 'wordpress' +``` -Cookbooks ---------- -* mysql -* php -* apache2 -* opensssl (uses library to generate secure passwords) +Usage +----- +Add the cookbook to your `run_list` in a node or role: + +```json +{ + "run_list": [ + "recipe[wordpress::default]" + ] +} +``` + +Or include it in a recipe: + +```ruby +# other_cookbook/metadata.rb +# ... +depends 'wordpress' +``` + +```ruby +# 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 -========== +---------- +
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)] | +