如何在Jenkins的EC2上运行Windows实例? [英] How to run Windows instance on EC2 from Jenkins?

查看:108
本文介绍了如何在Jenkins的EC2上运行Windows实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Jenkins配置为在AWS EC2上执行Linux实例。这绝对可以正常工作,我可以通过Jenkins在EC2上调用Linux实例。 (安装了两个插件;设置;创建自定义Linux AMI等。)

I have configured my Jenkins to execute a Linux instance on AWS EC2. This works absolutely fine and I am able to invoke Linux instances on EC2 via Jenkins. (Installed a couple of plugins; settings; creating custom Linux AMI etc.).

我想通过Jenkins在EC2上运行Windows实例。我已经设置了一个自定义Windows AMI,其中安装了Java并配置了Winrm。一个安全组,允许在端口445和5985上使用TCP;分别用于SMB和Winrm( https://issues.jenkins-ci.org/browse/JENKINS -4995 )。

I want to run a Windows instance on EC2 via Jenkins. I have already setup a custom Windows AMI with Java installed and Winrm configured; a security group that allows TCP on port 445 and 5985; for SMB and Winrm respectively (https://issues.jenkins-ci.org/browse/JENKINS-4995).

我能够从Jenkins调用此Windows实例,但它从未连接(只需继续循环连接到ec2-54- 191-40-110.us-west-2.compute.amazonaws.com(54.191.40.110),带有WinRM。等待WinRM出现。睡10秒钟。

I am able to invoke this Windows instance from Jenkins, but it never connects(just continues the loop "Connecting to ec2-54-191-40-110.us-west-2.compute.amazonaws.com(54.191.40.110) with WinRM as. Waiting for WinRM to come up. Sleeping 10s."

请帮助我。

推荐答案

您将需要创建一个新的AMI并更改其执行策略。

you will need to create a new AMI and change the execution policy on it.


  1. 从上面提到的AMI创建新计算机。

  1. create a new machine from the AMI you mentioned above.

登录并从cmd运行以下命令

login to it and run the following from the cmd

powershell Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine


  • 拍摄新图像。

  • take a new image.

    在詹金斯中配置新的AMI。

    configure the new AMI in jenkins.

    很好。

    这篇关于如何在Jenkins的EC2上运行Windows实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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