[GitHub] brooklyn-library pull request #123: Convert AnsibleEntity and SaltEntity to ...

2017-08-30 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/brooklyn-library/pull/123


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] brooklyn-library pull request #123: Convert AnsibleEntity and SaltEntity to ...

2017-08-29 Thread tbouron
GitHub user tbouron opened a pull request:

https://github.com/apache/brooklyn-library/pull/123

Convert AnsibleEntity and SaltEntity to be real SoftwareProcess

# Background

Salt and Ansible are currently installed by Brooklyn and:
- are used in masterless mode
- use SSH to check their health
- but more importantly, are used to install and manage software. For 
instance, using Salt, one can install and start/stop Apache or Nginx (or any 
other software). The same applies to Ansible.
They are effectively software processes as they manage software lifecycle 
but are not considered as such based on their current implementation.

# Issue

The current implementation uses `EffectorStartableImpl` instead of 
`SoftwareProcessImpl`. This has some side effects which might be surprising for 
users, such as:
- the inboundPort (`provisioning.properties`) are not applied when the SG 
is created (on supported clouds)
- the auto-opening port on SG by creating config keys finishing by `.port` 
does not works
- the `shell.env` are also not applied 
([BROOKLYN-503](https://issues.apache.org/jira/browse/BROOKLYN-503))
- if the location is using a machine name customiser, this will throw a NPE 
as the `CALLER_CONTEXT` is not set

_This list is not exhaustive, I just wanted to illustrate the most common 
issues a user will bump into by using those entities._

# Solution

Make those 2 entities real `SoftwareProcess`es, this PR is doing just that. 
I simply moved around the existing code to make it match the phases of 
`SoftwareProcess`.

This has been tested with YAML test available [here for 
Ansible](https://github.com/brooklyncentral/brooklyn-ansibleentity/blob/master/tests/ansible.tests.bom)
 and [here for 
Salt](https://github.com/brooklyncentral/brooklyn-saltentity/blob/master/tests/salt.tests.bom)

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

$ git pull https://github.com/tbouron/brooklyn-library 
update/ansible-salt-conversion

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

https://github.com/apache/brooklyn-library/pull/123.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 #123


commit 38a9f780299678d706a690fcca8a2de28a4d0ed7
Author: Thomas Bouron 
Date:   2017-08-29T15:05:58Z

Convert AnsibleEntity to a SoftwareProcess entity

commit ac837bcaba844ffe203edb957630896a48094d54
Author: Thomas Bouron 
Date:   2017-08-29T16:07:30Z

Convert SaltEntity to a SoftwareProcess entity




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---