Draft rewrite of java cookbooks with java_cpr lwrp

I have rewritten the java cookbook to use the java_cpr lwrp (Crappy Package
Resource). This LWRP provides an easy way to manage java applications. It
is "crappy" because it is very simple and barely deserves being called a
package resource. Essentially, you provide the java_cpr with the URL to a
tarball and
the commands within the extracted result that you want symlinked to
/usr/bin/

As I mentioned in an earlier post to this ML, the jpackage rpm repository
is no longer actively maintained and the versions of tomcat, jboss, maven,
ant, etc. available in the ubuntu and rhel/centos repositories are too far
behind to satisfy discerning java developers. Thus the java_cpr.

Here is an example

install jdk6 from Oracle

java_cpr "jdk" do
url '
http://download.oracle.com/otn-pub/java/jdk/6u29-b11/jdk-6u29-linux-x64.bin'
checksum
'a8603fa62045ce2164b26f7c04859cd548ffe0e33bfc979d9fa73df42e3b3365'
app_root '/usr/local/java'
bin_cmds ["java", "javac"]
action :install
end

I intend to rewrite the tomcat and my as yet-unpublished jboss cookbook
using this lwrp. Advice, criticism welcome!

I have put these new java cookbooks in this commit.

I attempted to create a "bare branch" that only includes the cookbooks I
want to merge, however this bare branch seems to do a lot of violence to
the branch. Please let me know if there is a better way to do this.

I followed this technique, as described to me by Atomic-Penguin
http://book.git-scm.com/5_creating_new_empty_branches.html

BryanWB

Yeah, if you are maintaining a public repository which will never get
pushed upstream to opscode it makes sense to use a bare branch. In the
sense that it makes no sense to track upstream changes for a community
cookbook which has no shared development history with opscode/master

However, if you are pushing changes to an official opscode cookbook, you
have to keep that development history for a clean merge upstream.

Eric G. Wolfe
Senior Linux Administrator,
IT Infrastructure Systems

Marshall University Computing Services
Drinko Library 428-K
One John Marshall Dr.
Huntington, WV 25755
Phone: 304.696.3428
Email: eric.wolfe@marshall.edu

Admiration, n.:
Our polite recognition of another's resemblance to ourselves.
-- Ambrose Bierce, "The Devil's Dictionary"

On 12/05/2011 03:12 AM, Bryan Berry wrote:

I have rewritten the java cookbook to use the java_cpr lwrp (Crappy
Package Resource). This LWRP provides an easy way to manage java
applications. It is "crappy" because it is very simple and barely
deserves being called a package resource. Essentially, you provide the
java_cpr with the URL to a tarball and
the commands within the extracted result that you want symlinked to
/usr/bin/

As I mentioned in an earlier post to this ML, the jpackage rpm
repository is no longer actively maintained and the versions of
tomcat, jboss, maven, ant, etc. available in the ubuntu and
rhel/centos repositories are too far behind to satisfy discerning java
developers. Thus the java_cpr.

Here is an example

install jdk6 from Oracle

java_cpr "jdk" do
url
'Unauthorized Request'
checksum
'a8603fa62045ce2164b26f7c04859cd548ffe0e33bfc979d9fa73df42e3b3365'
app_root '/usr/local/java'
bin_cmds ["java", "javac"]
action :install
end

I intend to rewrite the tomcat and my as yet-unpublished jboss
cookbook using this lwrp. Advice, criticism welcome!

I have put these new java cookbooks in this commit.
https://github.com/bryanwb/cookbooks/commit/50900a866bd014927a74912a92b775399d181c36

I attempted to create a "bare branch" that only includes the cookbooks
I want to merge, however this bare branch seems to do a lot of
violence to the branch. Please let me know if there is a better way to
do this.

I followed this technique, as described to me by Atomic-Penguin
http://book.git-scm.com/5_creating_new_empty_branches.html

BryanWB

thanks for explaining that Atomic-Penguin-sensei

i have redone it and I think this pull request will result in a clean
merge

On Mon, Dec 5, 2011 at 2:43 PM, Eric G. Wolfe eric.wolfe@marshall.eduwrote:

**
Yeah, if you are maintaining a public repository which will never get
pushed upstream to opscode it makes sense to use a bare branch. In the
sense that it makes no sense to track upstream changes for a community
cookbook which has no shared development history with opscode/master

However, if you are pushing changes to an official opscode cookbook, you
have to keep that development history for a clean merge upstream.

Eric G. Wolfe
Senior Linux Administrator,
IT Infrastructure Systems

Marshall University Computing Services
Drinko Library 428-K
One John Marshall Dr.
Huntington, WV 25755
Phone: 304.696.3428
Email: eric.wolfe@marshall.edu

Admiration, n.:
Our polite recognition of another's resemblance to ourselves.
-- Ambrose Bierce, "The Devil's Dictionary"

On 12/05/2011 03:12 AM, Bryan Berry wrote:

I have rewritten the java cookbook to use the java_cpr lwrp (Crappy
Package Resource). This LWRP provides an easy way to manage java
applications. It is "crappy" because it is very simple and barely deserves
being called a package resource. Essentially, you provide the java_cpr with
the URL to a tarball and
the commands within the extracted result that you want symlinked to
/usr/bin/

As I mentioned in an earlier post to this ML, the jpackage rpm
repository is no longer actively maintained and the versions of tomcat,
jboss, maven, ant, etc. available in the ubuntu and rhel/centos
repositories are too far behind to satisfy discerning java developers. Thus
the java_cpr.

Here is an example

install jdk6 from Oracle

java_cpr "jdk" do
url '
Unauthorized Request
'
checksum
'a8603fa62045ce2164b26f7c04859cd548ffe0e33bfc979d9fa73df42e3b3365'
app_root '/usr/local/java'
bin_cmds ["java", "javac"]
action :install
end

I intend to rewrite the tomcat and my as yet-unpublished jboss cookbook
using this lwrp. Advice, criticism welcome!

I have put these new java cookbooks in this commit.

https://github.com/bryanwb/cookbooks/commit/50900a866bd014927a74912a92b775399d181c36

I attempted to create a "bare branch" that only includes the cookbooks I
want to merge, however this bare branch seems to do a lot of violence to
the branch. Please let me know if there is a better way to do this.

I followed this technique, as described to me by Atomic-Penguin
http://book.git-scm.com/5_creating_new_empty_branches.html

BryanWB