Skip to main content

provisioning tool focused on performance.

Project description

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

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:

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

Project details


Download files

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

Source Distribution

nuka-0.2.tar.gz (84.4 kB view details)

Uploaded Source

Built Distribution

nuka-0.2-py3-none-any.whl (73.6 kB view details)

Uploaded Python 3

File details

Details for the file nuka-0.2.tar.gz.

File metadata

  • Download URL: nuka-0.2.tar.gz
  • Upload date:
  • Size: 84.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nuka-0.2.tar.gz
Algorithm Hash digest
SHA256 99c9b426df4ba84a652c19afa5a0e14a7c5beadabb6dd3e4ae1c53ac17943215
MD5 872752eee2a842692c8ec93f5bbc07d3
BLAKE2b-256 dbd60b41e55c75363ccbba0b85695c0b461afd72452803f20c061e31548aefd0

See more details on using hashes here.

File details

Details for the file nuka-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nuka-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 89e5c31144740533383f06dcb6ae4a9044ee8d39ee782ba50032a8eceb326171
MD5 3fd441228da60b856e8bde809898890f
BLAKE2b-256 c85763092cde9a9eb7519999544eb8fd9c76df8f31964e9118e64fc5b3d6ab44

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page