You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by aledsage <gi...@git.apache.org> on 2015/11/24 15:19:38 UTC
[GitHub] incubator-brooklyn pull request: Feature: entity monitoring disabl...
GitHub user aledsage opened a pull request:
https://github.com/apache/incubator-brooklyn/pull/1062
Feature: entity monitoring disablable
Important if the entity is running in a locked-down location, e.g. such that only ssh access to the VM is available. This adds configuration to disable the use of jmx, http, thrift (for Cassandra), mongodb client, etc.
There is also a PR to fix java install, failing for the reason described at http://serverfault.com/questions/637549/epel-repo-for-centos-6-causing-error?newreg=7c6019c0d0ae483c8bb3af387166ce49 - i.e. adding `yum upgrade -y ca-certificates --disablerepo=epel`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aledsage/incubator-brooklyn feature/entity-monitoring-disablable
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-brooklyn/pull/1062.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 #1062
----
commit d6311c224ae2bc1ab3344cee349babc0dbf07031
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-24T13:23:32Z
Fix install-java on CentOS
- Encountered with tomcat’s ec2 live test.
Failed to install java7 because of problem described at
http://serverfault.com/questions/637549/epel-repo-for-centos-6-causing-error?newreg=7c6019c0d0ae483c8bb3af387166ce49
Applied the fix described there.
commit ec76f129e7a977b5c326e38eabe6a2b1cfde7d73
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-18T15:35:49Z
MongoDB: support disabling direct connection
- Important if MongoDB is locked down such that only ssh access to
the VM is available.
commit b70a556540b794563895bfcb23080318def301ca
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-18T15:36:24Z
JBoss6: support disabling direct connection
- If !isJmxEnabled then don’t do imx polling
commit b1a57d13792ce3f068aba3c98e91363cab1da167
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-18T15:36:45Z
JBoss7: support disabling direct connection
- Important if instance is locked down such that only ssh access to
the VM is available.
commit d01dc7c843b34da76ea54cbe921c376728f6c5d6
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-24T13:24:56Z
Riak: support disabling direct connection
commit c3d759156f6ae80f205bf146df4f0a8eb0044441
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-24T13:25:12Z
Redis: support disabling direct connection
commit d32693af4b8dd233097449259f4cd552fef584bb
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-24T13:24:10Z
Tomcat: support disabling direct connection
commit 0904ed972813e659d96b706b31333818f4bfae3e
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-24T13:25:58Z
Cassandra: support disabling direct connection
commit bdf46a265d4e24bb5f76362a61d0e02cba9ce1c2
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-24T13:26:09Z
RabbitMQ: support disabling direct connection
commit e0afa328393f326ebe50eb3492a86622e9a96836
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-24T13:26:15Z
Postgres: support disabling direct connection
commit 571de2db081ed79ba97f74b220271f12c5607d10
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-24T13:26:22Z
MySQL: support disabling direct connection
commit 1cb1d44e5e45518b0e5425150901f9ba2533afc6
Author: Aled Sage <al...@gmail.com>
Date: 2015-11-24T13:26:29Z
MariaDB: support disabling direct connection
----
---
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: Feature: entity monitoring disabl...
Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/1062#issuecomment-159314818
Surprised that this has to be added to entities one by one. I suppose it's out of the scope of this pull request but I'd prefer to use a system in which an entity offers certain feeds for certain functions and indicates their requirements (e.g. detailed Tomcat stats require JMX, detailed JBoss HTTP). The superentity should piece together the constraints of the target environment with the feeds available.
---
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: Feature: entity monitoring disabl...
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/1062#discussion_r45756261
--- Diff: software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/mongodb/AbstractMongoDBSshDriver.java ---
@@ -115,7 +116,12 @@ public void customize() {
@Override
public boolean isRunning() {
try {
- return MongoDBClientSupport.forServer((AbstractMongoDBServer) entity).ping();
+ if (entity instanceof MongoDBServerImpl && !((MongoDBServerImpl)entity).clientAccessEnabled()) {
--- End diff --
Is there a good reason to single out `MongoDBServerImpl` over the lack of support for replica sets or shards if client access is disabled? I'd prefer that it didn't. There's no reason it can't support the clients, routers and config servers too. I believe that technically the replica set and sharded entities could be written to handle such restrictive environments (by SSHing to machines and executing scripts rather than connecting with `MongoDBClientSupport`).
---
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: Feature: entity monitoring disabl...
Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/1062#issuecomment-159562383
MongoDBReplicaSet could also use the `clientAccessEnabled` config key and check in its own init method. Or use an `alwaysTrue` constraint on the redefined key. Anyway, I'm fine with this being merged.
---
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: Feature: entity monitoring disabl...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-brooklyn/pull/1062
---
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: Feature: entity monitoring disabl...
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/1062#issuecomment-159551759
Thanks @sjcorbett @ahgittin
Agree with the mid-term aims. It's tricky just now to safely just turn off jmx/http entirely in a super-class, as it depends on the entity for whether that contributes towards service-up or if it's just for usage/performance metrics.
For singling out `MongoDBServer` (versus `MongoDBRouter` and `MongoDBConfigServer`), that is a simple one to get working when there is only ssh access. If there is no replica set, then it's easy. For the methods I guarded (`initializeReplicaSet`, `addMemberToReplicaSet` and `removeMemberFromReplicaSet`) they are called by `MongoDBReplicaSetImpl`. It's hard to tell in `MongoDBServerImpl.init` if it's going to be in a replica set or stand-alone. We could try to look at the parent entity, but that seems inelegant. If you're ok with it, then I suggest leaving as-is.
---
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: Feature: entity monitoring disabl...
Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/1062#issuecomment-159538781
Makes sense as a short-term solution in java-land. @sjcorbett 's comments re Mongo will need attention but this could perhaps be deferred until we are using Mongo in such a behind-subnet environment.
In the mid-term completely agree with @sjcorbett that we want to:
(1) have the blueprints written in yaml
(2) including specifying the sensors declaratively in yaml (eg html, jmx endpoints, ssh commands, etc)
(3) define at a high-level what mechanisms are preferred+supported for sensor collection (eg brooklyn poll, or install a monitoring daemon, etc)
With this model we should be able to configure the *mechanisms* (3) e.g. to use jumphost for polling defined independent of the sources (2).
---
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: Feature: entity monitoring disabl...
Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/1062#issuecomment-159562503
Whoops - not an `alwaysTrue` constraint, an `input value must be true` constraint.
---
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: Feature: entity monitoring disabl...
Posted by ygy <gi...@git.apache.org>.
Github user ygy commented on the pull request:
https://github.com/apache/incubator-brooklyn/pull/1062#issuecomment-159310481
@aledsage
Looks very good. Tests are passing as well.
---
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.
---