Table Of Contents
Steps
If you are having trouble getting the Java Web Start agent installed as a Windows service (ie, you followed the instructions on installing the slave as a service here but it didn't work), an alternative method of starting the service automatically when Windows starts is to use the Windows Scheduler.
We take advantage of the Windows Scheduler's ability to run command at system startup
- Configure your node to use the "Launch slave agents via Java Web Start" launch method
- Click Save
- Note the command required to launch the slave
- On the new slave node's Jenkins page, note the slave command line shown.
- It will be like: java -jar slave.jar -jnlpUrl http://<JenkinsHostName>:8080/computer/<nodeName>/slave-agent.jnlp -secret <some_long_hex_string>
- On the new slave node's Jenkins page, note the slave command line shown.
- Obtain the slave.jar file and copy it to your new Windows slave node
- In the command line noted in the last step, the "slave.jar" is a hyperlink. Click it to download the slave.jar file.
- Copy the slave.jar file to a permanent location on your slave machine
- Ensure that you have a java version available on your slave machine
- If not, obtain and install a copy of Java
- Run the command manually from a CMD window on your slave to confirm that it works
- Open the CMD window
- Run the command (the one like java -jar slave.jar -jnlpUrl http://<JenkinsHostName>:8080/computer/<nodeName>/slave-agent.jnlp -secret <some_long_hex_string>)
- Go back to the node's web page in Jenkins. If everything works then page should say "Connected via JNLP agent"
- Stop the command (control-c)
- Register a new scheduled job to run the same command
- Open "Task Scheduler" on your windows machine
- Start -> Run: task Scheduler
- Create a basic task (Menu: Action -> Create Basic Task)
- First page of the wizard:
- Name: Jenkins Slave
- Description (optional)
- Click Next
- Next page of the wizard
- When do you want the task to start: select "When the computer starts"
- Click Next
- Next page of the wizard
- What action do you want the task to perform: select "Start a program"
- Click Next
- Next page of the wizard
- Program/Script: enter "java.exe" (or the full path to your java.exe)
- Add arguments: enter the rest of the command, like " -jar slave.jar -jnlpUrl http://<JenkinsHostName>:8080/computer/<nodeName>/slave-agent.jnlp -secret <some_long_hex_string>"
- eg: -jar D:\Scripts\jenkins\slave.jar -jnlpUrl http://jenkinshost.example.com:8080/computer/buildNode1/slave-agent.jnlp -secret d6a84df1fc4f45ddc9c6ab34b08f13391983ffffffffffb3488b7d5ac77fbc7
- Click Next
- Next page of the wizard
- Click the check box "Open the Properties dialog for this task when I click Finish
- Click Finish
- First page of the wizard:
- Update the task's properties
- On the General tab
- Select the user to run the task as
- Select "Run whether use is logged on or not"
- On the settings tab
- Uncheck "Stop the task if it runs longer than"
- Check "Run the task as soon as possible after a scheduled start is missed"
- Check "If the task failed, restart every: 10 minutes", and "Attempt to restart up to: 3 times"
- Click OK
- On the General tab
- Open "Task Scheduler" on your windows machine
- Start the scheduled task and again check that Jenkins can connect
- Go back to the node's web page in Jenkins. If everything works then page should say "Connected via JNLP agent"
相关推荐
Linux环境下,Centos操作系统,Master机器安装了Jenkins,节点机Slave已做了关联,然后Slave机器关机后,开机然后jnlp连接不上了,如图: 解决排查办法: 方法1_普通执行java -jar agent.jar的命令来连接(失败) 1...
将此文件下载到要配置的Jenkins slave机器的Jenkins代理目录下
jenkins NE1 Start_jenkins slave自启动自检查
jenkins-slave镜像
jenkins节点管理window服务器段启动文件,通过java-Web启动代理
可以用于k8s的slave节点构建工具,也可以用作其他用处
jenkins-jnlp-slave镜像
DevOps tools introduce: jenkins: Jenkins是一个开源软件项目,是基于Java开发的一种持续集成工具,用于监控持续重复的工作,旨在提供一个开放易用的软件平台,使软件的持续集成变成可能。...container service
jenkins配置windows机器的从节点jenkins配置windows机器的从节点
jenkins直装版,windows版本
詹金斯奴隶 移至 使用JNLP的奴隶。 有关更多信息,请参见。 对于具有swarm插件的容器,请参见 跑步 运行Docker容器 docker run csanchez/jenkins-slave -url ...JENKINS_SLAVE_SERVICE_HOST和JEN
docker run --name my-jenkins-slave pcvolkmer/jenkins-slave-nodejs GitLab CI的其他用法 该映像可在提供OpenJDK 8和节点环境的使用。 这个示例.gitlab-ci.yml -file描述了一个基于.gitlab-ci.yml的简单构建: ...
这是在k8s中运行jenkins-slave的镜像内容,里面有Dockerfile以及所需要的资源、文件; 也可直接下载:docker pull fandaoshuai/jenkins-slave:v1.0
jenkins安装配置(windows).docx
这是在官网下载的 jenkins,支持windows 64位系统,安装简单
jenkins,windows安装包
码头工人詹金斯奴隶 用于 Eficode 的 Jenkins Slave 的 Docker 容器 用法: docker build -t 'eficode/jenkins-slave:snapshot' . docker push -t 'eficode/jenkins-slave:snapshot'
jenkins-windows64位版,实现自动化打包,自动上传,自动部署等功能
jdk1.8支持的最后一个版本jenkins,验证可用Jenkins 2.346.1 jenkins.msi jdk1.8支持的最后一个版本jenkins,验证可用Jenkins 2.346.1 jenkins.msi jdk1.8支持的最后一个版本jenkins,验证可用Jenkins 2.346.1 ...
windows系统下通过jenkins自动发布tomcat项目,实现项目的自动化部署