Skip to content

Instantly share code, notes, and snippets.

@oremj
Created January 29, 2010 18:26
Show Gist options
  • Save oremj/289961 to your computer and use it in GitHub Desktop.
Save oremj/289961 to your computer and use it in GitHub Desktop.
name = 'fxfeeds'
port = 50000
ip = '63.245.209.124'
public_port = '443'
config = """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""" % {'name': name, 'port': port, 'ip': ip, 'public_port': public_port}
print config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment