通过Airflow运行.EXE和Powershell任务 [英] Run .EXE and Powershell tasks with Airflow

查看:213
本文介绍了通过Airflow运行.EXE和Powershell任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的系统基本上只是与MS SQL Server一起运行C#和Powershell应用程序的Windows Server.我们有一个内部WorkflowManagement解决方案,该解决方案能够运行执行EXE/BAT/PS1甚至调用DLL函数的任务.

our systems are basically just Windows Servers running C# and Powershell applications in conjunction with MS SQL Server. We have a in-house WorkflowManagement solution that is able to run tasks that execute EXE/BAT/PS1 and even call DLL-Functions.

现在,我正在评估Apache Airflow是否对我们来说是更好的解决方案.到目前为止,我的幼稚计划是在Linux机器上运行气流调度程序,然后让使用者在Windows机器上运行.但是,我将如何设置使用者以运行.exe任务呢?

Now I am evaluating if Apache Airflow is a better solution for us. My naive plan so far is to run airflow scheduler on a Linux-machine and then let the consumers run on Windows machines. But how would I setup the consumer to run a .exe task for instance?

我是否需要创建一个接受HTTP调用然后执行.Exe文件的Wrapper服务?

Do I need to create a Wrapper-Service that takes HTTP-Calls and then executes the .Exe files?

推荐答案

我认为您提到的消费者在气流中被称为工人".典型的工作人员运行的执行程序不在Windows上运行.

I think the consumers you are mentioning are called "workers" in airflow. The typical workers run an executor which doesn't run on Windows.

理论上,您可以在Windows框中安装ssh服务器,然后在其中使用SSHExecuteOperator运行exe命令等.

In theory you could install an ssh server on your windows boxes, and then use SSHExecuteOperator to run the exe commands and etc. there.

这可能比HTTP impl更好,因为当ssh命令运行时,气流中的任务将保持运行"状态,并自动相应地成功或失败.如果要与气流很好地集成,使用HTTP impl则需要自己实现此功能.

This would probably work better than an HTTP impl because your tasks in airflow would stay "running" while the ssh command was running and automatically go to success or fail accordingly. With an HTTP impl you would need to implement this functionality yourself if you wanted to integrate nicely with airflow.

这篇关于通过Airflow运行.EXE和Powershell任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆