airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Multiple workers on the same machine?

Open pharoson opened this issue 11 years ago • 3 comments

As the title suggests, I want to know if this is possible.

Currently, I'm running workers on different machines as different users. I have these workers listening to different queues in order to run bash scripts as different users.

However, I need one machine to run scripts as two different users. The issue arises when Airflow attempts to create a new worker and runs into an existing mini-web server on port 8793 (used to serve local logs to the main webserver).

Is there a workaround or a planned feature for this?

pharoson avatar Aug 06 '15 18:08 pharoson

This is an interesting hack. I think the real solution here is to add a boolean flag to BaseOperator run_as_owner. If set to true, the worker would impersonate the owner chpst(?) prior to executing the task.

Are those BashOperators? PythonOperators?

mistercrunch avatar Aug 06 '15 22:08 mistercrunch

I'm running BashOperators.

pharoson avatar Aug 06 '15 23:08 pharoson

Celery does not support multiple workers on the same box. You'd have to use containers or virtualization of some sort.

But this is more about impersonation and authentication and there are other issues open for this topic.

mistercrunch avatar Aug 14 '15 15:08 mistercrunch