Paredicma Manual

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 25

DownloadParedicma Manual
Open PDF In BrowserView PDF
PAREDICMA (Python Automatic REDIs Cluster MAker & MAnager )
Target of Program(Paredicma) : Redis cluster monitoring,management and maintenance, as possible as
easy and comfortable.

OS Version

: Redhat/Centos 6,7 or Ubuntu/Debian

Redis Version

: Redis 5.0.0 or above

Prerequirements

:

sshd ( with passwordless ssh-keygen auth. between servers for OS user ),
python (2.6 or above),
numactl( if you want to use dedicate cpu-core )

1- Download and extract :
Download

-> paredicma.tar.gz ( from github/paredicma/V1)

extract -> tar -xvf paredicma.tar.gz
-> cd paredicma
2- Installation :
You do not need to install it, just configure and run it.
3- Configuration :
a-) Configure pareNodeList.py file, change ip, port, cpu core and max_memory per node, according to
your cluster.
vi pareNodeList.py

######################pareNodeList.py ########################
#!/usr/bin/python
#-*- coding: utf-8 -*##################NODES################################
###pareNodes=[['node01_ip'],['node01_port'],['node01_cores:semicoma-separate'],['maxmemory'],[isActive]]

pareNodes = []
pareNodes.append([['10.0.0.1'],['7771'],['28,29'],['3gb'],True])
pareNodes.append([['10.0.0.1'],['7772'],['30,31'],['3gb'],True])
pareNodes.append([['10.0.0.1'],['7773'],['20,21'],['3gb'],True])
pareNodes.append([['10.0.0.1'],['7774'],['22,23'],['3gb'],True])
pareNodes.append([['10.0.0.2'],['7771'],['16,17'],['3gb'],True])
pareNodes.append([['10.0.0.2'],['7772'],['18,19'],['3gb'],True])
pareNodes.append([['10.0.0.2'],['7773'],['24,25'],['3gb'],True])
pareNodes.append([['10.0.0.2'],['7774'],['26,27'],['3gb'],True])
######################pareNodeList.py ########################

b-) Configure pareConfig.py file, according to your cluster

vi pareConfig.py

######################pareConfig.py ########################
from pareNodeList import *
##################PARAMETERS################################
projectName='testProject'
redisDataDir = '/home/hiccup/'+projectName+'/'
redisConfigDir = '/home/hiccup/'+projectName+'/'
redisLogDir = '/home/hiccup/'+projectName+'/'
redisVersion = '5.0.2'
redisTarFile = 'redis-5.0.2.tar.gz'
redisBinaryDir = '/home/hiccup/reBin/redis-'+redisVersion+'/'
doCompile = True
doStartNodes = True
unixSocketDir = '/tmp/'
pidFileDir = '/var/run/'

writePareLogFile = True
pareLogFile = 'paredicma.log'
pareTmpDir = 'temparedicma/'
pareServerIp = '10.0.0.2' # The server which you run "paredicma-cli.py"
pareOSUser = 'hiccup' ##'hiccup'
rdb = 'on' ## on/off
rdbValue = 'save 3600 1000\nsave 1800 10000\nsave 600 100000'
aof = 'on' ## on/off
aofValue = 'appendfsync everysec'
redisCluster = 'on' ## on/off
clusterNodeTimeout = 'cluster-node-timeout 5000'
clusterParameters = 'cluster-replica-validity-factor 0\ncluster-migration-barrier 1'
maxMemory = 'on' ## on/off
dedicateCore = True ## on/off
redisPwdAuthentication = True ## on/off
redisPwd = 'my1Laydy7darbanville5*'
redisParameters = '''
daemonize yes
slowlog-log-slower-than 1000
latency-monitor-threshold 100
slowlog-max-len 10
rename-command FLUSHALL "Ahsa5sMdbuva7_avsvs*1**"
rename-command FLUSHDB "Ahsa5sMdbuva7_avsvs*1"
'''
######################pareConfig.py ########################

4 - run program
python paredicma-cli.py

Paredicma Main Menu:

or If you have already made a cluster

Making Paradicma Redis Cluster
python paredicma-cli.py

Choose 4 (Redis Cluster Maker - ( paredicma )):

Set cluster replication factor

Accept redis cluster configuration ( yes )

Check the result.

Paradicma Redis Cluster Monitoring
Choose Redis Cluster Monitor Menu :

1- Ping Node(s) : This option ping all nodes.

2- List Node(s) : This option shows current nodes status.

3- Node(s) Info ( Choose node id and category ): You can see redis node details with using this
command.

4- Server Info : It shows details information about specific server.

5- Slots Info: This option shows current slot distribution.

6- Cluster State : This option shows that If redis Cluster OK or fail from each nodes.

7- Show Memory Usage : This option shows current memory usage on redis Cluster

Paradicma Redis Cluster Manager
Choose Redis Cluster Manager Menu :

1- Start/Stop/Restart Redis Node : Chose a specific node then chose command (start/stop/restart
)

2- Switch Master/Slave Nodes : This option switches specific master node with slave node

3- Change Redis Configuration Parameter: With this option, you can change redis configuration for
both all node or a specific node.

4- Save Redis Configuration to redis.conf: With this option, you can write redis configuration
changes to redis.conf file both all node or a specific node.

5- Rolling Restart : This option restart all cluster nodes sequentially.

6- Command for all nodes : Using with this option, you can run a command for all cluster nodes or
all cluster master nodes.

Paradicma Redis Cluster Migration&Upgrade&Maintenance
Choose Redis Cluster MUM Menu :

1- Add/Delete Redis Node : Using with this option, You can add new master/slave node to your
redis cluster. There are 3 different choise in this option.
a) Add Master Node : Choose 1 ( add ); Enter IP address; Enter Port ; give max memory; attain
specific cpu core(s); choose yes (for master)

b) Add Slave Node: Choose 1 ( add ); Enter IP address; Enter Port ; give max memory; attain
specific cpu core(s); choose no (for slave) ; choose no ( Non-specific Slave of Master )

c) Add Slave Node to Specific Master: Choose 1 ( add ); Enter IP address; Enter Port ; give max
memory; attain specific cpu core(s); choose no (for slave) ; choose yes ( for specific Slave of
Master ); enter Master Id (which you want to replicate)

d- Delete Redis Node : Enter Node Number and press enter.

2- Move Slot(s) : Using with this option, you can move some slot from one node to another node.
Enter FROM node Id; Enter TO node id; Enter slot number

3- Redis Cluster Nodes Version Upgrade
Copy new redis tar file to paredicma directory
# cd paredicma
# cp /tmp/redis-5.0.3.tar.gz .
Run paredicma again
# python paredicma-cli.py
Choose menu 3 (paredicmum )
Chose 3 for version upgrade; Enter Redis tar file name ; Check the results

…
…

4- Redis Cluster Nodes Version Control : This option shows old cluster nodes’ version

5- Maintain Server: This option shutdown all redis nodes for specific server which you want to
maintain.
Enter server IP address; press enter

6- Migrate Date From Remote Redis: This option migrates whole data from non-clustered redis
server to this redis cluster.
Enter target redis IP addres; Enter target redis Port

7- Cluster Slot (Load) Balancer: Using with this option, you can distribute redis slots on redis
cluster.
There are two choise :
1 – distribute slots to all nodes as possible as equal
2 - distribute slots according to nodes memory size
a) Node Base Slot Balance:
Redis cluster slots, before distribution

Choose 1 (node base); Set max slot limit or enter 0 for until all slots balanced.

Slots are balanced, as possible as equal, for each node

b-) Memory Base Slot Balance
Choose 2 (memory base); Set max slot limit or enter 0 for until all slots balanced.

Slots are balanced according to their memory usage



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 25
Language                        : en-US
Tagged PDF                      : Yes
Author                          : MUSTAFA YAVUZ
Creator                         : Microsoft® Word 2016
Create Date                     : 2019:01:01 15:28:53+03:00
Modify Date                     : 2019:01:01 15:28:53+03:00
Producer                        : Microsoft® Word 2016
EXIF Metadata provided by EXIF.tools

Navigation menu