Cluster non présent par défaut sur les slaves + desactivation des sauvegardes auto RDB et AOF

This commit is contained in:
Teddy Cornaut 2018-09-04 16:51:12 +02:00
parent e164823580
commit c26de6593e
3 changed files with 24 additions and 4 deletions

View File

@ -31,8 +31,9 @@
<variable name='redisSlaveInstance' type='oui/non' description="Voulez-vous lancer une instance esclave Redis sur ce serveur ?"> <variable name='redisSlaveInstance' type='oui/non' description="Voulez-vous lancer une instance esclave Redis sur ce serveur ?">
<value>non</value> <value>non</value>
</variable> </variable>
<!-- Instance Principale--> <!-- Instance Principale-->
<variable name='redisInstanceName' type='string' description="Nom de l'instance secondaire"/> <variable name='redisInstanceName' type='string' description="Nom de l'instance principale"/>
<variable name='redisPort' type='number' description="Port d'écoute du service Redis"> <variable name='redisPort' type='number' description="Port d'écoute du service Redis">
<value>6379</value> <value>6379</value>
</variable> </variable>
@ -102,9 +103,12 @@
<variable name='rdCliOutBuffSoftLimit' type='number' description="Client output buffer soft limit (for slave)"> <variable name='rdCliOutBuffSoftLimit' type='number' description="Client output buffer soft limit (for slave)">
<value>256</value> <value>256</value>
</variable> </variable>
<variable name='rdSaveDisable' type='oui/non' description="Désactiver la presistence des données sur les maitres"> <variable name='rdSaveDisable' type='oui/non' description="Désactiver la persistence des données sur les maitres et esclaves">
<value>non</value> <value>non</value>
</variable> </variable>
<variable name='rdAOFDisable' type='oui/non' description="Désactiver la sauvegarde AOF sur les maitres et esclaves">
<value>non</value>
</variable>
</family> </family>
<separators> <separators>
<separator name='redisInstanceName'>Instance Principale</separator> <separator name='redisInstanceName'>Instance Principale</separator>
@ -161,6 +165,7 @@
<target type='variable'>redisSlaveInstanceName</target> <target type='variable'>redisSlaveInstanceName</target>
<target type='variable'>redisSlaveInstanceMaster</target> <target type='variable'>redisSlaveInstanceMaster</target>
<target type='variable'>redisClPortSlave</target> <target type='variable'>redisClPortSlave</target>
<target type='variable'>redisClPort</target>
</condition> </condition>
<condition name='disabled_if_not_in' source='redisMode'> <condition name='disabled_if_not_in' source='redisMode'>

View File

@ -85,9 +85,9 @@ port %%redisPortSlave
%if %%redisMode == 'Local avec slave distant' %if %%redisMode == 'Local avec slave distant'
slaveof %%redisMasterIPSlave redisMasterPortSlave slaveof %%redisMasterIPSlave %%redisMasterPortSlave
%endif %end if
# TCP listen() backlog. # TCP listen() backlog.
# #
@ -205,9 +205,13 @@ databases 16
# #
# save "" # save ""
%if %%rdSaveDisable == 'oui'
save ""
%else
save 900 1 save 900 1
save 300 10 save 300 10
save 60 10000 save 60 10000
%end if
# By default Redis will stop accepting writes if RDB snapshots are enabled # By default Redis will stop accepting writes if RDB snapshots are enabled
# (at least one save point) and the latest background save failed. # (at least one save point) and the latest background save failed.
@ -378,7 +382,11 @@ maxmemory-policy %%redisMemoryPolicySlave
# #
# Please check http://redis.io/topics/persistence for more information. # Please check http://redis.io/topics/persistence for more information.
%if %%rdAOFDisable == 'oui'
appendonly no
%else
appendonly yes appendonly yes
%end if
# The name of the append only file (default: "appendonly.aof") # The name of the append only file (default: "appendonly.aof")
@ -494,6 +502,7 @@ aof-load-truncated yes
# Set it to 0 or a negative value for unlimited execution without warnings. # Set it to 0 or a negative value for unlimited execution without warnings.
lua-time-limit 5000 lua-time-limit 5000
%if %%getVar('redisMode','Local') == "Cluster"
################################ REDIS CLUSTER ############################### ################################ REDIS CLUSTER ###############################
# #
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@ -601,6 +610,7 @@ cluster-require-full-coverage yes
# In order to setup your cluster make sure to read the documentation # In order to setup your cluster make sure to read the documentation
# available at http://redis.io web site. # available at http://redis.io web site.
%end if
################################## SLOW LOG ################################### ################################## SLOW LOG ###################################

View File

@ -376,7 +376,12 @@ maxmemory-policy %%redisMemoryPolicy
# #
# Please check http://redis.io/topics/persistence for more information. # Please check http://redis.io/topics/persistence for more information.
%if %%rdAOFDisable == 'oui'
appendonly no
%else
appendonly yes appendonly yes
%end if
# The name of the append only file (default: "appendonly.aof") # The name of the append only file (default: "appendonly.aof")