Modèle:Config/Keepalived/Global

De wiki.infini


La configuration de keepalived se fait dans le fichier /etc/keepalived/keepalived.conf :

File hostname ~ nano /etc/keepalived/keepalived.conf
global_defs {
    #notification_email {
    #   tech@listes.infini.fr
    #}
    #notification_email_from root@hostname.infini.mdl
    #smtp_server smtp.infini.mdl
    #smtp_connect_timeout 30
    router_id LVS
}

vrrp_sync_group VG1 {
    group {
        infini
    }
}

vrrp_instance infini {
    state MASTER / SLAVE  # à déterminer en fonction du rôle joué par la machine
    interface eth0
    #smtp_alert
    virtual_router_id 51

    authentication {
        auth_type PASS
        auth_pass 1111
    }

    virtual_ipaddress {
        192.168.10.11
        192.168.10.10
        192.168.10.9
        192.168.10.8
        192.168.10.7
        192.168.10.6
        192.168.10.5
        192.168.10.4
        192.168.10.3
        192.168.10.2

        # test du cluster galera
        192.168.10.240
    }
}