[Gluster-infra] Require access to reboot slaves in Jenkins
Niels de Vos
ndevos at redhat.com
Wed Jan 7 11:55:03 UTC 2015
On Wed, Jan 07, 2015 at 10:50:53AM +0100, Niels de Vos wrote:
> On Tue, Jan 06, 2015 at 11:32:29AM -0500, Shyam wrote:
> > At times some slaves are offline or get into a state where the Jenkins agent
> > just does not start. This situation seems to require a reboot of the slave,
> > for which we/I need to contact one of the super-admins.
> > This request it to provide the required access, so that I do not have to
> > bother others for such problems :)
> I would like to have a Jenkins job that takes a hostname of a slave and
> reboots that. The Rackspace API should allow that pretty easily:
> - http://docs.rackspace.com/servers/api/v2/cs-gettingstarted/content/summary_server_actions.html
> I'll have a stab at that and see what I can get done.
> Does anyone have a suggestion on how to protect the username/apikey so
> that is is not listed in the Jenkins script?
This actually seems to be pretty easy to do. It should now be possible
to reboot a VM through this Jenkins job:
It has a list of VMs that can be configured in the job's configuration
screen (not sure if everyone can add/modify jobs?).
The script lives on build.gluster.org as /usr/local/bin/reboot-vm.py.
Jenkins needs to execute this as root (sudo), so that the credentials
can be read from /etc/rax-reboot.conf. This file is actually a symlink
to ~ndevos/conf.d/rax-reboot.conf to make clear who is responsible for
I'd like the following changes if possible, but it is not something I
can do myself:
- have a Rackspace Cloud user that can only reboot with its API key,
and only reboot certain VMs, not all of them.
- build.gluster.org is the only server that can now reboot VMs with this
job. A more generic Jenkins job would be nice, but I have no idea how
to set that up (securely).
- I'd like to put the script and example config file in a repository so
that others can use/enhance it. Which git repository would be most
More information about the Gluster-infra