Compare commits
7 Commits
pkg/dev/eo
...
develop
Author | SHA1 | Date |
---|---|---|
Teddy Cornaut | 92b8541fa2 | |
Teddy Cornaut | 9bfa3a41f5 | |
Teddy Cornaut | 1ca2797bb3 | |
Emmanuel Garette | f899c6516c | |
Emmanuel Garette | f7ce4d51d6 | |
Teddy Cornaut | ae562d6a60 | |
Teddy Cornaut | c568646a7d |
|
@ -2,6 +2,7 @@
|
|||
<creole>
|
||||
<files>
|
||||
<!-- System configuration -->
|
||||
<file filelist='redis' name='/etc/sysctl.d/100-redis-tuning.conf' source='redis_sysctl.conf' mkdir='True' rm='True'/>
|
||||
<file filelist='redis' name='/etc/redis/redis.conf' mkdir='True' rm='True'/>
|
||||
<file filelist='redisSlave' name='/etc/redis/redis-slave.conf' mkdir='True' rm='True'/>
|
||||
<file filelist='redisCl' name='/etc/redis/cluster.conf' source='redis-cluster.conf' mkdir='True' rm='True'/>
|
||||
|
@ -50,9 +51,7 @@
|
|||
<!-- Instance Secondaire -->
|
||||
<variable name='redisSlaveInstanceName' type='string' description="Nom de l'instance secondaire"/>
|
||||
<variable name='redisSlaveInstanceMaster' type='string' description="Nom du noeud a répliquer sur l'instance secondaire"/>
|
||||
<variable name='redisMasterIPSlave' type='ip' description="IP du service Redis master">
|
||||
<value>127.0.0.1</value>
|
||||
</variable>
|
||||
<variable name='redisMasterIPSlave' type='domain' description="Nom de domaine du service Redis master" mandatory="True"/>
|
||||
<variable name='redisMasterPortSlave' type='number' description="Port d'écoute du service Redis master">
|
||||
<value>6379</value>
|
||||
</variable>
|
||||
|
@ -154,6 +153,7 @@
|
|||
<condition name='disabled_if_in' source='redisMode'>
|
||||
<param>Local</param>
|
||||
<target type='variable'>redisRole</target>
|
||||
<target type='variable'>redisInstanceName</target>
|
||||
<target type='variable'>redisSlaveInstance</target>
|
||||
<target type='filelist'>redisCl</target>
|
||||
<target type='variable'>redisClPort</target>
|
||||
|
@ -162,6 +162,7 @@
|
|||
<condition name='disabled_if_in' source='redisMode'>
|
||||
<param>Local avec slave distant</param>
|
||||
<target type='variable'>redisRole</target>
|
||||
<target type='variable'>redisInstanceName</target>
|
||||
<target type='variable'>redisSlaveInstanceName</target>
|
||||
<target type='variable'>redisSlaveInstanceMaster</target>
|
||||
<target type='variable'>redisClPortSlave</target>
|
||||
|
@ -177,6 +178,7 @@
|
|||
<condition name='disabled_if_in' source='redisRole'>
|
||||
<param>Node</param>
|
||||
<target type='filelist'>redisCl</target>
|
||||
<target type='variable'>redisInstanceName</target>
|
||||
<target type='variable'>rdClMember</target>
|
||||
<target type='variable'>rdClMemberIP</target>
|
||||
<target type='variable'>rdClMemberPort</target>
|
||||
|
@ -242,35 +244,18 @@
|
|||
<param>slave</param>
|
||||
</auto>
|
||||
|
||||
<fill name='intAdd' target='rdClMemberSlavePort'>
|
||||
<param type='eole' name='num1'>rdClMemberPort</param>
|
||||
<param name='num2'>2000</param>
|
||||
</fill>
|
||||
|
||||
<fill name='calc_val' target='redisInstanceName'>
|
||||
<param type='eole' name='valeur'>nom_machine</param>
|
||||
</fill>
|
||||
|
||||
<fill name='intAdd' target='redisClPort'>
|
||||
<param type='eole' name='num1'>redisPort</param>
|
||||
<param name='num2'>10000</param>
|
||||
</fill>
|
||||
|
||||
<fill name='intAdd' target='redisPortSlave'>
|
||||
<param type='eole' name='num1'>redisPort</param>
|
||||
<param name='num2'>2000</param>
|
||||
</fill>
|
||||
|
||||
<fill name='intAdd' target='redisClPortSlave'>
|
||||
<param type='eole' name='num1'>redisPortSlave</param>
|
||||
<param name='num2'>10000</param>
|
||||
</fill>
|
||||
<fill name='calc_val' target='redisMaxMemorySlave'>
|
||||
<param type='eole' name='valeur'>redisMaxMemory</param>
|
||||
</fill>
|
||||
|
||||
<fill name='calc_val' target='redisMemoryPolicySlave'>
|
||||
<param type='eole' name='valeur'>redisMemoryPolicy</param>
|
||||
</fill>
|
||||
|
||||
<fill name='calc_val' target='redisTCPKeepAliveSlave'>
|
||||
<param type='eole' name='valeur'>redisTCPKeepAlive</param>
|
||||
</fill>
|
||||
|
|
|
@ -14,12 +14,6 @@ Group=redis
|
|||
RuntimeDirectory=redis
|
||||
RuntimeDirectoryMode=2755
|
||||
|
||||
ExecStartPre=-/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d
|
||||
ExecStartPost=-/bin/run-parts --verbose /etc/redis/redis-server.post-up.d
|
||||
ExecStop=-/bin/run-parts --verbose /etc/redis/redis-server.pre-down.d
|
||||
ExecStop=/bin/kill -s TERM $MAINPID
|
||||
ExecStopPost=-/bin/run-parts --verbose /etc/redis/redis-server.post-down.d
|
||||
|
||||
UMask=007
|
||||
PrivateTmp=yes
|
||||
LimitNOFILE=65535
|
||||
|
@ -29,7 +23,16 @@ ReadOnlyDirectories=/
|
|||
ReadWriteDirectories=-/var/lib/redis
|
||||
ReadWriteDirectories=-/var/log/redis
|
||||
ReadWriteDirectories=-/var/run/redis
|
||||
CapabilityBoundingSet=~CAP_SYS_PTRACE
|
||||
|
||||
NoNewPrivileges=true
|
||||
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
|
||||
MemoryDenyWriteExecute=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectControlGroups=true
|
||||
RestrictRealtime=true
|
||||
RestrictNamespaces=true
|
||||
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||
|
||||
# redis-server can write to its own config file when in cluster mode so we
|
||||
# permit writing there by default. If you are not using this feature, it is
|
||||
|
|
|
@ -326,7 +326,7 @@ maxclients %%redisMaxClients
|
|||
# limit for maxmemory so that there is some free RAM on the system for slave
|
||||
# output buffers (but this is not needed if the policy is 'noeviction').
|
||||
#
|
||||
maxmemory %{redisMaxMemory}mb
|
||||
maxmemory %%{redisMaxMemory}mb
|
||||
|
||||
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
|
||||
# is reached. You can select among five behaviors:
|
||||
|
|
|
@ -320,7 +320,7 @@ maxclients %%redisMaxClients
|
|||
# limit for maxmemory so that there is some free RAM on the system for slave
|
||||
# output buffers (but this is not needed if the policy is 'noeviction').
|
||||
#
|
||||
maxmemory %{redisMaxMemory}mb
|
||||
maxmemory %%{redisMaxMemory}mb
|
||||
|
||||
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
|
||||
# is reached. You can select among five behaviors:
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
net.core.somaxconn = 512
|
Loading…
Reference in New Issue