Skip to content

Commit

Permalink
Merge pull request #158 from iuliana/template-fix
Browse files Browse the repository at this point in the history
Added fix for broken templates and OS recommendation
  • Loading branch information
tbouron committed Feb 11, 2020
2 parents 4ae23b9 + e8e0440 commit 14e50a6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 27 deletions.
30 changes: 16 additions & 14 deletions dist/src/main/dist/conf/brooklyn/default.catalog.bom
Expand Up @@ -175,7 +175,8 @@ brooklyn.catalog:
name: "Template 3: Bash Web Server and Scaling Riak Cluster"
description: |
Sample YAML building on Template 2,
composing that blueprint with a Riak cluster and injecting the URL
composing that blueprint with a Riak cluster and injecting the URL.
We recommend using CentOS or Debian as they both provide the required 'riak' package.
item:
name: Bash Web Server and Riak Cluster (Brooklyn Example)

Expand Down Expand Up @@ -204,12 +205,12 @@ brooklyn.catalog:
metric: riak.node.ops.1m.perNode
# more than 100 ops per second (6k/min) scales out, less than 50 scales back
# up to a max of 8 riak nodes here (can be changed in GUI / REST API afterwards)
metricLowerBound: 3000
metricUpperBound: 6000
minPoolSize: 3
maxPoolSize: 8
resizeUpStabilizationDelay: 30s
resizeDownStabilizationDelay: 5m
autoscaler.metricUpperBound: 6000
autoscaler.metricLowerBound: 3000
autoscaler.minPoolSize: 3
autoscaler.maxPoolSize: 8
autoscaler.resizeUpStabilizationDelay: 30s
autoscaler.resizeDownStabilizationDelay: 5m

location:
jclouds:aws-ec2:
Expand All @@ -224,7 +225,8 @@ brooklyn.catalog:
description: |
Sample YAML to provision a cluster of the bash/python web server nodes,
with sensors configured, and a load balancer pointing at them,
and resilience policies for node replacement and scaling
and resilience policies for node replacement and scaling.
We recommend using CentOS or Debian as they both provide the required 'riak' package.
item:
name: Resilient Load-Balanced Bash Web Cluster (Brooklyn Example)

Expand Down Expand Up @@ -328,15 +330,15 @@ brooklyn.catalog:
metric: reqs.per_sec.per_node

# really low numbers, so you can trigger a scale-out just by hitting reload a lot
metricUpperBound: 3
metricLowerBound: 1
autoscaler.metricUpperBound: 3
autoscaler.metricLowerBound: 1

# sustain 3 reqs/sec for 2s and it will scale out
resizeUpStabilizationDelay: 2s
autoscaler.resizeUpStabilizationDelay: 2s
# only scale down when sustained for 1m
resizeDownStabilizationDelay: 1m
maxPoolSize: 10
autoscaler.resizeDownStabilizationDelay: 1m

autoscaler.maxPoolSize: 10

# and add a load-balancer pointing at the cluster
- type: load-balancer
Expand Down
28 changes: 15 additions & 13 deletions karaf/config/src/main/resources/catalog/catalog-templates.bom
Expand Up @@ -141,7 +141,8 @@ brooklyn.catalog:
name: "Template 3: Bash Web Server and Scaling Riak Cluster"
description: |
Sample YAML building on Template 2,
composing that blueprint with a Riak cluster and injecting the URL
composing that blueprint with a Riak cluster and injecting the URL.
We recommend using CentOS or Debian as they both provide the required 'riak' package.
item:
name: Bash Web Server and Riak Cluster (Brooklyn Example)

Expand Down Expand Up @@ -170,12 +171,12 @@ brooklyn.catalog:
metric: riak.node.ops.1m.perNode
# more than 100 ops per second (6k/min) scales out, less than 50 scales back
# up to a max of 8 riak nodes here (can be changed in GUI / REST API afterwards)
metricLowerBound: 3000
metricUpperBound: 6000
minPoolSize: 3
maxPoolSize: 8
resizeUpStabilizationDelay: 30s
resizeDownStabilizationDelay: 5m
autoscaler.metricUpperBound: 6000
autoscaler.metricLowerBound: 3000
autoscaler.minPoolSize: 3
autoscaler.maxPoolSize: 8
autoscaler.resizeUpStabilizationDelay: 30s
autoscaler.resizeDownStabilizationDelay: 5m

location:
jclouds:aws-ec2:
Expand All @@ -190,7 +191,8 @@ brooklyn.catalog:
description: |
Sample YAML to provision a cluster of the bash/python web server nodes,
with sensors configured, and a load balancer pointing at them,
and resilience policies for node replacement and scaling
and resilience policies for node replacement and scaling.
We recommend using CentOS or Debian as they both provide the required 'riak' package.
item:
name: Resilient Load-Balanced Bash Web Cluster (Brooklyn Example)

Expand Down Expand Up @@ -294,15 +296,15 @@ brooklyn.catalog:
metric: reqs.per_sec.per_node

# really low numbers, so you can trigger a scale-out just by hitting reload a lot
metricUpperBound: 3
metricLowerBound: 1
autoscaler.metricUpperBound: 3
autoscaler.metricLowerBound: 1

# sustain 3 reqs/sec for 2s and it will scale out
resizeUpStabilizationDelay: 2s
autoscaler.resizeUpStabilizationDelay: 2s
# only scale down when sustained for 1m
resizeDownStabilizationDelay: 1m
autoscaler.resizeDownStabilizationDelay: 1m

maxPoolSize: 10
autoscaler.maxPoolSize: 10

# and add a load-balancer pointing at the cluster
- type: load-balancer
Expand Down

0 comments on commit 14e50a6

Please sign in to comment.