GitHub user tbouron opened a pull request:

    https://github.com/apache/brooklyn-ui/pull/92

    Expand relationship support to memberspecs

    As the title say, this expand the relationship support to memberspecs, i.e. 
if a memberspec has a DSL pointing to any other entity, it will now display an 
arrow to it.
    
    Here is how it looks like:
    <img width="1680" alt="screen shot 2018-10-24 at 19 52 48" 
src="https://user-images.githubusercontent.com/2082759/47454276-baaa0080-d7c6-11e8-985e-8ec6feaf3da9.png";>
    
    And this done with the classic 3 tier webapp blueprint:
    ```yaml
    name: My Web Cluster
    services:
      - type: org.apache.brooklyn.entity.database.mysql.MySqlNode
        id: db
        name: My DB (MySQL)
        brooklyn.config:
          datastore.creation.script.url: >-
            
https://raw.githubusercontent.com/apache/brooklyn-library/master/examples/simple-web-cluster/src/main/resources/visitors-creation-script.sql
      - type: org.apache.brooklyn.entity.group.DynamicCluster
        name: My Cluster
        id: cluster
        brooklyn.config:
          initialSize: 2
          dynamiccluster.memberspec:
            '$brooklyn:entitySpec':
              type: org.apache.brooklyn.entity.webapp.tomcat.TomcatServer
              name: Tomcat Server
              brooklyn.config:
                wars.root: >-
                  
http://search.maven.org/remotecontent?filepath=org/apache/brooklyn/example/brooklyn-example-hello-world-sql-webapp/0.9.0/brooklyn-example-hello-world-sql-webapp-0.9.0.war
                java.sysprops:
                  brooklyn.example.db.url: >-
                    $brooklyn:formatString("jdbc:%s%s?user=%s&password=%s",
                    
$brooklyn:component("db").attributeWhenReady("datastore.url"), "visitors", 
"brooklyn", "br00k11n")
        brooklyn.enrichers:
          - type: org.apache.brooklyn.enricher.stock.Aggregator
            brooklyn.config:
              enricher.sourceSensor: 
'$brooklyn:sensor("webapp.reqs.perSec.windowed")'
              enricher.targetSensor: 
'$brooklyn:sensor("webapp.reqs.perSec.perNode")'
              enricher.aggregating.fromMembers: true
              transformation: average
      - type: org.apache.brooklyn.entity.proxy.nginx.NginxController
        id: nginx
        name: My Load Balancer (nginx)
        brooklyn.config:
          loadbalancer.serverpool: '$brooklyn:entity("cluster")'
          nginx.sticky: false
    brooklyn.enrichers:
      - type: org.apache.brooklyn.enricher.stock.Propagator
        brooklyn.config:
          producer: '$brooklyn:entity("nginx")'
          propagating:
            - main.uri
            - main.uri.mapped.subnet
            - main.uri.mapped.public
    
    ```
    
    Poke @ahgittin 

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

    $ git pull https://github.com/tbouron/brooklyn-ui 
feature/memberspec-relationships

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

    https://github.com/apache/brooklyn-ui/pull/92.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 #92
    
----
commit 2f61b7655706a1d96359e85b4e022cba78bb112d
Author: Thomas Bouron <thomas.bouron@...>
Date:   2018-10-24T18:52:00Z

    Expand relationship support to memberspecs

----


---

Reply via email to