Skip to main content

A simple infrastructure and configuration management tool

Project description

ATTENTION: This project is currently in beta development. The API may still change at anytime.

About

Why?

  • Fast execution (single ssh connection per host)
  • Execution on multiple hosts is currently not parallelized
  • Intended for writing small and clean deploys. (Need to configure 1000 hosts? this is probably the wrong tool.)
  • Agentless.
  • Lightweight. (everything included amounts to just about 2kLOC (compare pyinfra 10kLOC, ansible ???)
  • No surprises (for loops work like they should, no magic applied).
    • Debugging experiece is just like writing python as usual.
  • Fully typed

This looks similar to pyinfra. What are the differences?

We like pyinfra and encourage using it. It is probably the better tool for large deploys. What sets this project apart is. Developer oriented. Main goal was to create a minimal and predictable scripting environment for remote hosts. scripts are executed in-order, once for each host, as one would expect. It's easy to write reusable scripts. Diff output good.

Fora is a infrastructure and configuration management tool inspired by ansible.

  • Requires python3.9 on all managed systems.
  • Functions similar to ansible, but lets you write your deploys in pure python

Installation

Fora requires python>=3.9.

Quick example

Here is a simple deploy.py which creates a temporary directory and uploads a templated file.

from fora.operations import files

files.directory(name="Create a temporary directory",
    path="/tmp/hello")

files.template_content(name="Save templated content to the directory",
    content="{{fora_managed}}\nHello from host {{host.name}}\n",
    dest="/tmp/hello/world")

This script can then be executed on any ssh host.

fora ssh://root@localhost deploy.py

Of course you can separately define inventories, groups and hosts for larger deploys.

Acknowledgements

The fora icon is slightly modified version of an image made by Freepik from Flaticon.

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

fora-2.0.1.tar.gz (94.1 kB view details)

Uploaded Source

Built Distribution

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

fora-2.0.1-py3-none-any.whl (66.1 kB view details)

Uploaded Python 3

File details

Details for the file fora-2.0.1.tar.gz.

File metadata

  • Download URL: fora-2.0.1.tar.gz
  • Upload date:
  • Size: 94.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4

File hashes

Hashes for fora-2.0.1.tar.gz
Algorithm Hash digest
SHA256 562974e9ba26f24d34ada6b788e9179c2e36a123cea15011b0e8fc28c633bb00
MD5 45766f57e2c133f434b11d4a898866da
BLAKE2b-256 029fcdc16c86695d84b5389a783c43d4bfe2214c78742514030614bf523dcbb0

See more details on using hashes here.

File details

Details for the file fora-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: fora-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 66.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4

File hashes

Hashes for fora-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3ede236b9fcbbfdc57dca3a5e6eac850663802a72ec18ee6fa346e9c5045c6e2
MD5 5f49a3093af17b50c35ab1771235eb71
BLAKE2b-256 89111ce796dc75d6847943307d6f2e4695076a5d33bf64b0f499bd0947490621

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