生产环境发版Update脚本-创新互联
!/bin/bash if [ $# -lt 1 ];then echo "Usage: $0 play|www|server|fenquapp|globalapp|battle|db_job|report_job|pay_job|bgm_server|router" fi case $1 in play) ansible -m shell -a "cd /data/site/${1};svn revert -R ./;svn up" dx1sock1 ansible -m shell -a "cd /data/site/${1};svn revert -R ./;svn up" dx1sock2 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/dx1/${1}" dx1sock1 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/dx1/${1}" dx1sock2 www) for i in dx1 dx2 dx3 dx4 dx5 lt1 lt2 lt3 360 179 9377 do ansible -m shell -a "cd /data/site/${1};svn revert -R ./;svn up" ${i}sock1 ansible -m shell -a "cd /data/site/${1};svn revert -R ./;svn up" ${i}sock2 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/${i}/${1}" ${i}sock1 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/${i}/${1}" ${i}sock2 done server) for i in dx1 dx2 dx3 dx4 dx5 lt1 lt2 lt3 360 179 9377 do ansible -m shell -a "cd /home/${1};svn revert -R ./;svn up" ${i}sock1 ansible -m shell -a "cd /home/${1};svn revert -R ./;svn up" ${i}sock2 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/${i}/${1}" ${i}sock1 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/${i}/${1}" ${i}sock2 done fenquapp) for i in dx1 dx2 dx3 dx4 dx5 lt1 lt2 lt3 360 179 9377 do ansible -m shell -a "cd /home/appserver;svn revert -R ./;svn up" ${i}appserver ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/${i}/appserver" ${i}appserver done db_job) for i in dx1 dx2 dx3 dx4 dx5 lt1 lt2 lt3 360 179 9377 do ansible -m shell -a "cd /data/${1};svn revert -R ./;svn up" ${i}sock2 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/${i}/${1}" ${i}sock2 done report_job) for i in dx1 dx2 dx3 dx4 dx5 lt1 lt2 lt3 360 179 9377 do ansible -m shell -a "cd /data/${1};svn revert -R ./;svn up" ${i}sock2 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/${i}/${1}" ${i}sock2 done pay_job) for i in dx1 dx2 dx3 dx4 dx5 lt1 lt2 lt3 360 179 9377 do ansible -m shell -a "cd /data/${1};svn revert -R ./;svn up" ${i}sock2 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/${i}/${1}" ${i}sock2 done router) for i in dx1 dx2 dx3 dx4 dx5 lt1 lt2 lt3 360 179 9377 do ansible -m shell -a "cd /home/${1};svn revert -R ./;svn up" ${i}sock2 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/${i}/${1}" ${i}sock2 done bgm_server) for i in dx1 dx2 dx3 dx4 dx5 lt1 lt2 lt3 360 179 9377 do ansible -m shell -a "cd /data/site/pjb_bgmv2;svn revert -R ./;svn up" ${i}sock2 ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/${i}/bgm_server" ${i}sock2 done global) ansible -m shell -a "cd /home/autoconfig;svn revert -R ./;svn up" globalappserver ansible -m shell -a "cd /home/global;svn revert -R ./;svn up" globalappserver ansible -m shell -a "cd /home/appserver;svn revert -R ./;svn up" globalappserver ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/global/appserver" globalappserver battle) ansible -m shell -a "cd /home/autoconfig;svn revert -R ./;svn up" phybattleall ansible -m shell -a "cd /home/battleserver;svn revert -R ./;svn up" phybattleall for i in {1..10} do ansible -m shell -a "cd /home/phybattle${i};svn revert -R ./;svn up" phybattle${i} ansible -m shell -a ". /etc/profile;sh /home/autoconfig/autoconfig.sh /home/phybattle${i}" phybattle${i} done esac成都创新互联公司技术团队十余年来致力于为客户提供成都做网站、成都网站制作、品牌网站设计、营销型网站、搜索引擎SEO优化等服务。经过多年发展,公司拥有经验丰富的技术团队,先后服务、推广了千余家网站,包括各类中小企业、企事单位、高校等机构单位。
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
当前文章:生产环境发版Update脚本-创新互联
当前URL:http://myzitong.com/article/gddhd.html