collective.hostout的插件,该插件引导一个为hostout部署做好准备的ubuntu主机
hostout.ubuntu的Python项目详细描述
Installing
ubuntu是collective.hostout的插件。hostout是一个zc.buildout 食谱。
首先你需要一个工作的buildout。google buildout+你的fav应用程序框架来寻找如何构建它。 我们将使用一个非常简单的方法,在构建中添加一个hostout,然后扩展 使用“extends”添加ubuntu插件 选项
>>> write('buildout.cfg', ... """ ... [buildout] ... parts = helloworld host ... ... [helloworld] ... recipe = zc.recipe.egg:scripts ... eggs = zc.recipe.egg ... initialization = import sys ... main=lambda: sys.stdout.write('all your hosts are below to us!!!') ... entry-points = helloworld=__main__:main ... ... [host] ... recipe = collective.hostout ... host = 127.0.0.1:10022 ... extends = hostout.ubuntu ... ... """)
>>> print system('bin/buildout -N') Installing helloworld. Generated script '/sample-buildout/bin/helloworld'. Installing host. Generated script '/sample-buildout/bin/hostout'.
在部署期间,hostout将检查远程上是否有正在工作的构建 如果找不到主机,将执行ubuntu引导安装 本机软件包
>>> print system('bin/hostout host deploy') Hostout: Running command 'predeploy' from '/.../collective/hostout/supervisor/fabfile.py' Logging into the following hosts as : 127.0.0.1 [127.0.0.1] sudo: /var/lib/plone/host1/bin/supervisorctl shutdown || echo 'Failed to shutdown' ... Hostout: Running command 'postdeploy' from '/.../collective/hostout/supervisor/fabfile.py' ... [127.0.0.1] sudo: /var/lib/plone/host1/bin/supervisord ... [127.0.0.1] sudo: /var/lib/plone/host1/bin/supervisorctl status ... Hostout: Running command 'postdeploy' from '.../collective.hostout/collective/hostout/fabfile.py' ...
Credits
dylan jay(pretaweb dot com的软件)
Release History
1.0A3(2010-06-03) -fabfile入口点
1.0a2 (2010-05-28)
- 已将setaccess和setowners移到collective.hostout中
1.0a1 (2010-02-13)
- 已移出collective.hostout
- 将其升级到Fabric 1.0和Python 2.6