Giter VIP home page Giter VIP logo

pyinfra's Introduction

PyPI version Docs status Travis.CI status Codecov Coverage MIT Licensed PyPI - Downloads

pyinfra automates/provisions/manages/deploys infrastructure super fast at massive scale. It can be used for ad-hoc command execution, service deployment, configuration management and more. Core design features include:

  • ๐Ÿš€ Super fast execution over thousands of targets with predictable performance.
  • ๐Ÿšจ Instant debugging with stdout + stderr output on error, and -v to print it always.
  • ๐Ÿ’ป Agentless execution by speaking native SSH/Docker/subprocess depending on the target.
  • โ—๏ธ Two stage process that enables --dry runs before making any changes.
  • ๐Ÿ“ฆ Extendable with any Python package as configured & written in standard Python.
  • ๐Ÿ”Œ Integrated with Docker, Vagrant/Mech & Ansible out of the box.

When you run pyinfra you'll see something like (non animated version):

Quickstart

pyinfra can be installed via pip:

pip install pyinfra

Now you can execute commands & operations over SSH:

# Execute an arbitrary shell command
pyinfra my-server.net exec -- echo "hello world"

# Install iftop apt package if not present
pyinfra my-server.net apt.packages iftop sudo=true update=true

These can then be saved to a deploy file, let's call it deploy.py:

from pyinfra.operations import apt

apt.packages(
    {'Install iftop'},
    'iftop',
    sudo=True,
    update=True,
)

And executed with:

pyinfra my-server.net deploy.py

or

pyinfra @docker/ubuntu deploy.py

pyinfra's People

Contributors

fizzadar avatar mkinney avatar hoh avatar uggedal avatar foobarquaxx avatar gchazot avatar gdoumenc avatar tobald avatar grantstephens avatar nikaro avatar ryan109 avatar sfermigier avatar vilhelmprytz avatar mansya avatar 0xflotus avatar stchris avatar ryanwersal avatar chrissinclair avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.