Skip to main content

Simple remote server configuration, using asyncio.

Project description

Refit

Documentation Status

Simple remote server configuration, using asyncio.

Why Refit?

As a die hard Ansible user for many years, I started looking for something slightly different.

Because of Docker, most of my deployments have become simpler. It usually involves uploading some files (e.g. docker-compose.yaml), and running some shell commands (e.g. docker-compose up). As a result, I don't need most of the modules that Ansible provides.

One thing I originally found great about Ansible was being able to configure it purely in YAML. This is nice when you're getting started. As your projects get larger though, you yearn for the control that code gives you. For example, rather than having to learn the particular syntax for performing 'for loops' in YAML, just do it naturally in Python.

Ansible is still great - but if you want to work in Python rather than YAML, give Refit a go.

Isn't it all about serverless nowadays?

Configuring servers is still a daily reality for many people, and will continue to be so for the foreseeable future. Need websockets? Can't stand the slow start up times of serverless? Want to avoid vendor lock in? Using VMs still makes a lot of sense.

Why asyncio?

Asyncio is a new approach to concurrency which was added in Python 3. It uses an event loop, rather than threads or processes. A typical use case is building a proxy, or a higher throughput web application.

It turns out that asyncio also works great for remote server configuration too. The reason is, your typical server config work flow looks a bit like this:

   MACHINE A          MACHINE B
   ---------          ---------
(TASK A1, TASK A2)     TASK B1
       |                  |
    TASK A3               |
                       TASK B2

Using async, we can fire off tasks A1, A2, and B1 simultaneously. Once complete, we then fire off task A3, and finally task B2. Refit will orchestrate the tasks so the servers are provisioned as quickly as possible.

It also means you can use all the exciting new asyncio libraries within your code.

Props

Built on top of the great work done in asyncssh.

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

refit-0.2.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

refit-0.2.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

Details for the file refit-0.2.0.tar.gz.

File metadata

  • Download URL: refit-0.2.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for refit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5f27d7b76fc30082569105138282463bb771dc6181937d933ae6066f27cffbea
MD5 624bea4b9b65d6d241b57c116d9aebc5
BLAKE2b-256 793f6e284852ec0253bf1aca5852908ea5b7fcb674ff747ffa16f426540ebb2b

See more details on using hashes here.

File details

Details for the file refit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: refit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for refit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c06fe5a78974d3e10f95837be9c3cb6719c0579b6d3031784c9b7d77b4b0c426
MD5 fe77b1ce697b7bfc084a307f2b5c57ba
BLAKE2b-256 20bce6ad37bf2025c6f5d913d383e5c8797334c1ce8a6f2cc452122e663876d8

See more details on using hashes here.

Supported by

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