Guest User

Untitled

a guest
Oct 10th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. {
  2. "name":"web-and-db",
  3. "entities":[{
  4. "type":"brooklyn.entity.webapp.ElasticJavaWebAppService",
  5. "config":{
  6. "java.options":{
  7. "type":"Map",
  8. "operation":"put",
  9. "values":{
  10. "brooklyn.example.db.url":{
  11. "type":"DependentConfiguration",
  12. "source":"mysql",
  13. "sensor":"MySqlNode.MYSQL_URL",
  14. "acceptRegex":".+",
  15. "postprocessSed":"s/^(.+)$/jdbc:$1visitors?user=brooklyn&password=br00k11n/"
  16. }
  17. }
  18. }
  19. },
  20. "policy":{
  21. "type":"brooklyn.policy.ResizerPolicy",
  22. "config":{
  23. "sensor":"cluster.reqs.persec.average",
  24. "sizeLowerBound":1,
  25. "sizeUpperBound":5,
  26. "metricLowerBound":10,
  27. "metricUpperBound":100
  28. }
  29. },
  30. "comment":{
  31. "TODO: allow comment blocks (string or list of strings; ignored)",
  32. "TODO: allow an EntityFactory to be used as type as well as Entity",
  33. "TODO (?): for config of type Map allow operation on map (put or set)",
  34. "TODO (?): for config value of type DependentConfiguration allow some magic (",
  35. "note: the convention is that if there is a 'type' key in a map, we do special things",
  36. "note: if a value is simple e.g. a string or number we do the obvious thing",
  37. "TODO (?): for DependentConfiguration also allow accept and postprocess regexes (sed?)",
  38. "TODO (?): accept any recognised config 'flag' directly in the outer block (to simplify things)"
  39. }
  40. },
  41. {
  42. "name":"mysql",
  43. "type":"brooklyn.entity.database.mysql.MySqlNode",
  44. "creationScriptUrl":"classpath://visitors-creation-script.sql"
  45. }],
  46. "locations":[
  47. "/v1/locations/0"
  48. ]
  49. }
Add Comment
Please, Sign In to add comment