我们可以使用 GCP composer 与 windows 实例通信吗?

Can we communicate with windows instance using GCP composer?

我想在 GCP Composer 的帮助下 运行 我在 windows 上的 bat 文件,但我不确定我们是否可以与 windows 机器通信,因为 composer 是完全基于在 linux 环境中。如果您有任何解决方案,请帮助我。

中描述了几个可能的解决方案,基本上是:

  1. 将 ssh 安装到您的 Windows 机器中,然后使用 Airflow 的 ssh operator.

  2. 远程连接到 运行 命令
  3. 安装类似 pywinrm, which allows you to run Windows commands on a target machine from Python code. Then, use the Python operator, within your DAG, to make the call. You may refer to the GCP documentation 的软件包,了解在 Composer 中安装其他 Python 软件包的步骤。