Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Sync the version installed in the recipe with the resource. #40

Merged
merged 2 commits into from
Apr 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 ([[email protected]](mailto:[email protected]))

**Copyright:** 2008-2016, Chef Software, Inc.
**Copyright:** 2008-2017, Chef Software, Inc.

```
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
8 changes: 8 additions & 0 deletions test/integration/default/activemq_spec.rb
Original file line number Diff line number Diff line change
@@ -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