[chef] draft rewrite of java cookbooks with java_cpr lwrp


Chronological Thread 
  • From: Bryan Berry < >
  • To:
  • Subject: [chef] draft rewrite of java cookbooks with java_cpr lwrp
  • Date: Mon, 5 Dec 2011 09:12:34 +0100

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
    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

BryanWB






Archive powered by MHonArc 2.6.16.

§