Live data from Hacker News

Pyinfra automates infrastructure super fast at scale

pyinfra.com

11–20 of 38 posts

Re: Pyinfra automates infrastructure super fast at scale

#11
How is the performance with larger deploy scripts? Ansible really struggles with hundreds of hosts and for simple things like uploading a dozen files to each host. The benchmarks are promising but the test really only does four things. https://docs.pyinfra.com/en/2.x/performance.html

Re: Pyinfra automates infrastructure super fast at scale

#12
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…

One example where I personally ran into trouble with ansible was in dealing with SSL certificates. In production we use letsencrypt to generate SSL certificates as you'd expect, but for testing we were using self-signed certificates. This was surprisingly complicated under the ansible model, basically I ended up writing a reusable playbook that worked more or less as a function, and running a hook at the end to actually create the keys. Due to the specifics of our app depending on what kind you needed the actual certificate paths got the certificates were different.

So I ended up doing some crazy hacks passing around state instead of just writing a function.

Re: Pyinfra automates infrastructure super fast at scale

#13
post #8

Earlier quoted context omitted.

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…

One example where I personally ran into trouble with ansible was in dealing with SSL certificates. In production we use letsencrypt to generate SSL certificates as you'd expect, but for testing we were using self-signed certificates. This was surprisingly complicated under the ansible model, basically I ended up writing a reusable playbook that worked more or less as a function, and running a hook at the end to actua…

Feels as though perhaps this should have dropped from playbook into a module?

https://docs.ansible.com/ansible/latest/dev_guide/developing...

Then just writing a function.

Re: Pyinfra automates infrastructure super fast at scale

#14
post #10
post #8

Earlier quoted context omitted.

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 :(

Have releases up to 2.13

https://github.com/willhallonline/docker-ansible

Still multiple major releases behind but still

Also I wonder how often the new releases are used (market share?) since so many people moved to cloud/k8s

Re: Pyinfra automates infrastructure super fast at scale

#15
I haven't used this for large deployments but I use it for my personal server and it works perfectly. Almost everything is built in and I can easily write my own custom operations when I need them. Documentation is good and the operations are well designed.

Only downside is I couldn't make it work with my SSH agent, but that might be a problem with Paramiko and not Pyinfra.

Re: Pyinfra automates infrastructure super fast at scale

#16
Related:

Show HN: pyinfra v2 - https://news.ycombinator.com/item?id=30999030 - April 2022 (2 comments)

Pyinfra v2.0 Released - https://news.ycombinator.com/item?id=30973976 - April 2022 (3 comments)

Show HN: Pyinfra v1.4 - https://news.ycombinator.com/item?id=26983266 - April 2021 (3 comments)

Pyinfra – automate infrastructure super fast at scale - https://news.ycombinator.com/item?id=23487178 - June 2020 (64 comments)

Pyinfra v0.2 - https://news.ycombinator.com/item?id=12956784 - Nov 2016 (2 comments)

Re: Pyinfra automates infrastructure super fast at scale

#17

Earlier quoted context omitted.

One example where I personally ran into trouble with ansible was in dealing with SSL certificates. In production we use letsencrypt to generate SSL certificates as you'd expect, but for testing we were using self-signed certificates. This was surprisingly complicated under the ansible model, basically I ended up writing a reusable playbook that worked more or less as a function, and running a hook at the end to actua…

Feels as though perhaps this should have dropped from playbook into a module? https://docs.ansible.com/ansible/latest/dev_guide/developing... Then just writing a function.

Sure, but there's something to be said for locality of behavior.

Re: Pyinfra automates infrastructure super fast at scale

#18

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…

so pulumi[1]?

[1]: https://github.com/pulumi/pulumi

Re: Pyinfra automates infrastructure super fast at scale

#19
post #10
post #8

Earlier quoted context omitted.

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 :(

I'm on 'ansible==5.5.0' / 'ansible-core==2.12.3' and am using Mitogen with no issues whatsoever.
Post reply on HN