« Modèle:Config/Keepalived/Global » : différence entre les versions

De wiki.infini
import>Fleon
Aucun résumé des modifications
import>Fleon
Aucun résumé des modifications
Ligne 42 : Ligne 42 :
         192.168.10.3
         192.168.10.3
         192.168.10.2
         192.168.10.2
        # test du cluster galera
        192.168.10.240
     }
     }
}
}
}}
}}
<noinclude>[[Category:Template/Config]]</noinclude>
<noinclude>[[Category:Template/Config]]</noinclude>

Version du 18 juin 2016 à 21:40


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
    }
}