Typesafe ConductR的CLI客户端
typesafe-conductr-cli的Python项目详细描述
{a2}
Typesafe Conductor的命令行界面(CLI)
安装
Python 3是必需的。对于OS X用户,请使用brew install python3。在
使用pip安装
您可以向所有用户安装:
sudo pip3 install typesafe-conductr-cli
…或者,如果您不使用brew(在编写本文时,用户安装有问题),请安装到当前用户(请确保路径中有~/.local/bin):
^{pr2}$作为deb包安装
为构建deb包构建docker镜像:
docker build -t debian-distribution deb_dist/
运行Build docker映像:
docker run -v $(pwd):/source debian-distribution
安装内置deb包:
dpkg -i deb_dist/python3-typesafe-conductr-cli_0.1-1_all.deb
需要安装依赖项:
apt-get install -f
自动完成支持
如果您已经安装了argcomplete并希望为CLI激活Bash completion,那么您必须执行以下操作,要么在终端会话中临时执行,要么在.bashrc或.bash_profile中永久执行:
eval"$(register-python-argcomplete conduct)"
或者,如果您有Bash 4.2或更高版本,您可以激活一次全局完成:
activate-global-python-argcomplete --dest=/path/to/bash_completion.d
如果正在运行zsh,请执行以下命令以启用自动完成:
autoload bashcompinit && autoload compinit && bashcompinit && compinit &&eval"$(register-python-argcomplete conduct)"
运行测试
执行以下命令以运行所有定义的测试:
python3 setup.py test
释放
CLI版本可以完全从GitHub项目页面执行。按照以下步骤剪切释放:
- 编辑typesafe_conductr_cli/__init__.py文件以包含要发布的版本。在
- 在GitHubreleases page中创建新版本。在
完成标记提交的CI构建后,新版本将自动部署到PyPi存储库。在
CLI用法
进行
使用任何受支持的子命令或选项执行conduct, e、 g
$ conduct -h usage: conduct [-h]{version,info,services,load,run,stop,unload} ... optional arguments: -h, --help show this help message and exit subcommands: valid subcommands {version,info,services,load,run,stop,unload}helpfor subcommands version print version info print bundle information services print service information load load a bundle run run a bundle stop stop a bundle unload unload a bundle
大多数子命令连接到ConductR实例,因此您必须指定其IP和端口;如果未指定,CONDUCTR_IP环境变量或127.0.0.1将用于IP,CONDUCTR_PORT或9005用于端口。或者,您可以通过--ip选项指定IP,通过--port选项指定端口。在
下面是一个加载捆绑包的示例:
conduct load sbt-typesafe-conductr-tester-1.0.0-e172570d3c0fb11f4f9dbb8de519df58dcb490799f525bab43757f291e1d104d.zip
沙扎尔
可以使用shazar命令:
- 用于将具有捆绑包结构的目录打包到捆绑包归档文件中
- 用于将捆绑包的配置打包到捆绑包存档中
在这两种情况下,源文件都被压缩,归档文件的SHA256摘要被附加到bundle归档文件名之后。在
有关命令用法的指针,请运行shazar -h。在
- 项目
标签: