Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1
    • Fix Version/s: not determined
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      12,699

      Description

      Currently deploy, redeploy commands accept a file path. It will be nice if they
      accept a URI instead. I am attaching a patch which is an attempt to address
      this, but I don't think it is complete. Any way, if someone wants to take a stab
      at this issue, the patch may come handy.

      1. pathToUri_patch.txt
        22 kB
        Sanjeeb Sahoo

        Activity

        Hide
        Jeremy_Lv added a comment -

        Hi,All:
        As Tom has been suggested, I want to make sure what function should I implement.
        Here is my option:
        1.Support a new command like "deployuri", The "deployuri" will support the following options
        1).--name <name>
        2).--contextroot <contextroot>
        3).--virtualservers <virtualservers>
        4).--libraries <libraries>
        5).--force[=<force(default:false)>]
        6).--precompilejsp[=<precompilejsp(default:false)>]
        7).--verify[=<verify(default:false)>]
        8).--retrieve <retrieve>
        9).--dbvendorname <dbvendorname>
        10).--createtables[=<createtables(default:false)>]
        11).--dropandcreatetables[=<dropandcreatetables(default:false)>]
        12).--uniquetablenames[=<uniquetablenames(default:false)>]
        13).--deploymentplan <deploymentplan>
        14).--altdd <altdd>
        15).--runtimealtdd <runtimealtdd>
        16).--enabled[=<enabled(default:false)>]
        17).--generatermistubs[=<generatermistubs(default:false)>]
        18).--availabilityenabled[=<availabilityenabled(default:false)>]
        20).--asyncreplication[=<asyncreplication(default:true)>]
        21).--target <target>
        22).--keepreposdir[=<keepreposdir(default:false)>
        23).--keepfailedstubs[=<keepfailedstubs(default:false)>]
        24).--logreportederrors[=<logreportederrors(default:true)>]
        25).--description <description>
        26).--properties <properties>
        27).--property <property>
        28).--type <type>
        29).--keepstate[=<keepstate(default:false)>]
        30).--lbenabled <lbenabled>
        31).--deploymentorder <deploymentorder>
        32).--upload[=<upload(default:false)>]
        33).?|-help[=<help(default:false)>]

        BTW:As the application is deployed as URI, Should we give up the function about --upload? (The original option about --upload is support for File types.)

        2.Should I support another command which is used for redeploy the application as URI?(As the description shows)

        Notice: As the URI is complex type to use, I think I will support the file:// syntax first.

        If someone want to present more options about this improvement, please comments.

        Best regards
        -Jeremy

        Show
        Jeremy_Lv added a comment - Hi,All: As Tom has been suggested, I want to make sure what function should I implement. Here is my option: 1.Support a new command like "deployuri", The "deployuri" will support the following options 1).--name <name> 2).--contextroot <contextroot> 3).--virtualservers <virtualservers> 4).--libraries <libraries> 5).--force [=<force(default:false)>] 6).--precompilejsp [=<precompilejsp(default:false)>] 7).--verify [=<verify(default:false)>] 8).--retrieve <retrieve> 9).--dbvendorname <dbvendorname> 10).--createtables [=<createtables(default:false)>] 11).--dropandcreatetables [=<dropandcreatetables(default:false)>] 12).--uniquetablenames [=<uniquetablenames(default:false)>] 13).--deploymentplan <deploymentplan> 14).--altdd <altdd> 15).--runtimealtdd <runtimealtdd> 16).--enabled [=<enabled(default:false)>] 17).--generatermistubs [=<generatermistubs(default:false)>] 18).--availabilityenabled [=<availabilityenabled(default:false)>] 20).--asyncreplication [=<asyncreplication(default:true)>] 21).--target <target> 22).--keepreposdir[=<keepreposdir(default:false)> 23).--keepfailedstubs [=<keepfailedstubs(default:false)>] 24).--logreportederrors [=<logreportederrors(default:true)>] 25).--description <description> 26).--properties <properties> 27).--property <property> 28).--type <type> 29).--keepstate [=<keepstate(default:false)>] 30).--lbenabled <lbenabled> 31).--deploymentorder <deploymentorder> 32).--upload [=<upload(default:false)>] 33). ?| -help [=<help(default:false)>] BTW:As the application is deployed as URI, Should we give up the function about --upload? (The original option about --upload is support for File types.) 2.Should I support another command which is used for redeploy the application as URI?(As the description shows) Notice: As the URI is complex type to use, I think I will support the file:// syntax first. If someone want to present more options about this improvement, please comments. Best regards -Jeremy
        Hide
        Jeremy_Lv added a comment -

        As the JIRA file system can not work, I have sent my modification by email. please check it.

        Show
        Jeremy_Lv added a comment - As the JIRA file system can not work, I have sent my modification by email. please check it.
        Hide
        Jeremy_Lv added a comment -

        Thanks for Tom's suggestion, After being compare these two options I think the option#1 seems better than option#2.
        It seems not diffcult to develop and it is no longer to change codes in CLI.

        Show
        Jeremy_Lv added a comment - Thanks for Tom's suggestion, After being compare these two options I think the option#1 seems better than option#2. It seems not diffcult to develop and it is no longer to change codes in CLI.
        Hide
        Jeremy_Lv added a comment -

        First, what are the expected semantics for the original request? If the deploy command is invoked with a URI, what is the asadmin client expected to do? For example, is the client expected to fetch the content of the URI and then treat that content the same way it treats a file today? Is the URI supposed to be passed to the server, and then the server is surpposed to fetch the content of the URI? A key question is, where does the URI client code execute?

        What I have supposed to do is that the client expected to fetch the content of the URI and then treat that content the same way it treats a file today.

        Second, since the original syntax must be supported, how is the command parameter actually declared. If it is a URI (as the subtask requests), is the asadmin client expected to convert a path argument to a URI argument automatically? How is the asadmin client supposed to know that the default URI scheme should be "file://"? Is the implementation to be hardcoded this way, or is it necessary to allow the default scheme to be specified by the command.
        Or, is the idea hear to allow the operand to be of varying types depending on what is entered by the user? If it looks like a URI, then just the URI is passed, but if it looks like a path, then a File is passed? What would the @Param declaration for a command look like in this case?

        What I have revised is to define a path as a URI parameter. Then I will try to convert a path argument to a URI argument when it is excuted in the asadmin client.

        All in all, What I have revised is based on the option#2, which is defined a URI parameter and change the File to URI when the application is deployed as a File.

        BTW: If we decide to take the option#1, I will look into the logical about deploydir first before I code.

        Show
        Jeremy_Lv added a comment - First, what are the expected semantics for the original request? If the deploy command is invoked with a URI, what is the asadmin client expected to do? For example, is the client expected to fetch the content of the URI and then treat that content the same way it treats a file today? Is the URI supposed to be passed to the server, and then the server is surpposed to fetch the content of the URI? A key question is, where does the URI client code execute? What I have supposed to do is that the client expected to fetch the content of the URI and then treat that content the same way it treats a file today. Second, since the original syntax must be supported, how is the command parameter actually declared. If it is a URI (as the subtask requests), is the asadmin client expected to convert a path argument to a URI argument automatically? How is the asadmin client supposed to know that the default URI scheme should be "file://"? Is the implementation to be hardcoded this way, or is it necessary to allow the default scheme to be specified by the command. Or, is the idea hear to allow the operand to be of varying types depending on what is entered by the user? If it looks like a URI, then just the URI is passed, but if it looks like a path, then a File is passed? What would the @Param declaration for a command look like in this case? What I have revised is to define a path as a URI parameter. Then I will try to convert a path argument to a URI argument when it is excuted in the asadmin client. All in all, What I have revised is based on the option#2, which is defined a URI parameter and change the File to URI when the application is deployed as a File. BTW: If we decide to take the option#1, I will look into the logical about deploydir first before I code.
        Hide
        Sanjeeb Sahoo added a comment -

        I support option #1. It keeps things simple.

        Sahoo

        Show
        Sanjeeb Sahoo added a comment - I support option #1. It keeps things simple. Sahoo

          People

          • Assignee:
            Hong Zhang
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: