GitHub user sjcorbett opened a pull request:

    https://github.com/apache/brooklyn-server/pull/529

    LocationNetworkInfoCustomizer

    `LocationNetworkInfoCustomizer` is a special customiser used by 
`JcloudsLocation` to determine the address and credentials with which a 
location should be contacted. By default it should behave as the previous logic 
in `JcloudsLocation`, but it exposes options to have Brooklyn prefer to contact 
VMs on private addresses and can be injected on a per-entity basis. For example:
    
    ```yaml
    services:
    - type: server
      location: the-same-private-network-as-brooklyn
      brooklyn.initializers:
      - type: 
org.apache.brooklyn.location.jclouds.BasicLocationNetworkInfoCustomizer
        brooklyn.config:
          mode: ONLY_PRIVATE
    - type: server
      location: another-cloud
      # implicit use of the default network info customizer.
    ```
    
    Would result in the first entity being managed on the instance's private 
address (and deployment failing if this was not possible) and the second being 
managed on its public address. Graceful fallback is possible by replacing 
`ONLY_PRIVATE` with `PREFER_PRIVATE`. There are `PUBLIC` variants of each of 
these.
    
    These changes were prompted by a thread on the Brooklyn mailing list last 
December: http://markmail.org/thread/xpr6nsyimv7goewy. Some of the items 
discussed in that thread have been left for future work. It depends on PRs #497 
and #524.
    
    I'd like opinions on:
    * naming: "BasicLocationNetworkInfoCustomizer" is cumbersome.
    * whether the class should extend `BasicJcloudsLocationCustomizer`. I can 
see it being useful to anyone that wants to subclass BLNIC but at the moment 
it's totally unused.
    * whether we should include the `publishNetworks` option right now. It 
controls the publication of `host.address.{public,private}.n` sensors. The idea 
is good but the feature feels a bit half-baked right now.
    


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

    $ git pull https://github.com/sjcorbett/brooklyn-server 
feature/location-network-info

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

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

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to