Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

provisioning tool focused on performance.

Project Description

Because ops can dev.

nuka is a provisioning tool focused on performance. It massively uses Asyncio and SSH. It is compatible with docker vagrant and apache-libcloud.

Full documentation is available at http://doc.bearstech.com/nuka

Quickstart

Install nuka (See Installation for detailled steps):

$ pip install "nuka[full]"

Then start a script:

#!/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),
)

Run it using:

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

The first run will be slow because we have to pull the docker image. The next run will take approximately 1s.

Get some help:

$ ./your_file.py -h

Look at the generated gantt of your deployement:

$ firefox .nuka/reports/your_file_gantt.html

You’ll get a dynamic report like this screenshot:

Release History

This version
History Node

0.3

History Node

0.2

History Node

0.1

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
nuka-0.3-py3-none-any.whl
(75.1 kB) Copy SHA256 Hash SHA256
py3 Wheel Feb 6, 2018
nuka-0.3.tar.gz
(85.9 kB) Copy SHA256 Hash SHA256
Source Feb 6, 2018

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting