This article is a mirror article of machine translation, please click here to jump to the original article.

View: 9942|Reply: 0

Jenkins (4) Add a Linux node and register it as a service

[Copy link]
Posted on 10/19/2021 9:49:29 AM | | | |
Jenkins supports remote construction and deployment, you only need to register the remote server as a Jenkins node, and you can send tasks to the remote server to execute tasks with a click of the Jenkins operation.

Review:

Jenkins briefly introduced
https://www.itsvse.com/thread-5702-1-1.html

Jenkins (1) Continuous integration, automation, and installation of Jenkins tutorials
https://www.itsvse.com/thread-9483-1-1.html

Jenkins (2) Windows Reset Password Tutorial
https://www.itsvse.com/thread-9608-1-1.html

Jenkins (3) Plugin image site acceleration
https://www.itsvse.com/thread-9658-1-1.html
Add nodes

Open the Jenkins system, click Manage Jenkins -> Manage Nodes and Clouds -> to create a new node, and follow the steps as shown below:



You only need to set the remote work directory according to your actual situation, and the rest will remain the default, as shown in the figure below:



Click the agent.jar link to download the file and upload it to the remote server/data/jenkinsTable of contents below. As shown below:



Register the node as a service and start it

We can start it directly with the following command:

However, once the server is restarted, the Jenkins Proxy Service (agent.jar) needs to be started manually, and we need to register the Jenkins Proxy Service as a service and start it with the system.

newly builtjenkins.servicefile, uploaded to/etc/systemd/systemBelow the table of contents, the script reads like this (Contains a stop command):

Enable the service and start it with the following command:



(End)





Previous:Sites stumbled upon
Next:Mysql grouped sorting
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com