You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by da...@apache.org on 2016/06/15 18:48:40 UTC
[1/2] incubator-airflow git commit: [AIRFLOW-223] Make parametrable
the IP on which Flower binds to
Repository: incubator-airflow
Updated Branches:
refs/heads/master 01952b37b -> 6270dcf93
[AIRFLOW-223] Make parametrable the IP on which Flower binds to
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/d31ff09b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/d31ff09b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/d31ff09b
Branch: refs/heads/master
Commit: d31ff09b06cab9b8d095a4a5beb733afcc8bfae6
Parents: 0bd5515
Author: Herv� Werner <he...@mfglabs.com>
Authored: Thu Jun 9 15:10:39 2016 +0200
Committer: Herv� Werner <he...@mfglabs.com>
Committed: Thu Jun 9 15:10:39 2016 +0200
----------------------------------------------------------------------
airflow/bin/cli.py | 11 ++++++++---
airflow/configuration.py | 7 ++++++-
2 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/d31ff09b/airflow/bin/cli.py
----------------------------------------------------------------------
diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py
index 3430164..68f9645 100755
--- a/airflow/bin/cli.py
+++ b/airflow/bin/cli.py
@@ -588,6 +588,7 @@ def version(args): # noqa
def flower(args):
broka = conf.get('celery', 'BROKER_URL')
+ address = '--address={}'.format(args.hostname)
port = '--port={}'.format(args.port)
api = ''
if args.broker_api:
@@ -605,7 +606,7 @@ def flower(args):
)
with ctx:
- os.execvp("flower", ['flower', '-b', broka, port, api])
+ os.execvp("flower", ['flower', '-b', broka, address, port, api])
stdout.close()
stderr.close()
@@ -613,7 +614,7 @@ def flower(args):
signal.signal(signal.SIGINT, sigint_handler)
signal.signal(signal.SIGTERM, sigint_handler)
- os.execvp("flower", ['flower', '-b', broka, port, api])
+ os.execvp("flower", ['flower', '-b', broka, address, port, api])
def kerberos(args): # noqa
@@ -856,6 +857,10 @@ class CLIFactory(object):
default=conf.get('celery', 'celeryd_concurrency')),
# flower
'broker_api': Arg(("-a", "--broker_api"), help="Broker api"),
+ 'flower_hostname': Arg(
+ ("-hn", "--hostname"),
+ default=conf.get('celery', 'FLOWER_HOST'),
+ help="Set the hostname on which to run the server"),
'flower_port': Arg(
("-p", "--port"),
default=conf.get('celery', 'FLOWER_PORT'),
@@ -973,7 +978,7 @@ class CLIFactory(object):
}, {
'func': flower,
'help': "Start a Celery Flower",
- 'args': ('flower_port', 'broker_api',
+ 'args': ('flower_hostname', 'flower_port', 'broker_api',
'pid', 'daemon', 'stdout', 'stderr', 'log_file'),
}, {
'func': version,
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/d31ff09b/airflow/configuration.py
----------------------------------------------------------------------
diff --git a/airflow/configuration.py b/airflow/configuration.py
index 3403656..e92ba8a 100644
--- a/airflow/configuration.py
+++ b/airflow/configuration.py
@@ -142,6 +142,7 @@ defaults = {
'celery_result_backend': 'db+mysql://airflow:airflow@localhost:3306/airflow',
'celeryd_concurrency': 16,
'default_queue': 'default',
+ 'flower_host': '0.0.0.0',
'flower_port': '5555',
'worker_log_server_port': '8793',
},
@@ -337,7 +338,10 @@ broker_url = sqla+mysql://airflow:airflow@localhost:3306/airflow
celery_result_backend = db+mysql://airflow:airflow@localhost:3306/airflow
# Celery Flower is a sweet UI for Celery. Airflow has a shortcut to start
-# it `airflow flower`. This defines the port that Celery Flower runs on
+# it `airflow flower`. This defines the IP that Celery Flower runs on
+flower_host = 0.0.0.0
+
+# This defines the port that Celery Flower runs on
flower_port = 5555
# Default queue that tasks get assigned to and that worker listen on.
@@ -447,6 +451,7 @@ celeryd_concurrency = 16
worker_log_server_port = 8793
broker_url = sqla+mysql://airflow:airflow@localhost:3306/airflow
celery_result_backend = db+mysql://airflow:airflow@localhost:3306/airflow
+flower_host = 0.0.0.0
flower_port = 5555
default_queue = default
[2/2] incubator-airflow git commit: Merge branch '1582'
Posted by da...@apache.org.
Merge branch '1582'
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/6270dcf9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/6270dcf9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/6270dcf9
Branch: refs/heads/master
Commit: 6270dcf93c3b27a08fe67a4c9ecca6cfae219dd7
Parents: 01952b3 d31ff09
Author: Dan Davydov <da...@airbnb.com>
Authored: Wed Jun 15 11:47:52 2016 -0700
Committer: Dan Davydov <da...@airbnb.com>
Committed: Wed Jun 15 11:47:52 2016 -0700
----------------------------------------------------------------------
airflow/bin/cli.py | 11 ++++++++---
airflow/configuration.py | 7 ++++++-
2 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------