高可用:两台业务系统启动着相同的服务,如果有一台故障,另一台自动接管,我们将将这个称之为高可用;


# 安装keepalived

https://abc.htmltoo.com/thread-45909.htm



https://hub.docker.com/r/instantlinux/haproxy-keepalived


https://hub.docker.com/r/thibaultmorin/keepalived

https://github.com/tmorin/docker-image-keepalived


https://hub.docker.com/r/icoreru/keepalived

https://github.com/i-core/keepalived-dockerfile

Dockerfile:

FROM alpine:3.10
RUN apk -U add --no-cache keepalived tini
COPY ./keepalived.tmpl /etc/keepalived/
COPY run.sh /usr/local/bin/
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["run.sh"]

KEEPALIVED_ROUTER_ID - A unique number from 0 to 255 that should identify the VRRP group. Required.

KEEPALIVED_UNICAST_PEERS - An IP of a peer participating in the VRRP group. Required.

KEEPALIVED_VIRTUAL_IPS - VRRP virtual ip address. Required.

KEEPALIVED_STATE - Defines the server role as 'MASTER' or 'BACKUP'. Default: BACKUP

KEEPALIVED_PRIORITY - Election value, the server configured with the highest priority will become the Master. Default: random 1-200

KEEPALIVED_INTERFACE - The host interface that keepalived will monitor and use for VRRP traffic. Default: ens192

KEEPALIVED_PASSWORD - A shared password used to authenticate each node in a VRRP group.


签名:这个人很懒,什么也没有留下!
最新回复 (0)
返回