跳转到主要内容

为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 (15.5 kB 查看哈希值)

上传时间: 源代码

由以下支持