forked from chef-boneyard/activemq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jtimberman
committed
Oct 22, 2009
0 parents
commit 525b4f7
Showing
7 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
= DESCRIPTION: | ||
|
||
Installs activemq and sets up a runit service. | ||
|
||
= REQUIREMENTS: | ||
|
||
Tested on Ubuntu 9.04. | ||
|
||
Opscode cookbooks: | ||
|
||
* java | ||
* runit | ||
|
||
= ATTRIBUTES: | ||
|
||
* activemq[:mirror] - download URL up to the apache/activemq/apache-activemq directory. | ||
* activemq[:version] - version to install. | ||
|
||
= USAGE: | ||
|
||
Include the default recipe on systems where you want to run activemq. At this time the cookbook doesn't use any custom configuration for activemq. | ||
|
||
= LICENSE AND AUTHOR: | ||
|
||
Author:: Joshua Timberman (<[email protected]>) | ||
|
||
Copyright:: 2009, 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# | ||
# Cookbook Name:: activemq | ||
# Attributes:: activemq | ||
# | ||
# Copyright 2009, 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. | ||
# | ||
|
||
set_unless[:activemq][:mirror] = "http://mirrors.ibiblio.org/pub/mirrors" | ||
set_unless[:activemq][:version] = "5.3.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"recipes": { | ||
"activemq": "" | ||
}, | ||
"conflicting": { | ||
|
||
}, | ||
"description": "Installs\/Configures activemq", | ||
"providing": { | ||
"activemq": [ | ||
|
||
] | ||
}, | ||
"long_description": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES: \n\n= USAGE:\n\n", | ||
"platforms": { | ||
|
||
}, | ||
"version": "0.1.0", | ||
"replacing": { | ||
|
||
}, | ||
"name": "activemq", | ||
"attributes": { | ||
|
||
}, | ||
"maintainer": "Opscode, Inc.", | ||
"recommendations": { | ||
|
||
}, | ||
"license": "Apache 2.0", | ||
"maintainer_email": "[email protected]", | ||
"suggestions": { | ||
|
||
}, | ||
"dependencies": { | ||
"java": [ | ||
|
||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
maintainer "Opscode, Inc." | ||
maintainer_email "[email protected]" | ||
license "Apache 2.0" | ||
description "Installs activemq and sets it up as a runit service" | ||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc')) | ||
version "0.1" | ||
|
||
%x{java runit}.each do |cb| | ||
depends cb | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Cookbook Name:: activemq | ||
# Recipe:: default | ||
# | ||
# Copyright 2009, 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. | ||
# | ||
|
||
include_recipe "java" | ||
|
||
version = node[:activemq][:version] | ||
mirror = node[:activemq][:mirror] | ||
|
||
remote_file "/tmp/apache-activemq-#{version}-bin.tar.gz" do | ||
source "#{mirror}/apache/activemq/apache-activemq/#{version}/apache-activemq-#{version}-bin.tar.gz" | ||
mode "0644" | ||
end | ||
|
||
execute "tar zxf /tmp/apache-activemq-#{version}-bin.tar.gz" do | ||
cwd "/opt" | ||
not_if { File.exists?("/opt/apache-activemq-#{version}/bin/activemq") } | ||
end | ||
|
||
file "/opt/apache-activemq-#{version}/bin/activemq" do | ||
owner "root" | ||
group "root" | ||
mode "0755" | ||
end | ||
|
||
runit_service "activemq" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
exec svlogd -tt ./main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
exec 2>&1 | ||
exec /opt/apache-activemq-<%= @node[:activemq][:version] %>/bin/activemq |