saltstack/salt — pull request #6664 by ranl (2013-08-13 07:40:29+00:00)
Title: adding modjk modules

__modjk module__
A wrapper module to the modjk http api

__modjk_worker state__
A state module that allows a minion to remove/add it-self from/a modjk load balancer
with the help of the peer system and the modjk module above at the load balancer side

I find these modules very useful with using prereq states which makes continues deployment very easy...
The only problem I've encountered is how to determine if I want to load these modules so for now they are loaded by-default

for example:
```
tomcat:
service.running:
- enable: True

wait-4-tomcat:
tomcat.wait:
- timeout: 600
- require:
- service: tomcat

remove-from-jk:
modjk_worker.stop:
- name: {{ grains['id'] }}
- lb: load balancer name
- target: 'roles:loadbalancer'
- expr_form: grain
- prereq:
- tomcat: /webapp

/webapp:
tomcat.war_deployed:
- war: salt://wars/webapp-1.0.war
- require:
- tomcat: wait-4-tomcat

add-to-jk:
modjk_worker.activate:
- name: {{ grains['id'] }}
- lb: load balancer name
- target: 'roles:loadbalancer'
- expr_form: grain
- require:
- tomcat: /webapp
```