Jenkins - offline, disconnect, delete
I learned a new Jenkins trick today. When managing worker nodes, this bit of information is useful.
There are three high level operations that relate to the communication between the Jenkins master and the worker nodes; mark offline, disconnect, and delete.
The high level difference between these three is as follows.
mark offline - stop taking new jobs and allows running jobs to complete.
disconnect - terminate running jobs, stops taking new jobs, and leaves the host online.
delete - shoots the node in the head.
As for background, we use Jenkins build pipelines hosted in AWS. This setup is pretty nice because it allows you to configure Jenkins to dynamically created worker instances as needed based on and AMI image id. We make new worker images frequently to update the functionality of the pipelines and add new configurations or utilities. I had been waiting for the build queues to clear out on the nodes before deleting them to be replaced by workers with the new AMI image. This new trick lets me offline the nodes and allow them to finish without running the risk of killing a node before the jobs are done or having to watch the console for a long time waiting for an opening to clean up.

0 Comments:
Post a Comment
<< Home