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

De wiki.infini
import>Fleon
(Page créée avec « {{Ed|Config/Keepalived/Global}} <br/> La configuration de keepalived se fait dans le fichier '''/etc/keepalived/keepalived.conf''' : {{FileBox|filename={{{host|hostname}}... »)
 
m (3 révisions importées)
 
(2 versions intermédiaires par un autre utilisateur non affichées)
Ligne 21 : Ligne 21 :


vrrp_instance infini {
vrrp_instance infini {
     state {{{role|MASTER}}}
     state '''''MASTER''''' / '''''SLAVE'''''  # à déterminer en fonction du rôle joué par la machine
     interface eth0
     interface eth0
     #smtp_alert
     #smtp_alert
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 actuelle datée du 12 février 2020 à 20:52


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