change order of policies in list seemed rather random, now they're roughly grouped
ideally could be improved more to call them out by theme Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/9bf9b267 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/9bf9b267 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/9bf9b267 Branch: refs/heads/master Commit: 9bf9b26731be5a0eb0dfeffd8ee50b4fce8a0465 Parents: ae51383 Author: Alex Heneveld <[email protected]> Authored: Fri Sep 1 14:18:32 2017 +0100 Committer: Alex Heneveld <[email protected]> Committed: Mon Sep 4 15:20:47 2017 +0100 ---------------------------------------------------------------------- guide/blueprints/policies.md | 72 ++++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 28 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/9bf9b267/guide/blueprints/policies.md ---------------------------------------------------------------------- diff --git a/guide/blueprints/policies.md b/guide/blueprints/policies.md index 7b90b58..517b3b2 100644 --- a/guide/blueprints/policies.md +++ b/guide/blueprints/policies.md @@ -24,8 +24,10 @@ Off-the-Shelf Policies ---------------------- Policies are highly reusable as their inputs, thresholds and targets are customizable. +Config key details for each policy can be found in the Catalog in the Brooklyn UI. -### Management Policies + +### HA/DR and Scaling Policies #### AutoScaler Policy @@ -50,7 +52,8 @@ brooklyn.policies: {% endhighlight %} -#### ServiceRestarter + +#### ServiceRestarter Policy - org.apache.brooklyn.policy.ha.ServiceRestarter @@ -71,44 +74,31 @@ The [introduction to policies](../start/policies.html) shows a worked example of these working together. -#### StopAfterDuration Policy - -- org.apache.brooklyn.policy.action.StopAfterDurationPolicy - -The StopAfterDurationPolicy can be used to limit the lifetime of an entity. After a configure time period expires the entity will be stopped. +#### ServiceReplacer Policy -#### CreateUser Policy - -- org.apache.brooklyn.policy.jclouds.os.CreateUserPolicy - -The CreateUserPolicy Attaches to an Entity and monitors for the addition of a location to that entity, the policy then adds a new user to the VM with a randomly generated password, with the SSH connection details set on the entity as the createuser.vm.user.credentials sensor. - -#### AdvertiseWinRMLogin Policy +- org.apache.brooklyn.policy.ha.ServiceReplacer -- org.apache.brooklyn.location.winrm.WinRmMachineLocation +The ServiceReplacer attaches to a DynamicCluster and replaces a failed member in response to +`ha.entityFailed` (or other configurable sensor). +The [introduction to policies](../start/policies.html) shows a worked +example of this policy in use. -This is similar to the CreateUserPolicy. It will monitor the addition of WinRmMachineLocation to an entity and then create a sensor advertising the administrative user's credentials. -#### SshMachineFailureDetector +#### SshMachineFailureDetector Policy - org.apache.brooklyn.policy.ha.SshMachineFailureDetector The SshMachineFailureDetector is an HA policy for monitoring an SshMachine, emitting an event if the connection is lost/restored. -#### ConnectionFailureDetector + +#### ConnectionFailureDetector Policy - org.apache.brooklyn.policy.ha.ConnectionFailureDetector The ConnectionFailureDetector is an HA policy for monitoring an http connection, emitting an event if the connection is lost/restored. -#### ServiceReplacer -- org.apache.brooklyn.policy.ha.ServiceReplacer - -The ServiceReplacer attaches to a DynamicCluster and replaces a failed member in response to -`ha.entityFailed` (or other configurable sensor). -The [introduction to policies](../start/policies.html) shows a worked -example of this policy in use. +### Optimization Policies #### FollowTheSun Policy @@ -117,17 +107,43 @@ example of this policy in use. The FollowTheSunPolicy is for moving work around to follow the demand. The work can be any Movable entity. This currently available in yaml blueprints. + +#### LoadBalancing Policy + +- org.apache.brooklyn.policy.loadbalancing.LoadBalancingPolicy + +The LoadBalancingPolicy is attached to a pool of "containers", each of which can host one or more migratable "items". The policy monitors the workrates of the items and effects migrations in an attempt to ensure that the containers are all sufficiently utilized without any of them being overloaded. + + +### Lifecycle and User Management Policies + + +#### StopAfterDuration Policy + +- org.apache.brooklyn.policy.action.StopAfterDurationPolicy + +The StopAfterDurationPolicy can be used to limit the lifetime of an entity. After a configure time period expires the entity will be stopped. + + #### ConditionalSuspend Policy - org.apache.brooklyn.policy.ha.ConditionalSuspendPolicy The ConditionalSuspendPolicy will suspend and resume a target policy based on configured suspend and resume sensors. -#### LoadBalancing Policy -- org.apache.brooklyn.policy.loadbalancing.LoadBalancingPolicy +#### CreateUser Policy -The LoadBalancingPolicy is attached to a pool of "containers", each of which can host one or more migratable "items". The policy monitors the workrates of the items and effects migrations in an attempt to ensure that the containers are all sufficiently utilized without any of them being overloaded. +- org.apache.brooklyn.policy.jclouds.os.CreateUserPolicy + +The CreateUserPolicy Attaches to an Entity and monitors for the addition of a location to that entity, the policy then adds a new user to the VM with a randomly generated password, with the SSH connection details set on the entity as the createuser.vm.user.credentials sensor. + + +#### AdvertiseWinRMLogin Policy + +- org.apache.brooklyn.location.winrm.WinRmMachineLocation + +This is similar to the CreateUserPolicy. It will monitor the addition of WinRmMachineLocation to an entity and then create a sensor advertising the administrative user's credentials. Writing a Policy
