install_from_release refactored into ark

18 views
Skip to first unread message

Bryan Berry

unread,
Mar 21, 2012, 4:51:17 AM3/21/12
to infochi...@googlegroups.com, fl...@infochimps.org

Dear chimps,

I love the install_from_release cookbook. I started adding functionality to it to meet my particular needs but found that it made the code too brittle. I ended up rewriting the whole LWRP as Provider and Resource classes under ark/libraries.  I think this makes the whole thing much more extensible and robust. It does not yet support building with ant, make, or python but it shouldn't be difficult to add that in the future.

I have made some other superficial changes.

Here are some of the new resources I have created

ark_put "ivy" do
  url 'http://someurl.example.com/ivy.tar.gz'   checksum '89ba5fde0c596db388c3bbd265b63007a9cc3df3a8e6d79a46780c1a39408cb5' end

This is the simplest of all possible arks, it unpacks ivy to /usr/local/ivy and does not create any symlinks

ark_dump "jira_dependencies"   url "http://atlassian.com/bunch_of_jars.zip"   path "/usr/local/tomcat/lib"   stop_file "wsdl4j.jar"   owner "tomcat" end
ark_dump will place all the *.jar files in the archive into /usr/local/tomcat/lib/. Note: ark_dump currently only supports *.zip archives. 

Then finally, ark_cherry_pick, which cherry picks a single file from an archive

ark_cherry_pick 'mysql-connector-java' do   url 'http://oracle.com/mysql-connector.zip'   file 'mysql-connector-java-5.0.8-bin.jar'   path '/usr/local/tomcat/lib' end
Thanks again dear chimps for the awesome work on install_from. I hope you like ark. btw ark is an archive but Kewler

There are a lot more details on my blog post here:
http://devopsanywhere.blogspot.it/2012/03/managing-archives-with-ark-resource.html
Reply all
Reply to author
Forward
0 new messages