Live data from Hacker News

Pyinfra automates infrastructure super fast at scale

pyinfra.com

1–10 of 38 posts

Re: Pyinfra automates infrastructure super fast at scale

#4
post #3

Does any one have any links to some good writes ups on this being used in a bigger environment? Anyone want to post their experience using it here?

There was more commentary about it when it was posted in 2020: https://news.ycombinator.com/item?id=23487178 (although I didn't go through them all looking for endorsements)

Re: Pyinfra automates infrastructure super fast at scale

#6

Does this have any advantages over Ansible? It seems to have some config management, but not as robust or well documented. Ansible also does parallel remote execution.

Yes.

- you use an actual programming language (which you're likely to already know) instead of desperately figuring out how to simulate a for loop in yaml or to replace a part of a string, or whatnot

- you have all Python static analysis tools at your disposal. mypy/pylint etc can make your deploys less error prone

- you can easily implement a custom DSL in python, so deploys ends up more declarative and with less copy pasting

- it's easy to implement custom arbitrary operations (since you're working in python) -- and again you can reuse variables, etc instead of having to use some weird templating or pass them in command line

Re: Pyinfra automates infrastructure super fast at scale

#8

Does this have any advantages over Ansible? It seems to have some config management, but not as robust or well documented. Ansible also does parallel remote execution.

Yes. - you use an actual programming language (which you're likely to already know) instead of desperately figuring out how to simulate a for loop in yaml or to replace a part of a string, or whatnot - you have all Python static analysis tools at your disposal. mypy/pylint etc can make your deploys less error prone - you can easily implement a custom DSL in python, so deploys ends up more declarative and with less co…

At what point are you just re-inventing what Ansible already does if you're going down the DSL path? I sometimes feel like I'm in the minority, but I truly do like Ansible and if you slap Mitogen[1] in front of it makes the whole process even more enjoyable!

I'm honestly trying to understand whether this hating on Ansible is more of a bandwagon thing (similar to how people shit on the Python dependency management ecosystem) and stems from having bad experiences that have completely turned them off of it.

Honest questions in response to your points:

1. What are you deploying where you would need static analysis?

2. If you did end up writing your own DSL on top of Python at what point would you concede that it's probably better to use someone's else creation as opposed to forever iterating on your own thing for the sake of using your own thing?

3. Why would you want "custom arbitrary operations" and how custom are they that Ansible and Jinja2 can't do that for you in usage patterns that are far more common than your own creation would be?

---

[1]: https://mitogen.networkgenomics.com/ansible_detailed.html

Re: Pyinfra automates infrastructure super fast at scale

#10
post #8

Earlier quoted context omitted.

Yes. - you use an actual programming language (which you're likely to already know) instead of desperately figuring out how to simulate a for loop in yaml or to replace a part of a string, or whatnot - you have all Python static analysis tools at your disposal. mypy/pylint etc can make your deploys less error prone - you can easily implement a custom DSL in python, so deploys ends up more declarative and with less co…

At what point are you just re-inventing what Ansible already does if you're going down the DSL path? I sometimes feel like I'm in the minority, but I truly do like Ansible and if you slap Mitogen[1] in front of it makes the whole process even more enjoyable! I'm honestly trying to understand whether this hating on Ansible is more of a bandwagon thing (similar to how people shit on the Python dependency management eco…

Does mitogen really only support up to Ansible 2.9? Thats a couple years old isn't it? I was really excited for it until I saw that :(
Post reply on HN