简体   繁体   English

在Windows 2008 R2 Box上创建Jenkins从站

[英]Creating Jenkins Slave On Windows 2008 R2 Box

I have a master Jenkins server. 我有一个主Jenkins服务器。 I would like to create a slave Windows 2008 R2 slave Jenkins? 我想创建一个从Windows 2008 R2从属詹金斯吗?

Do I need to install Jenkins on the slave box? 我需要在从箱上安装Jenkins吗? Or is saving slave-jnlp file to disk and opening it enough? 还是将slave-jnlp文件保存到磁盘并足够打开?

I downloaded the slave-agent.jnlp and tried running it. 我下载了slave-agent.jnlp并尝试运行它。 I get: 我得到:

在此处输入图片说明

You don't install the full Jenkins server on the slave. 您无需在从站上安装完整的Jenkins服务器。 Just the slave agent per this documentation: https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-Howdoesthiswork%3F 仅此文档中的从属代理: https : //wiki.jenkins-ci.org/display/JENKINS/Distributed+builds#Distributedbuilds-Howdoesthiswork%3F

Well, which part of documentation did you follow? 那么,您遵循了文档的哪一部分? There are many ways of doing it 有很多方法可以做到

This is because Java security related to jnlp has increased, preventing it from using http. 这是因为与jnlp相关的Java安全性已提高,从而阻止了它使用http。

Option A) Secure method: Switch to HTTPS. 选项A)安全方法:切换到HTTPS。 Either buy and install a certificate, or even create your own Certificate Authority and self-sign your own certificate, install it, and install the CA as a trusted root on all nodes! 购买和安装证书,甚至创建自己的证书颁发机构并自签名自己的证书,进行安装,然后将CA作为所有节点上的受信任根安装! Should work now. 现在应该工作。

Option B) Copy the slave-agent.jnlp file from the Jenkins server to the Jenkins node by some secure means, such as SSH, or for those who don't care about security (peer pressure, that): 选项B)通过某些安全方式(例如SSH)或对于那些不关心安全性(同等压力的人),将slave-agent.jnlp文件从Jenkins服务器复制到Jenkins节点:

wget http://10.150.0.150:8080/computer/NODENAME/slave-agent.jnlp

or via an administrative Powershell (also insecure transfer): 或通过管理性Powershell(也是不安全的传输):

iwr('http://10.150.0.150:8080/computer/NODENAME/slave-agent.jnlp')

Set your Jenkins node to trust any insecure http that looks like it might be from your Jenkins server: 将您的Jenkins节点设置为信任看起来像来自您的Jenkins服务器的任何不安全的http:

Windows > All Programs > Java > Configure Java > Security tab > Edit Site List
add your server ("http://10.150.0.150:8080", for instance)

double-click 'slave-agent.jnlp' file on desktop. 双击桌面上的“ slave-agent.jnlp”文件。 Should see a Jenkins UI saying slave agent started. 应该会看到Jenkins UI表示已启动从属代理。

File > Install as Windows Service

Highly recommend HTTPS (Option A.) 强烈建议使用HTTPS(选项A。)

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

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