You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by sjcorbett <gi...@git.apache.org> on 2014/12/19 12:34:22 UTC

[GitHub] incubator-brooklyn pull request: MongoDB and Node fixes

GitHub user sjcorbett opened a pull request:

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

    MongoDB and Node fixes

    Various fixes and improvements for MongoDB entities. Generally involves `BrooklynAccessUtils` and subnet addresses.
    
    Also ensures the NPM modules are on `NODE_PATH` when running Node entitites.

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

    $ git pull https://github.com/sjcorbett/incubator-brooklyn mongodb-fixes

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

    https://github.com/apache/incubator-brooklyn/pull/411.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 #411
    
----
commit cdf85b33412c24bb429bcdff8970153e337996c5
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date:   2014-12-16T21:35:41Z

    MongoDB replica set improvements
    
    * Initial size is 3 if unspecified
    * Uses BrooklynAccessUtils to configure addresses and ports

commit e0d684c74f71c932ffdc29721a70f9b03b43874f
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date:   2014-12-17T14:24:59Z

    MongoDBServer uses configuration with smallfiles and noprealloc
    
    "Leaner and meaner", as according to MongoDB/Docker documentation.

commit 3f42c6b2724e7c14b8ef73fcec4d9f4f9f8e6e4a
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date:   2014-12-18T10:35:53Z

    More improvements for MongoDB blueprints in Docker

commit f461fd8cabef33d124f842d33f1563a6530c287b
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date:   2014-12-18T10:38:11Z

    Adds URL constructor to BrooklynApi

commit 8b8a50e30444c58120f5bba899ee0f48dad44eec
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date:   2014-12-19T11:22:35Z

    Node entity ensures NPM's modules are on NODE_PATH

----


---
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: MongoDB and Node fixes

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

    https://github.com/apache/incubator-brooklyn/pull/411#discussion_r22714071
  
    --- Diff: software/webapp/src/main/java/brooklyn/entity/webapp/nodejs/NodeJsWebAppSshDriver.java ---
    @@ -152,6 +152,8 @@ public void launch() {
                 appCommandLine = appCommand + " " + appFile;
             }
     
    +        // Ensure global NPM modules are on Node's path.
    +        commands.add("export NODE_PATH=\"$NODE_PATH:$(npm root -g)\"");
    --- End diff --
    
    I think we could rework the Node entity to install packages locally. Something for the future.


---
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: MongoDB and Node fixes

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

    https://github.com/apache/incubator-brooklyn/pull/411#issuecomment-69056217
  
    That's a pain. I'll have a look. Can you check that the test passes on master for you?


---
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: MongoDB and Node fixes

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

    https://github.com/apache/incubator-brooklyn/pull/411#issuecomment-69328996
  
    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: MongoDB and Node fixes

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

    https://github.com/apache/incubator-brooklyn/pull/411#discussion_r22713515
  
    --- Diff: software/webapp/src/main/java/brooklyn/entity/webapp/nodejs/NodeJsWebAppSshDriver.java ---
    @@ -152,6 +152,8 @@ public void launch() {
                 appCommandLine = appCommand + " " + appFile;
             }
     
    +        // Ensure global NPM modules are on Node's path.
    +        commands.add("export NODE_PATH=\"$NODE_PATH:$(npm root -g)\"");
    --- End diff --
    
    Looks like it's bad practice to rely on global modules, but not much to do if it's needed by real-world apps.
    https://docs.npmjs.com/misc/faq#i-installed-something-globally-but-i-can-t-require-it


---
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: MongoDB and Node fixes

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

    https://github.com/apache/incubator-brooklyn/pull/411#issuecomment-69330304
  
    @nakomis @neykov Thanks.


---
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: MongoDB and Node fixes

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

    https://github.com/apache/incubator-brooklyn/pull/411#issuecomment-69328362
  
    False warning, the problem above is caused only  by the insufficient disk space. I can confirm that smallfiles is used.


---
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: MongoDB and Node fixes

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

    https://github.com/apache/incubator-brooklyn/pull/411#issuecomment-69042018
  
    I am getting the following error in the logs when the tests try to start mongodb:
    ```
    Please make at least 422MB available in /tmp/brooklyn-svet/apps/htTbOmQm/entities/MongoDBServer_QQirTLu2/data/journal or use --smallfiles
    ```
    
    getting it with the following command:
    ```
    mvn test -PIntegration -Dtest=MongoDbBlueprintTest#testMongoSingleServer
    ```
    
    Before starting the tests I have 600mb free on the drive, 257mb after the test fails. smallfiles = true is already set in the mongodb.conf file.
    



---
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: MongoDB and Node fixes

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

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


---
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: MongoDB and Node fixes

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

    https://github.com/apache/incubator-brooklyn/pull/411#issuecomment-69174011
  
    Changes look sensible. I ran the tests with `mvn test -Dtest=MongoDbBlueprintTest -PIntegration` and they passed. 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.
---