[ 
https://issues.apache.org/jira/browse/BROOKLYN-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14148993#comment-14148993
 ] 

Alex Heneveld commented on BROOKLYN-70:
---------------------------------------

this new style `.../download` link is irksome because we don't know the archive 
format and directory name until we have followed the link.  ideally we do the 
download on the remote machine, but the commands to unpack and extract the 
cookbook name (directory name) are done on the brooklyn server based on the URL.

a quick fix might be to assume any link without an obvious archive extension is 
a TGZ, and we cat the download to `tar xvfz` and require that this results in a 
directory which matches the key

a long-term repair if more complex behaviour is needed is to allow additional 
strategies; these could be specified by supplying instead of the string (URL) a 
map containing `url` key OR an `install_command` key, where `install_command` 
could be used to do arbitrary bash to install it as needed (defaulting to `curl 
-f -L -k URL | tar xvfz` when a `url` is supplied)

> new chef community site uses different download links not compatible with 
> brooklyn-chef support
> -----------------------------------------------------------------------------------------------
>
>                 Key: BROOKLYN-70
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-70
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Alex Heneveld
>
> it used to be that the preferred URL was the github release, e.g.
>     (1) https://github.com/poise/poise/archive/v1.0.10.tar.gz
> now they seem to offer a convenience link at
>     (2) https://community.opscode.com/cookbooks/poise/versions/1.0.10/download
> which redirects to a CDN:
>     (3) 
> https://s3.amazonaws.com/community-files.opscode.com/cookbook_versions/tarballs/6179/original/poise.tgz?1394831504
> WORKAROUND
> until we support this new chef community mechanism (which will require some 
> work, because we have to be smarter about how we unpack the archive), instead 
> of using (2) above users should follow the "View Source" link to github then 
> the "<#> Releases" link and get the github TGZ for the recipe(s) desired.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to