【问题标题】:Apache Airflow: Gunicorn Configuration File Not Being Read?Apache Airflow:未读取 Gunicorn 配置文件?
【发布时间】:2018-05-10 02:52:36
【问题描述】:

我正在尝试从 Redhat 机器上的 virtualenv 运行 Apache Airflow 的网络服务器,并使用 Gunicorn 配置文件中的一些配置选项。 Gunicorn 和 Airflow 都安装在 virtualenv 中。命令 airflow webserver 启动 Airflow 的网络服务器和 Gunicorn 服务器。配置文件具有确保 Gunicorn 仅使用/接受 TLSv1.2 的选项,以及要使用的密码列表。

Gunicorn 配置文件是gunicorn.py。此文件通过.bashrc 中的环境变量GUNICORN_CMD_ARGS="--config=/path/to/gunicorn.py ..." 引用。除了--config,这个变量还设置了几个其他变量。但是,当我运行airflow webserver 命令时,GUNICORN_CMD_ARGS 中的选项永远不会应用。

看到 Gunicorn 不是从命令行调用,而是由 Airflow 调用,我假设这就是为什么不读取 GUNICORN_CMD_ARGS 环境变量的原因,但我不确定,而且我对这两种技术都很陌生...

TL;DR: 是否有另一种方法可以设置 Gunicorn 以自动引用配置文件,而无需 GUNICORN_CMD_ARGS 环境变量?

这是我正在使用的:

  • gunicorn 19.8.1
  • apache-airflow 1.9.0
  • python 2.7.5

【问题讨论】:

    标签: python virtualenv config gunicorn airflow


    【解决方案1】:

    当 Airflow 调用 Gunicorn 时,它使用 ~\airflow\www\gunicorn_config.py 作为其配置文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-03-10
      • 1970-01-01
      • 2020-01-01
      • 2012-01-28
      • 2011-09-24
      • 2017-09-22
      • 1970-01-01
      相关资源
      最近更新 更多