You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@whirr.apache.org by "Andrei Savu (Resolved) (JIRA)" <ji...@apache.org> on 2012/02/27 13:03:55 UTC

[jira] [Resolved] (WHIRR-505) alias mechanism for services

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

Andrei Savu resolved WHIRR-505.
-------------------------------

    Resolution: Won't Fix

Using ClusterActionHandlerFactory should be good enough. Closing.
                
> alias mechanism for services
> ----------------------------
>
>                 Key: WHIRR-505
>                 URL: https://issues.apache.org/jira/browse/WHIRR-505
>             Project: Whirr
>          Issue Type: New Feature
>          Components: core
>    Affects Versions: 0.7.0
>            Reporter: Gerrit Germis
>            Priority: Minor
>              Labels: alias, role, service
>
> Currently I have these services defined:
> * JBossNodeHandler  (role = "jboss")
> * JBossDeployHandler (abstract)
> ** JBossDeployPassHandler (role = "pass")
> ** JBossDeployAlexHandler (role = "alex")
> This allows me to use the folowing .properties file:
> {noformat}
> whirr.cluster-name=jbosstest
> whirr.instance-templates=2 jboss+alex,2 jboss+pass
> whirr.hardware-min-ram=1024
> whirr.firewall-rules.jboss=8080
> # For EC2 set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.
> whirr.provider=aws-ec2
> whirr.identity=${env:AWS_ACCESS_KEY_ID}
> whirr.credential=${env:AWS_SECRET_ACCESS_KEY}
> # Apps to deploy
> whirr.alex.tarball.url=http://x.y.org/wastebin/alex-1.0.war
> whirr.pass.tarball.url=http://x.y.org/wastebin/pass-1.0.war
> {noformat}
> If I want to add a new service, I would need to create another subclass of JBossDeployHandler to create a new role which i can then use in the .properties file. Since all application deploys on jboss typically need the same procedure to deploy, it would be handy if I could just have 1 implementation (eg: JBossDeployHandler) that I can give multiple role names, so that i can just add new applications to the .properties file without needing to create new subclasses.
> My subclasses currently are just dummy classes like:
> {code}
> public class JBossDeployAlexHandler extends JBossDeployHandler {
>     public static final String ROLE = "alex";
>     @Override
>     public String getRole() {
>         return ROLE;
>     }
> }
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira