Forums

Apache Airflow -- Web Server

Hey guys, I am going to be working on a project with Apache Airflow and was curious if anyone has successfully put it up on PythonAnywhere since 2.0 came out? I want to know before I start bashing my head on my keyboard trying to get it to work... ;)

I found this article... https://airflow.apache.org/docs/apache-airflow/stable/security/webserver.html

So I want to know if I can just use the PythonAnywhere web servers OR since my main app is django, if I could theoretically put the Apache Airflow gui inside my django app? Not sure how to do this yet.

It looks like you would not be able to do it on PythonAnywhere. Situation is still like described here

I'm researching if there's a way to configure Airflow to use a WSGI configuration as opposed to using it's own built in Flask server. Seems like that would resolve the issue. Please correct me if I'm wrong.

You may try.

Any thoughts on how to start? I've basically come to that the UI is a flask app that uses Gunicorn. In theory this should be relatively plug/play right? The HTTP server talks to the flask app, but if I just have another HTTP server plugged in somehow it should work?

https://gunicorn.org/

So in the airflow docs it speaks of a reverse proxy. Is this what I would need to do to get it to talk to one of your http servers? Based on my research this seems promising but I'm not sure.

https://airflow.apache.org/docs/apache-airflow/stable/howto/run-behind-proxy.html

Websites on PythonAnywhere are run using uWSGI, which is pretty similar to gunicorn. So it's certainly possible (but not certain) that you could get it running as a Flask app on PA by using config similar to the stuff that's used to get it running under gunicorn; the risk would be if it uses some extra features that gunicorn offers beyond the official WSGI specification.