Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "name":"web-and-db",
- "entities":[{
- "type":"brooklyn.entity.webapp.ElasticJavaWebAppService",
- "config":{
- "java.options":{
- "type":"Map",
- "operation":"put",
- "values":{
- "brooklyn.example.db.url":{
- "type":"DependentConfiguration",
- "source":"mysql",
- "sensor":"MySqlNode.MYSQL_URL",
- "acceptRegex":".+",
- "postprocessSed":"s/^(.+)$/jdbc:$1visitors?user=brooklyn&password=br00k11n/"
- }
- }
- }
- },
- "policy":{
- "type":"brooklyn.policy.ResizerPolicy",
- "config":{
- "sensor":"cluster.reqs.persec.average",
- "sizeLowerBound":1,
- "sizeUpperBound":5,
- "metricLowerBound":10,
- "metricUpperBound":100
- }
- },
- "comment":{
- "TODO: allow comment blocks (string or list of strings; ignored)",
- "TODO: allow an EntityFactory to be used as type as well as Entity",
- "TODO (?): for config of type Map allow operation on map (put or set)",
- "TODO (?): for config value of type DependentConfiguration allow some magic (",
- "note: the convention is that if there is a 'type' key in a map, we do special things",
- "note: if a value is simple e.g. a string or number we do the obvious thing",
- "TODO (?): for DependentConfiguration also allow accept and postprocess regexes (sed?)",
- "TODO (?): accept any recognised config 'flag' directly in the outer block (to simplify things)"
- }
- },
- {
- "name":"mysql",
- "type":"brooklyn.entity.database.mysql.MySqlNode",
- "creationScriptUrl":"classpath://visitors-creation-script.sql"
- }],
- "locations":[
- "/v1/locations/0"
- ]
- }
Add Comment
Please, Sign In to add comment