Can we communicate with windows instance using GCP composer?

9/24/2019

I want to run my bat file on windows with the help of GCP Composer, but i am not sure if we can communicate with windows machine as composer is fully based on linux environment. Please help me if you have any solution.

-- Sushant Nigudkar
amazon-web-services
google-cloud-composer
google-cloud-platform
google-kubernetes-engine

1 Answer

9/26/2019

There are a couple possible solutions described in this thread, basically:

  1. Installing ssh into your Windows machine and then connecting to run commands remotely using the Airflow’s ssh operator.

  2. Install a package like 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 for steps on installing additional Python packages in Composer.

-- ch_mike
Source: StackOverflow