Hi Stephen. Thanks for responding with the suggestion. I would like to
incorporate it, but I'm not familiar with the Node Iterator API Plugin. I
see that you are the creator of the project. How do I use it?
>From looking at the source code, it looks like I would just change the loop
in my script.
for (node in NodeIterator.nodes(hudson.plugins.ec2.EC2OndemandSlave.class))
{
node.terminate()
}
Where does the key come in? And, how does this change the operation of the
script?
David
On Wednesday, January 29, 2014 9:18:32 AM UTC-6, Stephen Connolly wrote:
>
> Ideally what you would do is set a tag with a known key, such as
> OwningJenkinsUrl to the Jenkins root URL.
>
> Then a periodic task would run every 15-20 minutes in Jenkins that
> iterates through all the EC2 resources tagged with that key:value pair.
> Then use the
> https://wiki.jenkins-ci.org/display/JENKINS/Node+Iterator+API+Plugin to
> iterate through all the nodes attached to your Jenkins instance (including
> those that are not actually defined as Nodes... which is the real purpose
> of this API... e.g. if somebody has a trick way of turning a slave into a
> resource, they should be using the Node Iterator API to let people still
> find it as a slave even if jenkins doesn't see it as such)... any nodes
> that are not active on Jenkins can be killed.
>
> That would give you a nice safe tidy-up of runaway nodes... at least once
> Jenkins comes back up.
>
>
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.