为collective.hostout提供的插件,用于启动一个准备就绪的ubuntu主机以便hostout部署
项目描述
安装
hostout.ubuntu是collective.hostout的插件。Hostout是zc.buildout配方。
首先您需要一个正常工作的buildout。通过Google buildout + 您喜欢的应用框架来找到如何构建它。我们将使用一个非常简单的buildout,并将hostout添加到我们的buildout中,通过使用“extends”选项来扩展hostout。
>>> 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将在远程主机上检查是否有正常工作的buildout,如果没有找到,将执行一个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'
...
致谢
Dylan Jay ( software at pretaweb dot com )
发布历史
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
项目详情
关闭
hostout.ubuntu-1.0a3.tar.gz的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 371a649ef4e8e010624786886e6cbe4031d5a44ef2ca9c75dc1af9e3b1ee96e1 |
|
| MD5 | 8f39ddf873f1a2d42707372d420c798c |
|
| BLAKE2b-256 | d538bbd31a340a6cf4b531d54269eaf8f30ddb7f2b10466da681187d6d29911e |