跳转到主要内容

性能专注的配置工具。

项目描述

https://img.shields.io/pypi/l/nuka.svg https://img.shields.io/pypi/pyversions/nuka.svg https://travis-ci.org/bearstech/nuka.png?branch=master

因为运维可以开发。

nuка是一个专注于性能的配置工具。它大量使用Asyncio和SSH。它与docker vagrant和apache-libcloud兼容。

完整的文档可在http://doc.bearstech.com/nuka找到

快速入门

安装nuка(有关详细步骤,请参阅安装

$ pip install "nuka[full]"

然后启动脚本

#!/usr/bin/env python3.5
import nuka
from nuka.hosts import DockerContainer
from nuka.tasks import (shell, file)

# setup a docker container using the default image
host = DockerContainer('mycontainer')


async def do_something(host):

    # we just echoing something using the shell.command task
    await shell.command(['echo', 'it works'], host=host)

    # if no host is provided, then a var named `host` is searched
    # from the stack. Mean that this will works to
    await shell.command(['echo', 'it works too'])


async def do_something_else(host):

    # log /etc/resolv.conf content
    res = await file.cat('/etc/resolv.conf')
    host.log.info(res.content)


# those coroutines will run in parallell
nuka.run(
    do_something(host),
    do_something_else(host),
)

使用以下命令运行它

$ chmod +x your_file.py
$ ./your_file.py -v

第一次运行会较慢,因为我们必须拉取Docker镜像。下一次运行大约需要1秒。

获取帮助

$ ./your_file.py -h

查看您的部署生成的甘特图

$ firefox .nuka/reports/your_file_gantt.html

您将获得如此截图所示的动态报告

https://doc.bearstech.com/nuka/_images/gantt.png

项目详情


下载文件

下载适合您平台的项目。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

nuka-0.3.tar.gz (85.9 kB 查看哈希值)

上传时间: 源代码

构建发行版

nuka-0.3-py3-none-any.whl (75.1 kB 查看哈希值)

上传时间: Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面