开发者

Plugin to allow remote reboot of slave?

开发者 https://www.devze.com 2023-04-03 09:40 出处:网络
We have a a build farm, that ideally should have as part of it\'s configuration a nightly cronjob to reboot nodes (spread the reboots over the week).

We have a a build farm, that ideally should have as part of it's configuration a nightly cronjob to reboot nodes (spread the reboots over the week).

In the interim though, because I don't want to have to go and completely recreate every build farm node again (I mean I could... and eventually I will because of other needs) I was wondering if there's a Jenkins plugin somewhere that allows remote rebooting of a slave node from the UI.

I know that reboot requires sudo rights, just wondering if there was a nice remote "Nuke the slave from orbit" option anywhere.. ?

And yes, you can just tell me t开发者_StackOverflowo stop being lazy and go redo the images..


Create a job which creates a crontab which triggers a reboot. Have one for each node. Have the job ensure that crontab | grep -c reboot has $! of 0 .... (indicating a reboot has been scheduled as part of system crontab) or create the crontab to do this reboot.

If you want to get really fancy, you'd have a script which automatically marks the slave as offline and then touches a reboot-ready file, where the @weekly reboot-script checks the existence of said file (and removes it) and then does the reboot.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号