eole-redis/dicos/90_redis.xml

268 lines
14 KiB
XML
Raw Permalink Normal View History

2018-05-11 13:44:11 +02:00
<?xml version="1.0" encoding="utf-8"?>
<creole>
<files>
<!-- System configuration -->
2019-04-11 11:25:40 +02:00
<file filelist='redis' name='/etc/sysctl.d/100-redis-tuning.conf' source='redis_sysctl.conf' mkdir='True' rm='True'/>
2018-05-11 13:44:11 +02:00
<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'/>
2018-05-11 15:26:21 +02:00
<file filelist='redisCl' name='/etc/redis/cluster.conf' source='redis-cluster.conf' mkdir='True' rm='True'/>
2018-05-11 13:44:11 +02:00
<service servicelist="svredis">redis-server</service>
2019-03-19 14:57:52 +01:00
<service servicelist="svredisSlave">redis2-server</service>
2018-05-11 13:44:11 +02:00
<service_access service='redis-server'>
<port service_accesslist='saRedis' protocol='tcp' port_type='SymLinkOption'>redisPort</port>
<port service_accesslist='saRedis' protocol='tcp' port_type='SymLinkOption'>redisClPort</port>
<port service_accesslist='saRedisSlave' protocol='tcp' port_type='SymLinkOption'>redisPortSlave</port>
<port service_accesslist='saRedisSlave' protocol='tcp' port_type='SymLinkOption'>redisClPortSlave</port>
<tcpwrapper>redis-server</tcpwrapper>
2018-05-11 13:44:11 +02:00
</service_access>
2018-05-14 21:55:43 +02:00
<service_restriction service='redis-server'>
2018-05-11 13:44:11 +02:00
<ip interface='auto' netmask='rdClmask' netmask_type='SymLinkOption' ip_type='SymLinkOption'>rdClIP</ip>
</service_restriction>
</files>
<variables>
<family name='Services'>
<variable name='activer_redis' type='oui/non' description="Activer le service de cache Redis ?">
<value>oui</value>
</variable>
</family>
<family name="Redis">
<variable name='redisMode' type='string' description="Mode d'utilisation de Redis">
<value>Local</value>
</variable>
<variable name='redisSlaveInstance' type='oui/non' description="Voulez-vous lancer une instance esclave Redis sur ce serveur ?">
<value>non</value>
</variable>
<!-- Instance Principale-->
<variable name='redisInstanceName' type='string' description="Nom de l'instance principale"/>
<variable name='redisPort' type='number' description="Port d'écoute du service Redis">
<value>6379</value>
</variable>
<variable name='redisClPort' type='number' description="Port d'écoute du service Cluster Redis"/>
2018-05-11 13:44:11 +02:00
<variable name='redisMaxMemory' type='number' description="Quantité de mémoire utilisable par Redis en Mo">
<value>512</value>
</variable>
<variable name='redisMemoryPolicy' type='string' description='Méthode de libération de mémoire lorsque la maximum est atteint '>
<value>noeviction</value>
</variable>
<variable name='redisTCPKeepAlive' type='number' description="Intervalle entre le dernier envoi de paquet TCP et la réponse ACK (en secondes)">
<value>60</value>
</variable>
<!-- 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"/>
2019-03-04 17:26:33 +01:00
<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>
<variable name='redisPortSlave' type='number' description="Port d'écoute du service Redis slave">
<value>8379</value>
</variable>
<variable name='redisClPortSlave' type='number' description="Port d'écoute du service Cluster Redis"/>
<variable name='redisMaxMemorySlave' type='number' description="Quantité de mémoire utilisable par Redis en Mo">
<value>512</value>
</variable>
<variable name='redisMemoryPolicySlave' type='string' description='Méthode de libération de mémoire lorsque la maximum est atteint '>
<value>noeviction</value>
</variable>
<variable name='redisTCPKeepAliveSlave' type='number' description="Intervalle entre le dernier envoi de paquet TCP et la réponse ACK (en secondes)">
<value>60</value>
</variable>
<!-- Autorisations d'accès -->
2018-05-11 13:44:11 +02:00
<variable name='rdClIP' type='ip' description="Adresse IP réseau autorisée a utiliser le service Redis" multi='True'/>
<variable name='rdClmask' type='ip' description="Masque de sous réseau"/>
<!-- Cluster configration Part -->
<variable name='redisRole' type='string' description="Role du serveur Redis">
<value>Leader</value>
</variable>
<variable name='rdClMember' type='string' description="Nom du noeud" multi='True'/>
<variable name='rdClMemberIP' type='ip' description="Adresse IP du noeud" multi='True'/>
<variable name='rdClMemberPort' type='number' description="Port d'écoute du noeud" multi='True'>
<value>6379</value>
</variable>
<variable name='rdClMemberRole' type='ip' description="Rôle du membre"/>
<variable name='rdClMemberMaster' type='string' description="Nom du neoud a répliquer sur ce membre"/>
<variable name='rdClMemberAsSlave' type='oui/non' description="Ce noeud dispose de 2 instances ?">
<value>non</value>
</variable>
<variable name='rdClMemberSlaveName' type='string' description="Nom de l'instance secondaire"/>
<variable name='rdClMemberSlaveIP' type='ip' description="IP de l'instance secondaire"/>
<variable name='rdClMemberSlavePort' type='number' description="Port de l'instance secondaire"/>
<variable name='rdClMemberSlaveRole' type='string' description="Rôle de l'instance secondaire" hidden='True'/>
<variable name='rdClMemberSlaveMaster' type='string' description="Noeud du noeud répliquer sur cette instance secondaire"/>
2018-05-11 13:44:11 +02:00
</family>
<family name='Redis tunning' mode='expert'>
2018-06-26 10:33:12 +02:00
<variable name='redisMaxClients' type='number' description="Maximum allowed clients">
2018-06-25 22:20:33 +02:00
<value>10000</value>
</variable>
<variable name='rdCliOutBuffHardLimit' type='number' description="Client output buffer hard limit (for slave)">
<value>512</value>
</variable>
<variable name='rdCliOutBuffSoftLimit' type='number' description="Client output buffer soft limit (for slave)">
<value>256</value>
</variable>
<variable name='rdSaveDisable' type='oui/non' description="Désactiver la persistence des données sur les maitres et esclaves">
<value>non</value>
</variable>
<variable name='rdAOFDisable' type='oui/non' description="Désactiver la sauvegarde AOF sur les maitres et esclaves">
<value>non</value>
</variable>
</family>
2018-05-11 13:44:11 +02:00
<separators>
<separator name='redisInstanceName'>Instance Principale</separator>
<separator name='redisSlaveInstanceName'>Instance Secondaire</separator>
2018-05-11 13:44:11 +02:00
<separator name='rdClIP'>Autorisation d'accès au service Redis</separator>
<separator name='redisRole'>Grappe Redis</separator>
2018-05-11 15:03:44 +02:00
<separator name='rdClMemberIP'>Serveurs membres de la grappe Redis</separator>
2018-05-11 13:44:11 +02:00
</separators>
</variables>
<constraints>
<condition name='disabled_if_in' source='activer_redis'>
<param>non</param>
<target type='filelist'>redis</target>
<target type='family'>Redis</target>
<target type='service_accesslist'>saRedis</target>
<target type='service_accesslist'>saRedisSlave</target>
2018-05-11 13:44:11 +02:00
<target type='servicelist'>svredis</target>
</condition>
<condition name='disabled_if_in' source='redisSlaveInstance'>
<param>non</param>
<target type='filelist'>redisSlave</target>
<target type='servicelist'>svredisSlave</target>
<target type='service_accesslist'>saRedisSlave</target>
<target type='variable'>redisSlaveInstanceName</target>
<target type='variable'>redisSlaveInstanceMaster</target>
<target type='variable'>redisPortSlave</target>
<target type='variable'>redisClPortSlave</target>
<target type='variable'>redisMemoryPolicySlave</target>
<target type='variable'>redisTCPKeepAliveSlave</target>
<target type='variable'>redisMaxMemorySlave</target>
</condition>
<condition name='disabled_if_in' source='rdClMemberAsSlave'>
<param>non</param>
<target type='variable'>rdClMemberSlaveName</target>
<target type='variable'>rdClMemberSlaveIP</target>
<target type='variable'>rdClMemberSlavePort</target>
<target type='variable'>rdClMemberSlaveRole</target>
<target type='variable'>rdClMemberSlaveMaster</target>
</condition>
2018-05-11 13:44:11 +02:00
<condition name='disabled_if_in' source='redisMode'>
<param>Local</param>
<target type='variable'>redisRole</target>
2019-03-04 17:26:33 +01:00
<target type='variable'>redisInstanceName</target>
<target type='variable'>redisSlaveInstance</target>
<target type='filelist'>redisCl</target>
<target type='variable'>redisClPort</target>
2018-05-11 13:44:11 +02:00
</condition>
2018-09-04 10:47:54 +02:00
<condition name='disabled_if_in' source='redisMode'>
<param>Local avec slave distant</param>
<target type='variable'>redisRole</target>
2019-03-04 17:26:33 +01:00
<target type='variable'>redisInstanceName</target>
<target type='variable'>redisSlaveInstanceName</target>
<target type='variable'>redisSlaveInstanceMaster</target>
<target type='variable'>redisClPortSlave</target>
<target type='variable'>redisClPort</target>
</condition>
<condition name='disabled_if_not_in' source='redisMode'>
<param>Local avec slave distant</param>
<target type='variable'>redisMasterIPSlave</target>
<target type='variable'>redisMasterPortSlave</target>
2018-09-04 10:47:54 +02:00
</condition>
2018-05-11 15:26:21 +02:00
<condition name='disabled_if_in' source='redisRole'>
<param>Node</param>
<target type='filelist'>redisCl</target>
2019-03-04 17:26:33 +01:00
<target type='variable'>redisInstanceName</target>
<target type='variable'>rdClMember</target>
<target type='variable'>rdClMemberIP</target>
<target type='variable'>rdClMemberPort</target>
<target type='variable'>rdClMemberRole</target>
<target type='variable'>rdClMemberMaster</target>
<target type='variable'>rdClMemberAsSlave</target>
<target type='variable'>rdClMemberSlaveName</target>
<target type='variable'>rdClMemberSlaveIP</target>
<target type='variable'>rdClMemberSlavePort</target>
<target type='variable'>rdClMemberSlaveRole</target>
<target type='variable'>rdClMemberSlaveMaster</target>
<target type='variable'>redisSlaveInstanceMaster</target>
2018-05-11 15:26:21 +02:00
</condition>
<condition name='disabled_if_in' source='rdClMemberRole'>
<param>master</param>
<target type='variable'>rdClMemberMaster</target>
</condition>
2018-05-11 15:03:44 +02:00
2018-05-11 13:44:11 +02:00
<group master='rdClIP'>
<slave>rdClmask</slave>
</group>
2018-05-11 15:14:11 +02:00
2018-05-11 17:03:20 +02:00
<group master='rdClMember'>
<slave>rdClMemberIP</slave>
2018-05-11 15:14:11 +02:00
<slave>rdClMemberPort</slave>
<slave>rdClMemberRole</slave>
<slave>rdClMemberMaster</slave>
<slave>rdClMemberAsSlave</slave>
<slave>rdClMemberSlaveName</slave>
<slave>rdClMemberSlaveIP</slave>
<slave>rdClMemberSlavePort</slave>
<slave>rdClMemberSlaveRole</slave>
<slave>rdClMemberSlaveMaster</slave>
2018-05-11 15:14:11 +02:00
</group>
2018-05-11 13:44:11 +02:00
<check name="valid_enum" target="redisRole">
<param>['Leader','Node']</param>
</check>
<check name="valid_enum" target="redisMode">
2018-09-04 10:47:54 +02:00
<param>['Local', 'Local avec slave distant', 'Cluster']</param>
2018-05-11 13:44:11 +02:00
</check>
2018-05-11 15:03:44 +02:00
<check name="valid_enum" target="rdClMemberRole">
<param>['master','slave']</param>
</check>
2018-05-11 13:44:11 +02:00
<check name="valid_enum" target="redisMemoryPolicy">
<param>['noeviction', 'allkeys-lru','volatile-lru','volatile-random', 'allkeys-random','volatile-ttl']</param>
</check>
<fill name='concat' target="redisSlaveInstanceName">
<param type='eole' name='valeur1'>redisInstanceName</param>
<param name='valeur2'>Second</param>
</fill>
<fill name='concat' target="rdClMemberSlaveName">
<param type='eole' name='valeur1'>rdClMember</param>
<param name='valeur2'>Second</param>
</fill>
<fill name='calc_val' target="rdClMemberSlaveIP">
<param type='eole' name='valeur'>rdClMemberIP</param>
</fill>
<auto name='calc_val' target='rdClMemberSlaveRole'>
<param>slave</param>
</auto>
<fill name='calc_val' target='redisInstanceName'>
<param type='eole' name='valeur'>nom_machine</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>
2018-05-11 13:44:11 +02:00
</constraints>
<help>
<variable name='activer_redis'>Activer le service de cache Redis</variable>
</help>
</creole>