优酷土豆移动自动部署工具
admin
2023-07-31 01:48:19
0

auto_deploy
Server Auto Deploy Tool
设计思想:

目前使用fabric维护服务器的同志应该很多,但是,在我周围的的工作环境中,大都是由运维同学升级和维护服务器, 而使用fabric有学习成本,你不能强求人家用python,多数运维同学还是忠于bash的, 于是乎,就有了写shell脚本,并在远程执行的需求,从此江湖就是一片血雨腥风。

github 地址:
https://github.com/edisonlz/auto_deploy

Usage:

usage: python deploy.py -c config.ini -e exc.ini -u ./package -p /root/downloads/dw

Config Server config.ini:

config use password

host,port,user,passwd
config use private key

tag(default:1),host,port,user,private_key(ssh rsa),encrypt type(rsa,dsa:lowercase)
e.g.

127.0.0.1 22 liuzheng bmc
127.0.0.1 22 liuzheng /Users/liuzheng/.ssh/id_dsa dsa
127.0.0.1 22 liuzheng /Users/liuzheng/.ssh/local_rsa rsa

Config Exceute Commend exc.ini:

ls -ls |head -n 10
grep a . |head -n 10
.....
Why can’t I run programs in the background with &? It makes paramiko hang.

Run the program under nohup and redirect stdin, stdout and stderr to /dev/null
 (or to your file of choice, if you need the output later):

run(\"nohup yes >& /dev/null < /dev/null &\") (yes is simply an example of a program that may run for a long time or forever
; >&, < and & are Bash syntax for pipe redirection and backgrounding, 
respectively – see your shell’s man page for details.)

depend on

easy_install paramiko

上一篇:python中的编码问题

下一篇:压缩算法 LZW

相关内容

热门资讯

Mobi、epub格式电子书如... 在wps里全局设置里有一个文件关联,打开,勾选电子书文件选项就可以了。
定时清理删除C:\Progra... C:\Program Files (x86)下面很多scoped_dir开头的文件夹 写个批处理 定...
scoped_dir32_70... 一台虚拟机C盘总是莫名奇妙的空间用完,导致很多软件没法再运行。经过仔细检查发现是C:\Program...
500 行 Python 代码... 语法分析器描述了一个句子的语法结构,用来帮助其他的应用进行推理。自然语言引入了很多意外的歧义,以我们...
小程序支付时提示:appid和... [Q]小程序支付时提示:appid和mch_id不匹配 [A]小程序和微信支付没有进行关联,访问“小...
pycparser 是一个用... `pycparser` 是一个用 Python 编写的 C 语言解析器。它可以用来解析 C 代码并构...
微信小程序使用slider实现... 众所周知哈,微信小程序里面的音频播放是没有进度条的,但最近有个项目呢,客户要求音频要有进度条控制,所...
65536是2的几次方 计算2... 65536是2的16次方:65536=2⁶ 65536是256的2次方:65536=256 6553...
Apache Doris 2.... 亲爱的社区小伙伴们,我们很高兴地向大家宣布,Apache Doris 2.0.0 版本已于...
项目管理和工程管理的区别 项目管理 项目管理,顾名思义就是专注于开发和完成项目的管理,以实现目标并满足成功标准和项目要求。 工...