Uploaded image for project: 'Apache Whirr (retired)'
  1. Apache Whirr (retired)
  2. WHIRR-505

alias mechanism for services

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 0.7.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:

      Description

      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:

      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
      

      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:

      public class JBossDeployAlexHandler extends JBossDeployHandler {
          public static final String ROLE = "alex";
      
          @Override
          public String getRole() {
              return ROLE;
          }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lurch_1 Gerrit Germis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: