brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harry Metske <harry.met...@gmail.com>
Subject scaling applications with ControlledDynamicWebAppCluster over multiple locations ?
Date Fri, 04 Sep 2015 14:50:58 GMT
Hi,

I have applications that should be running on at least 4 instances (a
webapp running in tomcat).
The reason is availability, it's a fairly common setup, 2 datacenters ,
each datacenter has multiple physical racks.
I am trying to figure out if and how that could be configured with regard
to locations.

My starting point is the below pasted yaml, with the following (test setup
)locations defined in brooklyn.properties:

brooklyn.location.named.dc1rack1=byon:(hosts="10.0.0.16{0-9}")
brooklyn.location.named.dc1rack2=byon:(hosts="10.0.0.17{0-9}")
brooklyn.location.named.dc2rack1=byon:(hosts="10.0.0.18{0-9}")
brooklyn.location.named.dc2rack2=byon:(hosts="10.0.0.19{0-9}")

Firing up the app initially should start one tomcat on each of the
locations, and if load goes up, an extra tomcat should be started on each
location.

Can this be done with one yaml, or do I have to deploy 4 yaml's, one for
each location ?

thanks,
Harry

my yaml:

name: tomcat8Cluster2203
services:
- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
  name: MyTC8Cluster
  initialSize: 4
  location: dc1rack1,dc1rack2,????
  brooklyn.config:
    memberSpec:
      $brooklyn:entitySpec:
        type: org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server
    wars.named:
      - https://www.computerhok.nl/tmp/JSPWiki.war
    shell.env:
      LANG: en_US.UTF-8
      jspwiki_pageProvider: VersioningFileProvider
      jspwiki_fileSystemProvider_pageDir: jspwiki-pages
      jspwiki_basicAttachmentProvider_storageDir: jspwiki-pages
      jspwiki_workDir: jspwiki-work
      jspwiki_baseURL: http://hardtopredict:8003/JSPWiki
  brooklyn.policies:
  - policyType: org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy
    brooklyn.config:
      metric:
$brooklyn:sensor("org.apache.brooklyn.entity.webapp.DynamicWebAppCluster",
"webapp.reqs.perSec.windowed.perNode")
      metricLowerBound: 3
      metricUpperBound: 5
      minPoolSize: 4
      maxPoolSize: 16
      resizeDownIterationIncrement: 1
      resizeUpIterationIncrement: 1
      resizeUpStabilizationDelay: 50000
      resizeDownStabilizationDelay: 70000

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message