简体   繁体   English

在远程机器上执行 python 代码

[英]Execution of python code on remote machines

I'm building a testing suite using Python Pytest library, my challenge is that I want to run the test on remote windows machines without the overhead of deploying my python code on those remote machines.我正在使用 Python Pytest 库构建一个测试套件,我的挑战是我想在远程 Windows 机器上运行测试,而不需要在这些远程机器上部署我的 python 代码的开销。

Current Solution:当前解决方案:

Using Jenkins I'm cloning the tests repository from bit bucket to the remote machine , and then using a PowerShell command through WINRM triggering the execution of the pytest script on the remote machine.使用 Jenkins,我将测试存储库从位桶克隆到远程机器,然后通过 WINRM 使用 PowerShell 命令触发远程机器上 pytest 脚本的执行。

Desired Solution: The pytest code/repository will reside on a machine (local/cloud) and will execute on remote windows machines (possibly in parallel on multiple machines)所需的解决方案: pytest 代码/存储库将驻留在机器(本地/云)上,并将在远程 Windows 机器上执行(可能在多台机器上并行)

I've investigated the paramiko/factory packages but they both require the code to be present on the remote machines.我调查了 paramiko/factory 软件包,但它们都要求代码存在于远程机器上。

Anyone encountered similar requirement ?有人遇到过类似的要求吗? implemented something similar?实现了类似的东西?

您可以尝试使用 aws ssm 的 pub-sub 机制

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM