4 ms·
I wrote pyinfra! If anyone has questions/suggestions/issues I'm more than happy to answer :)
by Fizzadar 6y ago
I wrote pyinfra! If anyone has questions/suggestions/issues I'm more than happy to answer :)
- 1337shadow 6y agoLooking great ! How is it executing remote commands ? Is it uploading a script like ansible, or just executing remote commands ? The latter seems to be the case glancing at the source code, nice one !
- Fizzadar 6y agoIt executes commands remotely, so no python/etc needed on the targets, just a shell!
- 1337shadow 6y agoWhat a huge improvement to Ansible ! Seems like a much more modern Ansible to me, more precise but more targeting Python users instead of trying to attract non-coders too, it's very promising. I wish I had found your project before I started my own too, it's shitty compared to yours but i'll swallow my shame and share it with you just in case you find an idea that you like yourlabs.io/oss/shlax
- pydry 6y agoCan/will it be adapted to handle provisioning in cloud environments? - e.g. set up EC2 instances or is it your expectation that it will work with something that will handle that part?
- Fizzadar 6y agoSo pyinfra itself won't do this - but because inventory/etc is written in Python it's possible to easily achieve this by using boto3 directly in the inventory file. The use of Python for the inventory + deploy code makes it possible to integrate pyinfra with almost any external tool, without specific support in pyinfra (that's the theory, at least!).
- tapoxi 6y agoHow would you compare pyinfra to Salt?
- Fizzadar 6y agoI've not used salt very much at all but I believe both tools provide similar functionality. pyinfra is only agentless vs. salt can do both which makes it more scalable at huge numbers of hosts. The major difference is the configuration in Python vs YAML, which I personally think is a big advantage (but can see arguments the other way too)!
- BiteCode_dev 6y agoI'm looking for an alternative to ansible and fabric 2, some kind of middleground, and pyinfra looks like something I want to give a try to. Is there any way to attach the deployement scenario in a Python object ? All the examples I see are global functions called at a root of a module. How do I make a scenario pluggable? Reusable? Introspectable?
- Fizzadar 6y ago> Is there any way to attach the deployement scenario in a Python object ? It is possible to use pyinfra as a Python API, but this is not currently officially supported/may not follow semver, example: https://github.com/Fizzadar/pyinfra/blob/master/examples/api_deploy.py https://github.com/Fizzadar/pyinfra/blob/master/examples/api.... > How do I make a scenario pluggable? Reusable? Introspectable? pyinfra comes with builtin support for packaging "deploys" as Python packages, see: https://pyinfra.readthedocs.io/en/v0.14.5/api/deploys.html https://pyinfra.readthedocs.io/en/v0.14.5/api/deploys.html, an example: https://github.com/Fizzadar/pyinfra-docker https://github.com/Fizzadar/pyinfra-docker.
- BiteCode_dev 6y agoThanks. I like the fact you can do a quick and dirty script, but the wrap it up in tasks if you want.
- usrme 6y agoHow would you compare this to something like Fabric?