Skip to content

Commit

Permalink
Test simple plugin install as part of default
Browse files Browse the repository at this point in the history
- Test default simple plugin install as part of default test suite.
- Add example using the test to the documentation. Add more simple examples to the README.md, demonstrating the defaults. RE: #345
  • Loading branch information
martinb3 committed Jul 17, 2015
1 parent c8bd30e commit 78cabea
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ suites:
- name: default # the normal use-case
run_list:
- recipe[java]
- recipe[elasticsearch]
- recipe[elasticsearch_test::default_with_plugins]

- name: elasticsearch_test # the override-everything use case
run_list:
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ Actions: `:create`, `:remove`

Creates a user and group on the system for use by elasticsearch. Here is an
example with many of the default options and default values (all options except
a resource name may be omitted):
a resource name may be omitted).

```ruby
Examples:

```
elasticsearch_user 'elasticsearch'
```

```
elasticsearch_user 'elasticsearch' do
username 'elasticsearch'
groupname 'elasticsearch'
Expand All @@ -50,6 +56,10 @@ the package or directory elasticsearch was unpacked into.

Examples:

```
elasticsearch_install 'elasticsearch'
```

```
elasticsearch_install 'my_es_installation' do
type :tarball # type of install
Expand Down Expand Up @@ -172,6 +182,10 @@ Actions: `:install`, `:remove`
Installs or removes a plugin to a given elasticsearch instance and plugin
directory.

```
elasticsearch_plugin 'mobz/elasticsearch-head'
```

```
elasticsearch_plugin 'mobz/elasticsearch-head' do
plugin_dir '/usr/local/awesome/elasticsearch-1.5.0/plugins'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Encoding: utf-8
#
# Cookbook Name:: elasticsearch_test
# Recipe:: default_with_plugins
#
# This cookbook is designed to be just elasticsearch::default plus installing
# some plugins. We want to test the default plugin resource without any
# interesting overrides, but don't want to ship that as a recipe in the main
# cookbook (unlike install, configure, and service, which we do ship in the
# default cookbook).

# see README.md and test/fixtures/cookbooks for more examples!
include_recipe 'elasticsearch::default'

# by default, no plugins
elasticsearch_plugin 'mobz/elasticsearch-head'

0 comments on commit 78cabea

Please sign in to comment.