22.27.61. salt.states.modjk_worker

22.27.61.1. Manage modjk workers

Send commands to a modjk load balancer via the peer system.

This module can be used with the prereq requisite to remove/add the worker from the load balancer before deploying/restarting service.

Mandatory Settings:

  • The minion needs to have permission to publish the modjk.* functions (see here for information on configuring peer publishing permissions)
  • The modjk load balancer must be configured as stated in the modjk execution module documentation
salt.states.modjk_worker.activate(name, lbn, target, profile='default', expr_form='glob')

Activate the named worker from the lbn load balancers at the targeted minions

Example:

disable-before-deploy:
  modjk_worker.activate:
    - name: {{ grains['id'] }}
    - lbn: application
    - target: 'roles:balancer'
    - expr_form: grain
salt.states.modjk_worker.disable(name, lbn, target, profile='default', expr_form='glob')

Disable the named worker from the lbn load balancers at the targeted minions. The worker will get traffic only for current sessions and won't get new ones.

Example:

disable-before-deploy:
  modjk_worker.disable:
    - name: {{ grains['id'] }}
    - lbn: application
    - target: 'roles:balancer'
    - expr_form: grain
salt.states.modjk_worker.stop(name, lbn, target, profile='default', expr_form='glob')

Stop the named worker from the lbn load balancers at the targeted minions The worker won't get any traffic from the lbn

Example:

disable-before-deploy:
  modjk_worker.stop:
    - name: {{ grains['id'] }}
    - lbn: application
    - target: 'roles:balancer'
    - expr_form: grain

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Table Of Contents

Previous topic

22.27.60. salt.states.modjk

Next topic

22.27.62. salt.states.module

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.