airflow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxime Beauchemin <maximebeauche...@gmail.com>
Subject Re: Airflow Webserver behind a reverse proxy
Date Fri, 15 Sep 2017 16:34:35 GMT
The problem is the app isn't written using proper URL constructs (using
Flask.url_for) or relative URLs. From memory there's a lot of
root/hard-coded URLs. Then you rely on the proxy/middleware to alter link
in HTML/JS which sounds super fragile.

Max

On Fri, Sep 15, 2017 at 4:07 AM, Driesprong, Fokko <fokko@driesprong.frl>
wrote:

> Hi Sergei,
>
> You can also remove gunicorn completly and let Nginx talk to the Flask app
> directly using wsgi:
> https://www.digitalocean.com/community/tutorials/how-to-
> serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
>
> I'm not super familiar with the routing in Nginx. A subdomain like
> airflow.domain.tld will work like Maxime suggested, but I'm not really sure
> if extending the path will work, e.g. domain.tld/airflow.
>
> Cheers, Fokko
>
>
> 2017-09-15 12:27 GMT+02:00 Sergei Iakhnin <llevar@gmail.com>:
>
> > I couldn't get the subdomain idea working for the use-case where a single
> > nginx proxies to multiple apps. For instance you want to have one front
> > page with links to Flower and Airflow Web UI. The quoble post was
> > interesting (thank you Sumit), but seemed a bit cumbersome. After some
> > searching I came upon the following gist, which uses the concept of WSGI
> > middleware to uniformly add a URL prefix across the entire Flask app:
> >
> > https://gist.github.com/Larivact/1ee3bad0e53b2e2c4e40
> >
> > Implementing this in Airflow is extremely straightforward and does the
> job
> > nicely, all in a single place.
> >
> > Is there interest in having me PR this?
> >
> > Best,
> >
> > Sergei.
> >
> >
> >
> >
> >
> > On Thu, Sep 14, 2017 at 8:54 AM Sumit Maheshwari <sumeet.manit@gmail.com
> >
> > wrote:
> >
> > > Sergei,
> > >
> > > Check the first bullet/point on this blog
> > > <https://www.qubole.com/blog/creating-apache-airflow-as-a-service/>,
> it
> > > might help you.
> > >
> > > Thanks,
> > > Sumit Maheshwari
> > > cell. 9632202950
> > >
> > >
> > > On Thu, Sep 14, 2017 at 2:34 AM, Maxime Beauchemin <
> > > maximebeauchemin@gmail.com> wrote:
> > >
> > > > It works well if you use a subdomain instead of a folder.
> > > >
> > > > Max
> > > >
> > > > On Wed, Sep 13, 2017 at 1:05 PM, Sergei Iakhnin <llevar@gmail.com>
> > > wrote:
> > > >
> > > > > I'm wondering if the webserver can be run behind a reverse proxy
> like
> > > > > nginx. I've tried setting the base URL to have an additional
> context
> > > path
> > > > > of /airflow and then have nginx target that in the proxy_pass
> > > directive,
> > > > > but it hasn't worked. I would appreciate any other ideas.
> > > > >
> > > > > Without the context path the proxying of airflow clashes with other
> > > sites
> > > > > served by the proxy.
> > > > >
> > > > > Best,
> > > > >
> > > > > Sergei.
> > > > > --
> > > > >
> > > > > Sergei
> > > > >
> > > >
> > >
> > --
> >
> > Sergei
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message