eole-redis/tmpl/redis-cluster.conf
Philippe Caseiro 2031ec7d64 Adding support for a second instance !
Redis cluster needs 6 hosts for work ... it's a lot.
To trick him each node can be Master and slave for another node.

;)
2018-05-15 12:17:25 +02:00

17 lines
863 B
Plaintext

%if %%getVar('activer_redis','non') == 'oui' and %%getVar('redisRole','Node') == 'Leader'
%%redisInstanceName:%%adresse_ip_eth0:%%{redisPort}:master::Leader:
%if %%getVar('redisSlaveInstance','non') == 'oui'
%%redisSlaveInstanceName:%%adresse_ip_eth0:%%{redisPortSlave}:slave:%%{redisSlaveInstanceMaster}:Node:
%end if
%for %%node in %%getVar('rdClMember',[])
%if %%node.rdClMemberRole == 'master'
%%{node}:%%{node.rdClMemberIP}:%%{node.rdClMemberPort}:%%{node.rdClMemberRole}::Node:
%else
%%{node}:%%{node.rdClMemberIP}:%%{node.rdClMemberPort}:%%{node.rdClMemberRole}:%%{node.rdClMemberMaster}:Node:
%end if
%if %%node.rdClMemberAsSlave == 'oui'
%%{node.rdClMemberSlaveName}:%%{node.rdClMemberSlaveIP}:%%{node.rdClMemberSlavePort}:%%{node.rdClMemberSlaveRole}:%%{node.rdClMemberSlaveMaster}:Node:
%end if
%end for
%end if