Skip to content

Instantly share code, notes, and snippets.

@djmitche
Forked from oremj/gist:289961
Created February 17, 2012 01:04
Show Gist options
  • Save djmitche/1849429 to your computer and use it in GitHub Desktop.
Save djmitche/1849429 to your computer and use it in GitHub Desktop.
def config():
name = 'fxfeeds'
port = 50000
ip = '63.245.209.124'
public_port = '443'
print """\
probe tcp %(name)s-probe
port %(port)s
interval 3
passdetect interval 3
serverfarm host %(name)s
probe %(name)s-probe
rserver zlb01-portbased %(port)s
inservice
rserver zlb02-portbased %(port)s
inservice
rserver zlb03-portbased %(port)s
inservice
rserver zlb04-portbased %(port)s
inservice
rserver zlb05-portbased %(port)s
inservice
class-map match-all %(name)s-vip
2 match virtual-address %(ip)s tcp eq %(public_port)s
policy-map type loadbalance first-match %(name)s-lb-policy
class class-default
serverfarm %(name)s
policy-map multi-match %(name)s-vip-policy
class %(name)s-vip
loadbalance vip inservice
loadbalance policy %(name)s-lb-policy
loadbalance vip icmp-reply
interface vlan 5
service-policy input %(name)s-vip-policy""" % locals()
config()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment