[ 
https://issues.apache.org/jira/browse/WHIRR-225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom White updated WHIRR-225:
----------------------------

    Attachment: WHIRR-225.patch

We can implement this by using jclouds scriptbuilder classes. For example, by 
putting bash functions in files named after the function in 
_src/main/resources/functions_ we can call them with

{code}
addStatement(event, call("function-name"));
{code}

It's also makes it possible for users to override the function by editing the 
file in _functions_, e.g. _functions/function-name.sh_, (since the CLI puts the 
top-level directory on the front of the classpath, so any functions defined 
here will take precedence to the ones in the JAR).

If we refactor the existing scripts to be functions like this, then we will no 
longer have to serve them from a webserver. However, for larger clusters it may 
be preferable to download files from a webserver, so that the client doesn't 
have to send a potentially large script to each node in the cluster. Instead it 
could upload the script to a blobstore, then send a runurl command to each node 
in the cluster (see 
https://github.com/jclouds/jclouds/raw/master/demos/test/ComputeAndBlobStoreTogetherHappilyLiveTest.java
 for one way of doing this). We could do this enhancement as a separate JIRA.

I've attached a patch which shows how this would look for an example script 
function. It runs a (possibly user-defined) script in the bootstrap phase of 
ZooKeeper.

Thoughts?

> Support locally-supplied scripts
> --------------------------------
>
>                 Key: WHIRR-225
>                 URL: https://issues.apache.org/jira/browse/WHIRR-225
>             Project: Whirr
>          Issue Type: New Feature
>            Reporter: Tom White
>            Assignee: Tom White
>         Attachments: WHIRR-225.patch
>
>
> Whirr currently uses runurl to download bootstrap and configuration scripts 
> from a webserver. It should be possible to use scripts supplied from the 
> launch machine (or even from another source).

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to