与部署相关的结构实用程序
tunic的Python项目详细描述
用于在远程服务器上部署代码的python库。
束腰外衣的设计是为了让你能充分利用 它的功能正如你所愿,选择权在你。
它只需要将结构库作为依赖项,并且可以安装 从python包索引(pypi)中使用pip工具。
$ pip install tunic
然后可以在部署过程中像这样使用它。
fromfabric.apiimporttaskfromtunic.apiimportget_release_id,ReleaseManager,VirtualEnvInstallationAPP_BASE='/srv/www/myapp'@taskdefdeploy():stop_my_app()release=get_release_id()installer=VirtualEnvInstaller(APP_BASE,['myapp'])release_manager=ReleaseManager(APP_BASE)installer.install(release)release_manager.set_current_release(release)start_my_app()
上面的代码片段只是一个开始,看看代码库 有关可以在部署过程中保存工作的更多方法。
下载
python包可在https://pypi.python.org/pypi/tunic