News for hackers. Stuff that matters.
Re:Makesite.py – Simple, lightweight, and magic-free static ... by jacquesm on Sunday November 24, 2019 @12:47PM (#21621991)
Python deployment is a shitshow. Unfortunately mission critical stuff (looking at you letsencrypt) is also written in it which means that your systems are built on very shaky foundations.
Re:Makesite.py – Simple, lightweight, and magic-free static ... by kalia35 on Sunday November 24, 2019 @01:53PM (#21622423)
What ? This seems like a bold affirmation. I find it very simple actually :

  apt install python3 virtualenv
  virtualenv env
  . env/bin/activate
  pip install -r requirements.txt
Done. And then with fabric you can automate deployments in a few lines of codes !
Re:Makesite.py – Simple, lightweight, and magic-free static ... by jacquesm on Sunday November 24, 2019 @02:10PM (#21622550)
Right up until it nukes your perfectly working server.

The happy case works, it always does. The problem is in the edge cases and the exceptions. This probably goes for the bulk of all software.

Re:Makesite.py – Simple, lightweight, and magic-free static ... by kalia35 on Sunday November 24, 2019 @04:57PM (#21623719)
Well in ten years I have never had a nuked server by pip or virtualenv. I am sure there are edge cases but that must be true for all the ways of deploying stuff. I guess the ones you know well appear simple to you !
Re:Makesite.py – Simple, lightweight, and magic-free static ... by jacquesm on Sunday November 24, 2019 @05:06PM (#21623775)
I've had a production server be hosed by running 'letsencrypt-auto'. My bad I guess but still, that's one that I really did not see coming.
Re:Makesite.py – Simple, lightweight, and magic-free static ... by StavrosK on Sunday November 24, 2019 @05:19PM (#21623856)
I kind of agree with both of you. I don't think Python deployment is that bad, as most modern managers get it right (I prefer Poetry nowadays). However something like letsencrypt-auto, which AFAIK installs its own dependencies, is not something I'd run. I've actually never used it precisely because it's too magical. Programs shouldn't install their own dependencies anywhere outside of a virtualenv.
Re:Makesite.py – Simple, lightweight, and magic-free static ... by kalia35 on Monday November 25, 2019 @11:45AM (#21629933)
Does certbot do the same ? I don’t use either so I can’t tell.

I strongly agree that any python program must install its dependencies in a virtualenv. One could even argue that this principle could be extended to any software !

Re:Makesite.py – Simple, lightweight, and magic-free static ... by jklehm on Sunday November 24, 2019 @08:42PM (#21624821)
Have you heard of our Lord and Savior pipx? Solves the python tool isolation issue nicely.
Re:Makesite.py – Simple, lightweight, and magic-free static ... by StavrosK on Sunday November 24, 2019 @08:51PM (#21624854)
I haven't used it, I use virtualfish which does a great job as well.
Re:Makesite.py – Simple, lightweight, and magic-free static ... by jklehm on Sunday November 24, 2019 @08:59PM (#21624884)
Virtualfish is new to me, will check it out thanks.
Re:Makesite.py – Simple, lightweight, and magic-free static ... by StavrosK on Sunday November 24, 2019 @09:02PM (#21624892)
And it turned out that pipx wasn't what I thought it was, so thank you as well! Though virtualfish is only useful if you use the fish shell.
Re:Makesite.py – Simple, lightweight, and magic-free static ... by xmprt on Sunday November 24, 2019 @02:41PM (#21622781)
People who know what they're doing can build a lot of things with python. It just so happens that I am not one of those people so I try to avoid it with a ten foot stick. I still use things built with python everyday.
Re:Makesite.py – Simple, lightweight, and magic-free static ... by fanf2 on Sunday November 24, 2019 @02:13PM (#21622574)
We like `dehydrated` for ACME
Re:Makesite.py – Simple, lightweight, and magic-free static ... by tedmiston on Sunday November 24, 2019 @06:59PM (#21624420)
Re:Makesite.py – Simple, lightweight, and magic-free static ... by caro_douglos on Sunday November 24, 2019 @08:30PM (#21624771)
Have you always used this or did you make a transition after LE burned you?
Re:Makesite.py – Simple, lightweight, and magic-free static ... by tedmiston on Sunday November 24, 2019 @09:56PM (#21625074)
I heard about dehydrated from PythonAnywhere [1]. I haven't ever been burned by LE from a Python library, but I have had issues in the past with the kube-lego Helm chart not renewing as it should (easily fixed by deleting the pod though). [I know kube-lego is in maintenance mode now in favor of cert-manager.]

[1]: https://help.pythonanywhere.com/pages/LetsEncrypt