- From: Bryan Berry <
>
- To:
- Subject: [chef] Using the "ark" resource to do simple install steps with an archive file
- Date: Thu, 23 Feb 2012 15:36:36 +0100
- Authentication-results: mr.google.com; spf=pass (google.com: domain of
designates 10.52.88.103 as permitted sender)
; dkim=pass
I see a lot of people reinventing the install process for tarballs, zipfiles, wars, etc, myself included
I have adapted infochimps' excellent install_from_release LWRP for downloading archives ('arks') from a given url, unpacking them to a given directory, and making them available to the rest of the system.
This example copies ivy.tar.gz to /usr/local/src/ivy-2.2.0.tar.gz, unpacks its contents to /usr/local/share/ivy-2.2.0/ -- stripping the leading directory, and symlinks /usr/local/share/ivy to /usr/local/shary/ivy-2.2.0
This example copies jdk-7u2-linux-x64.tar.gz to /usr/local/src/jdk-7.2.tar.gz, unpacks its contents to /usr/local/share/jdk-7.2/ -- stripping the leading directory, symlinks /usr/local/jvm/default to /usr/local/share/jkd-7.2, and adds /usr/local/share/jdk-7.2/bin/ to the global PATH for all users. The user 'foobar' is the owner of the /usr/local/share/jdk-7.2 directory
This example uses a stop_file to signal that the ark does not need to be unpacked if "/usr/local/share/tomcat/lib/portal-client.jar" file exists.
The vast majority of the code was written by Flip Kromer and he deserves the credit. I changed the name in my fork because "install_from_release" is just too long for my minimalist tastes
Infochimps install_from can also handle the install and configuration of arks with make, ant, and setup.py however I have not tested those aspects yet.
BryanWB
- [chef] Using the "ark" resource to do simple install steps with an archive file, Bryan Berry, 02/23/2012
Archive powered by MHonArc 2.6.16.