Skip to content

Instantly share code, notes, and snippets.

@josh-at-knoesis
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josh-at-knoesis/98618a16418101225726 to your computer and use it in GitHub Desktop.
Save josh-at-knoesis/98618a16418101225726 to your computer and use it in GitHub Desktop.
Seldon Install: keepalived for core-nN

Seldon Install: keepalived for core-nN

TODO

Based on

Install

yum install keepalived -y

Configure

Enable non-local IPv4 binds on all core nodes

echo "net.ipv4.ip_nonlocal_bind = 1" >> /etc/sysctl.conf
sysctl -p

/etc/keepalived/keepalived.conf

core-n1

vrrp_instance brstorage {

  interface brstorage

  virtual_router_id 30
  virtual_ipaddress {
    10.30.3.9/16
  }

  state MASTER
  priority 100  # core-n1 = 100 (master)

}

core-n2

vrrp_instance brstorage {

  interface brstorage

  virtual_router_id 30
  virtual_ipaddress {
    10.30.3.9/16
  }

  state BACKUP
  priority 99  # core-n2 = 99 (backup-n1)

}

core-n3

vrrp_instance brstorage {

  interface brstorage

  virtual_router_id 30
  virtual_ipaddress {
    10.30.3.9/16
  }

  state BACKUP
  priority 98  # core-n3 = 98 (backup-n2)

}

core-n4

vrrp_instance brstorage {

  interface brstorage

  virtual_router_id 30
  virtual_ipaddress {
    10.30.3.9/16
  }

  state BACKUP
  priority 97  # core-n4 = 97 (backup-n3)

}

core-n5

vrrp_instance brstorage {

  interface brstorage

  virtual_router_id 30
  virtual_ipaddress {
    10.30.3.9/16
  }

  state BACKUP
  priority 96  # core-n5 = 96 (backup-n4)

}

core-n6

vrrp_instance brstorage {

  interface brstorage

  virtual_router_id 30
  virtual_ipaddress {
    10.30.3.9/16
  }

  state BACKUP
  priority 95  # core-n6 = 95 (backup-n5)

}

Enable

systemctl enable  keepalived.service
systemctl restart keepalived.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment