黑白人生 +

LVS管理系统实现思路

说明

环境

image image image image image image image image image

会先进行对比,对比无误后推送到远程服务器

YAML数据片段:

virtual_server:

  192.168.6.6 80:
    delay_loop: '60'
    desc: esf
    lb_algo: wlc
    lb_kind: DR
    port: '80'
    protocol: TCP
    real_server: {}
    sorry_server: 192.168.6.55
    
  192.168.6.2 80:
    delay_loop: '60'
    desc: esf
    lb_algo: wlc
    lb_kind: DR
    port: '80'
    protocol: TCP
    real_server:
      192.168.6.2:
        connect_timeout: '7'
        protocol: TCP_CHECK
        stat: true
        weight: 1
    sorry_server: 192.168.6.148

YAML模版片段:

cat init.sls


/usr/local/keepalived/etc/keepalived.conf:
  file.managed:
    - source: salt://lvs/keepalived.conf.jinja
    - template: jinja
    - user: root
    - group: root
    - mode: 644
    

cat keepalived.conf.jinja

image image

文章列表

项目

关于我

Fork me on GitHub