News for hackers. Stuff that matters.
Re:Void – A website creation tool by dheera on Sunday April 12, 2015 @01:35PM (#9364092)
Deploying Python on my school's web hosting service involved writing this horrendous mess of a .fcgi file: https://github.com/dheera/web-sustainabilitysummit/blob/mast...

Deploying Python+uwsgi+nginx on AWS involved another mess of a setup, wiresharking to figure what the hell port uwsgi was running on (the first tutorial I read had a typo ...), and a mess of pythonpath variables. Including requiring both

    pythonpath = /usr/lib/python3/dist-packages
    pythonpath = /usr/lib/python3.4/dist-packages
in order to function (like, WTF)

Not to mention I had to know to include the python3 plugin

    plugins = http,python3
No tutorial told me that the 'python' plugin couldn't handle python 3.x. Yep, definitely not newbie-friendly ...

Can't servers just have an auto-configure command? I'll just drop a Flask app in /var/www. uwsgi should detect that it's Python, try to execute it as python2 and python3 (or just read the damn shebang lines and use the correct plugin) and just use whichever doesn't give errors. The server should just figure out what ports things are running on, where plugins are located. Auto-scan the newly dropped code for all import lines, search the file system for the right paths, and cache the result; if it still fails, try to just pip install it, and if pip fails, try to apt-get install python-* it.

Save the final auto-configuration result.

Manual configuration will always be an option, but in 99.9% of applications most of this deployment process seems pretty easy to automate.

There are no comments on this comment yet.