You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by mikezaccardo <gi...@git.apache.org> on 2015/06/16 23:32:11 UTC

[GitHub] incubator-brooklyn pull request: Add install and customize command...

GitHub user mikezaccardo opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/695

    Add install and customize commands to VanillaSoftwareProcess

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mikezaccardo/incubator-brooklyn feature/expand-vanilla-process-commands

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/695.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #695
    
----
commit d0780794c23619324cb558b883d46b0685d3fefc
Author: Mike Zaccardo <mi...@cloudsoftcorp.com>
Date:   2015-06-16T21:25:47Z

    Add install and customize commands to VanillaSoftwareProcess

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add install and customize command...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/695#discussion_r32747839
  
    --- Diff: software/base/src/main/java/brooklyn/entity/basic/VanillaSoftwareProcessSshDriver.java ---
    @@ -78,6 +80,16 @@ public void install() {
                         throw new IllegalStateException("Error installing archive: " + downloadedFilename);
                 }
             }
    +        else {
    --- End diff --
    
    why 'else'?  i think always do this


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add install and customize command...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/695


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add install and customize command...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/695#discussion_r32747929
  
    --- Diff: software/base/src/main/java/brooklyn/entity/basic/VanillaSoftwareProcessSshDriver.java ---
    @@ -90,6 +102,18 @@ public void customize() {
                         .body.append(ArchiveUtils.extractCommands(downloadedFilename, getInstallDir()))
                         .execute();
             }
    +        else {
    --- End diff --
    
    again, no `else`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add install and customize command...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/695#issuecomment-113490265
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add install and customize command...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/695#issuecomment-113206109
  
    minor comments, then looks good


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add install and customize command...

Posted by mikezaccardo <gi...@git.apache.org>.
Github user mikezaccardo commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/695#issuecomment-113254457
  
    Addressed


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add install and customize command...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/695#discussion_r32747898
  
    --- Diff: software/base/src/main/java/brooklyn/entity/basic/VanillaSoftwareProcessSshDriver.java ---
    @@ -78,6 +80,16 @@ public void install() {
                         throw new IllegalStateException("Error installing archive: " + downloadedFilename);
                 }
             }
    +        else {
    +            String installCommand = getEntity().getConfig(VanillaSoftwareProcess.INSTALL_COMMAND);
    +            
    +            if (!StringUtils.isBlank(installCommand)) {
    --- End diff --
    
    prefer `Strings.isNonBlank(...)`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Add install and customize command...

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/695#discussion_r32886876
  
    --- Diff: software/base/src/main/java/brooklyn/entity/basic/VanillaSoftwareProcessSshDriver.java ---
    @@ -90,6 +100,17 @@ public void customize() {
                         .body.append(ArchiveUtils.extractCommands(downloadedFilename, getInstallDir()))
                         .execute();
             }
    +        
    +        String customizeCommand = getEntity().getConfig(VanillaSoftwareProcess.CUSTOMIZE_COMMAND);
    +        
    +        if (Strings.isNonBlank(customizeCommand)) {
    +            newScript(CUSTOMIZING)
    +                .failOnNonZeroResultCode()
    +                // don't set vars yet -- it resolves dependencies (e.g. DB) which we don't want until we start
    --- End diff --
    
    @mikezaccardo i'm finding vars can be useful in customize phase - going to reinstate this


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---