Codis Cluster deployment
Matching tools in Https://github.com/wlibo666/codis
1. There are now installation packages and bulk deployment tools, see Catalog 10.135.29.168:/home/wangchunyan/work/go/package
The contents of this directory are as follows:
-rwxrwxr-x 1 Wangchunyan Wangchunyan 4787 Mar 2 14:01 autoinstall.py
Drwxrwxr-x 4 Wangchunyan Wangchunyan 4096 Mar 2 11:28 Codis
-rwxrwxr-x 1 Wangchunyan Wangchunyan 16:44 genpkg.sh
2. Installation Instructions
1) Run genpkg.sh to generate the installation package
2) Modify the IP address in the IPS variable in the autoinstall.py to the IP address of the machine you need to install
3) python./autoinstall.py Install Dashboard|proxy|server (select one of the three)
4) Start the dashboard process see http://www.cnblogs.com/wlibo666/p/5235620.html "3. Codis Start "
5) Redis Multi-instance installation, enter the/letv/codis/conf directory of Redis-server machine, copy codis-server.conf to codis-server-1.conf codis-server-2.conf, CODIS-SERVER-XX.CONF (maximum memory utilization is n-1/n, as per your needs)
In principle, the number of instances cannot exceed total memory/Single instance memory-1, then execute sudo/letv/codis/bin/letvredis/letv/codis/conf/codis-server-xx.conf &
3.codis-ha Deployment (Reference 10.112.29.24:/letv/codis/bin codis-ha Codis-ha.json)
Codis-ha need to communicate with dashboard, so it is best to deploy to dashboard on the same machine, of course, other machines can, as long as the same as the dashboard machine to maintain connectivity.
Configure the configuration file before running, please refer to the configuration file description https://github.com/wlibo666/codis-ha
Sudo/letv/codis/bin/codis-ha/letv/codis/bin/codis-ha.json &
4. master-Slave synchronous Detection Script deployment (reference 10.112.29.24:/letv/codis/bin slave-sync-check.sh config.txt)
Timing detection of Master/slave in each group is normal, if the synchronization is not normal, re-full synchronization
Direct Sudo/letv/codis/bin/slave-sync-check.sh/letv/codis/bin/config.txt &
5.redis Data Backup script deployment (see 10.154.34.116:/LETV/CODIS/REDIS-BACKUP)
The script is deployed on the backup server, requiring the hard disk to be large enough
Config.ini and dashboard on Config.ini are the same because it needs to get group information from dashboard
In the rdb-backup.sh script
Dstrdbpath variable is the directory where the backup data is stored
USERNAME variable is the user name of the Redis server machine (preferably root)
Userpwd variable is the password for the Redis server machine
Run sudo directly./runrdbback.sh &
6.redis Instance Monitoring script deployment (reference 10.112.29.24:/home/wangchunyan/moniredismem moni_redis_memory.sh getservergroup.sh)
You need to get the grouping information from dashboard, so it's best to deploy it with dashboard on the same machine, single instance max memory limit see moni_redis_memory.sh check_redis function Maxnum variable
Direct sudo./moni_redis_memory.sh &
Codis on-line cluster deployment