Whirr
  1. Whirr
  2. WHIRR-448

allow passing of arguments to script in run-script

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.6.0
    • Fix Version/s: None
    • Component/s: cli
    • Labels:
      None
    • Environment:

      Any

      Description

      As it is now, one can pass only a zero-argument script. Which means any slight variation of behavior desired of that script, you need to create a new script, either by hand or by some code generation machinery. Imagine a script to configure something, but the exact configuration depends on the version, only in details though. Wouldn't it be nice to be able to do whirr run-script setup-script 1.41.42 etc.? What is the alternative?

      1. WHIRR-448.patch
        15 kB
        Frank Scholten

        Activity

        Hide
        Andrei Savu added a comment -

        How about pulling up buildFilterPredicate() and runScriptOutput() to AbstractClusterCommand?

        Reusing the code by moving to base class sounds good enough for now.

        Show
        Andrei Savu added a comment - How about pulling up buildFilterPredicate() and runScriptOutput() to AbstractClusterCommand? Reusing the code by moving to base class sounds good enough for now.
        Hide
        Frank Scholten added a comment - - edited

        Seems we have commands to manage the cluster as a whole and commands that perform actions on one or more nodes based on id and role. So far we have RunScriptCommand and soon the ExecCommand and UploadCommand.

        How about pulling up buildFilterPredicate() and runScriptOutput() to AbstractClusterCommand?

        Show
        Frank Scholten added a comment - - edited Seems we have commands to manage the cluster as a whole and commands that perform actions on one or more nodes based on id and role. So far we have RunScriptCommand and soon the ExecCommand and UploadCommand. How about pulling up buildFilterPredicate() and runScriptOutput() to AbstractClusterCommand?
        Hide
        Andrei Savu added a comment -

        I like it. Before committing we need to refactor to remove duplication.

        Show
        Andrei Savu added a comment - I like it. Before committing we need to refactor to remove duplication.
        Hide
        Frank Scholten added a comment -

        Maybe not so difficult after all. Here is a command which executes a shell command on a single node or group of nodes.

        If there is also a command for uploading a file then thuis allows for very flexible scripting. The downside is that we get more types of commands.

        WDYT?

        Show
        Frank Scholten added a comment - Maybe not so difficult after all. Here is a command which executes a shell command on a single node or group of nodes. If there is also a command for uploading a file then thuis allows for very flexible scripting. The downside is that we get more types of commands. WDYT?
        Hide
        Frank Scholten added a comment -

        This would be nice but I think it's difficult to implement.

        Show
        Frank Scholten added a comment - This would be nice but I think it's difficult to implement.

          People

          • Assignee:
            Frank Scholten
            Reporter:
            Antonio Piccolboni
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development