Skip to content

Instantly share code, notes, and snippets.

@grkvlt
Created February 19, 2016 12:08
Show Gist options
  • Save grkvlt/6f49d0817284623b3d67 to your computer and use it in GitHub Desktop.
Save grkvlt/6f49d0817284623b3d67 to your computer and use it in GitHub Desktop.
Riak Networked Demo for Clocker
id: riak-cluster-demo-application
name: "Riak Cluster Demo Application"
description: |
Riak cluster with load-balanced chatroom webapp
iconUrl: classpath://riak-icon.png
services:
- type: org.apache.brooklyn.entity.stock.BasicApplication
brooklyn.children:
- type: brooklyn.networking.VirtualNetwork
networkId: webapp
- type: brooklyn.networking.VirtualNetwork
networkId: riak
- type: org.apache.brooklyn.entity.nosql.riak.RiakCluster
initialSize: 3
id: riak-cluster
name: "Riak Cluster"
brooklyn.config:
install.version: 2.1.1
riak.networking.optimize: false
network.list:
- riak
- type: org.apache.brooklyn.entity.webapp.ControlledDynamicWebAppCluster
name: "Web Cluster"
id: web-cluster
brooklyn.config:
initialSize: 2
dynamiccluster.memberspec:
$brooklyn:entitySpec:
type: org.apache.brooklyn.entity.webapp.tomcat.Tomcat8Server
brooklyn.config:
network.list:
- webapp
- riak
wars.root:
"https://s3-eu-west-1.amazonaws.com/brooklyn-clocker/brooklyn-example-hello-world-sql-webapp.war"
java.sysprops:
brooklyn.example.riak.nodes:
$brooklyn:component("riak-cluster").attributeWhenReady("riak.cluster.nodeList")
controlleddynamicwebappcluster.controllerSpec:
$brooklyn:entitySpec:
type: brooklyn.entity.proxy.haproxy.HAProxyController
brooklyn.config:
docker.image.name: haproxy
docker.image.tag: 1.5.9
install.dir: /usr/local/sbin/
run.dir: /usr/local/etc/haproxy/
network.list:
- webapp
member.sensor.hostname: "host.subnet.hostname"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment