Takumi服务框架命令行工具包
takumi-cli的Python项目详细描述
用于管理Takumi服务的命令行工具。
安装
$ pip install takumi-cli
用法
$ takumi -h
运行服务
$ takumi serve
部署应用程序
要使用ansible进行部署,应安装额外的要求:
$ pip install takumi-cli[deploy]
将deployentry添加到app.yaml:
deploy:vars:version:HEADtargets:testing:-localhost-testing.comprod:-app.prod
使用以下命令展开:
$ takumi deploy testing -t deploy
deploy命令是使用ansible实现的。
要部署crontab,请将以下配置添加到app.yaml
deploy:crontab:-name:check dirsschedule:"05,2***"job:'ls-alh>/dev/null'-name:say helloschedule:minute:0hour:5,2job:'scripts/say_hello.py'
然后运行:
$ takumi deploy <target> -t cron
cron作业在app工作目录/srv/{{ app_name }}下运行。
启动交互式shell
要启动ipython shell,应安装额外的要求:
$ pip install takumi-cli[shell]
启动外壳:
$ takumi shell -t <host> -- <ipython args>