diff --git a/README.md b/README.md index c8411cd..8dc5585 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/chef-cookbooks/activemq.svg?branch=master)](https://travis-ci.org/chef-cookbooks/activemq) [![Cookbook Version](https://img.shields.io/cookbook/v/activemq.svg)](https://supermarket.chef.io/cookbooks/activemq) -Installs Apache ActiveMQ and sets up the service using the included init script. +Provides resources for installing Apache ActiveMQ and managing the Apache ActiveMQ service for use in wrapper cookbooks. Installs from tarballs from the Apache.org website by default. ## Requirements @@ -33,13 +33,43 @@ Installs Apache ActiveMQ and sets up the service using the included init script. ## Usage -Simply add `recipe[activemq]` to a run list. +Due to the complexity of configuring ActiveMQ it's not possible to create a single solution that solves everyone's potential desired configuration. Instead this cookbook provides resources for installing and managing the ActiveMQ service, which are best used in your own wrapper cookbook. The best way to understand how this could be used is to look at the docs_example test recipe located at test/cookbooks/test/recipes/docs_example.rb + +## Resources + +### activemq_install + +The activemq_install resource installs an instance of the Apache ActiveMQ binary direct from Apache's mirror site. As distro packages are not used we can easily deploy per-instance installations and any version available on the Apache archive site can be installed. + +#### Properties + +* `instance_name`, String +* `version`, String. The version to install. Default: '5.12.0' +* `home`, String. The top level directory to install software. Default: '/opt' +* `install_path`, String. The full level path to install software. +* `tarball_base_path`, String. The base path to the location containing the binary package of ActiveMQ. Default: 'http://archive.apache. org/dist/activemq/' +* checksum_base_path, String, The base path to the location containing the checksum file. default: 'http://archive.apache.org/dist/activemq/' +* exclude_docs, [true, false], default: true +* exclude_examples, [true, false], default: true +* exclude_webapp_demo, [true, false], default: true +* tarball_uri, String +* activemq_user, String user to run activemq +* activemq_group, String group to run activemq + +#### Example + +``` +# Install hello instance of activemq +activemq_install 'hello' do + version '5.12.0' +end +``` ## License & Authors **Author:** Cookbook Engineering Team ([cookbooks@chef.io](mailto:cookbooks@chef.io)) -**Copyright:** 2008-2016, Chef Software, Inc. +**Copyright:** 2008-2017, Chef Software, Inc. ``` Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/attributes/default.rb b/attributes/default.rb index 3ac3425..467118e 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -18,7 +18,7 @@ # default['activemq']['mirror'] = 'https://repository.apache.org/content/repositories/releases/org/apache' -default['activemq']['version'] = '5.12.0' +default['activemq']['version'] = '5.14.4' default['activemq']['home'] = '/opt' default['activemq']['wrapper']['max_memory'] = '1024' default['activemq']['wrapper']['useDedicatedTaskRunner'] = 'true' diff --git a/test/integration/default/activemq_spec.rb b/test/integration/default/activemq_spec.rb index bc2cbbe..74c1c36 100644 --- a/test/integration/default/activemq_spec.rb +++ b/test/integration/default/activemq_spec.rb @@ -1,3 +1,11 @@ describe command('ps ax | grep activem[q]') do its('exit_status') { should eq 0 } end + +describe command('/opt/apache-activemq-5.14.4/bin/activemq producer') do + its('stdout') { should match(/Produced: 1000 messages/) } +end + +describe command('/opt/apache-activemq-5.14.4/bin/activemq consumer') do + its('stdout') { should match(/Consumed: 1000 messages/) } +end