diff --git a/Makefile b/Makefile index e6b8112..e43ec87 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ NAME = osixia/keepalived -VERSION = 0.1.0 +VERSION = 0.1.1 .PHONY: all build test tag_latest release diff --git a/README.md b/README.md index 08206ae..11b8cfe 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,6 @@ A docker image to run Keepalived. ## Quick start -This image need to be run with : --privileged --net=host +This image require the kernel module ip_vs loaded on the host and need to be run with : --privileged --net=host docker run --privileged --net=host -d osixia/keepalived diff --git a/image/env.yml b/image/env.yml index 8693efd..ac615c3 100644 --- a/image/env.yml +++ b/image/env.yml @@ -1,4 +1,4 @@ -KEEPALIVED_INTERFACE: p4p1 +KEEPALIVED_INTERFACE: eth0 KEEPALIVED_PASSWORD: d0cker # for electing MASTER, highest priority wins. @@ -7,8 +7,10 @@ KEEPALIVED_PRIORITY: 150 KEEPALIVED_UNICAST_PEERS: - 192.168.1.10 + - 192.168.1.11 KEEPALIVED_VIRTUAL_IPS: - 192.168.1.231 + - 192.168.1.232 -KEEPALIVED_NOTIFY: /osixia/keepalived/notify-example.sh +KEEPALIVED_NOTIFY: /osixia/keepalived/notify.sh diff --git a/image/service/keepalived/assets/notify-example.sh b/image/service/keepalived/assets/notify.sh similarity index 69% rename from image/service/keepalived/assets/notify-example.sh rename to image/service/keepalived/assets/notify.sh index 37e5661..348de0f 100755 --- a/image/service/keepalived/assets/notify-example.sh +++ b/image/service/keepalived/assets/notify.sh @@ -16,16 +16,16 @@ NAME=$2 STATE=$3 case $STATE in - "MASTER") echo "I'm the MASTER! Whup whup." >> keepalived.info + "MASTER") logger "I'm the MASTER! Whup whup." exit 0 ;; - "BACKUP") "Ok, i'm just a backup, great." >> keepalived.info + "BACKUP") logger "Ok, i'm just a backup, great." exit 0 ;; - "FAULT") echo "Fault, what ?" >> keepalived.info + "FAULT") logger "Fault, what ?" exit 0 ;; - *) echo "Unknown state" >> keepalived.info + *) logger "Unknown state" exit 1 ;; esac