| name: Netcat Example with Restarter Policy |
| location: localhost |
| services: |
| - type: org.apache.brooklyn.entity.software.base.VanillaSoftwareProcess |
| id: netcat-server |
| name: Simple Netcat Server |
| launch.command: | |
| echo hello | nc -l 4321 & |
| echo $! > $PID_FILE |
| brooklyn.enrichers: |
| - type: org.apache.brooklyn.policy.ha.ServiceFailureDetector |
| brooklyn.config: |
| # wait 15s after service fails before propagating failure |
| serviceFailedStabilizationDelay: 15s |
| brooklyn.policies: |
| - type: org.apache.brooklyn.policy.ha.ServiceRestarter |
| brooklyn.config: |
| # repeated failures in a time window can cause the restarter to abort, |
| # propagating the failure; a time window of 0 will mean it always restarts! |
| failOnRecurringFailuresInThisDuration: 0 |