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

[GitHub] brooklyn-server pull request #428: Adding new LocationEntity for creating lo...

GitHub user grkvlt opened a pull request:

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

    Adding new LocationEntity for creating location specific entities

    A new type that allows configuring different entities depending on the location being deployed to. Uses configuration like this:
    
    ```YAML
     - type: org.apache.brooklyn.entity.stock.LocationEntity
       brooklyn.config:
         location.entity.spec.default:
           $brooklyn:entitySpec:
             type: traefik-load-balancer
         location.entity.spec.aws-ec2:
           $brooklyn:entitySpec:
             type: elastic-load-balancer
         location.entity.spec.gce:
           $brooklyn:entitySpec:
             type: google-load-balancer
    ```
    
    The map entries can also be class names like `JcloudsLocation` or ISO 3166 country codes like `UK`.

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

    $ git pull https://github.com/grkvlt/brooklyn-server location-entity

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

    https://github.com/apache/brooklyn-server/pull/428.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 #428
    
----
commit 9943655ea24e29d25fd219bd899d2669b6ea88b9
Author: Andrew Donald Kennedy <an...@cloudsoftcorp.com>
Date:   2016-11-11T00:45:58Z

    Adding new LocationEntity for creating location specific entities

----


---
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] brooklyn-server issue #428: Adding new LocationEntity for creating location ...

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

    https://github.com/apache/brooklyn-server/pull/428
  
    @grkvlt @aledsage @neykov love this direction - i assume this `LocationEntity` proxies the child?
    
    i was thinking a similar but more generic pattern
    
    ```
    - type: context-sensitive-proxying-parent
      switch:
        01-aws:
          condition:
            regex-match: [ $brooklyn:location(), ".*aws-ec2" ]
          spec:
            type: aws-load-balancer
        05-default:
          spec:
            type: nginx
    ```
    
    not exactly sure how we want to do:
    * the location reference in the DSL
    * expressing conditions in this entity
    * the actual condition test
    
    feels like a `subtype-of` with `jclouds:aws-ec2` and `jclouds:aws-ec2:us-west-1` recognised as types, and maybe using typed relations to find the actual location (`$brooklyn:relation("in-location")`) ..
    
    but that's in the future, something pragmatic like what we have here makes sense for now (though haven't reviewed code)


---
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] brooklyn-server pull request #428: Adding new LocationEntity for creating lo...

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

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


---
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.
---