Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more labels to machines #934

Closed
gibfahn opened this issue Oct 22, 2017 · 6 comments
Closed

Add more labels to machines #934

gibfahn opened this issue Oct 22, 2017 · 6 comments

Comments

@gibfahn
Copy link
Member

gibfahn commented Oct 22, 2017

I've been thinking about this for a while, but @TimothyGu brought it up in #419 (comment), so it seems time

Is there a way to provide a list of acceptable nodes for Jenkins to choose from randomly (like a load balancer)?

There is a way, we're just not implementing it in our Jenkins instance.

What we do in our (IBM) Jenkins is define a bunch of labels for each machine, so ubuntu1610-x64 would have labels: x64 linux ubuntu ubuntu1610, that way you can just specify linux to get the next available linux (or whatever you want). However we don't currently do that in CI.

What would be ideal is something that autogenerates the labels when a machine connects. Something like this Plugin might be helpful, although that plugin in particular doesn't look like it'll give us all the labels we'd need.

We'd probably want:

  • Full label: ubuntu1610-x64
  • Arch: x64, ppc64, s390x
  • OS (kernel): linux, win, aix, darwin, freebsd, smartos
  • Distro: ubuntu: ubuntu, macos
  • Distro+version: ubuntu16.10, macos10.12

refack: fixed formating

@TimothyGu
Copy link
Member

Would it not be possible to label all machines manually? I assume the Jenkins would skip the currently offline machines while looking for a machine with such a label?

@refack
Copy link
Contributor

refack commented Oct 22, 2017

Would it not be possible to label all machines manually?

Possible but laborious (there are currently 150 machines), and error prone...
I'm looking into patching the PlatformLabel plugin...

@gibfahn
Copy link
Member Author

gibfahn commented Oct 22, 2017

Would it not be possible to label all machines manually?

We also don't currently automate the adding of a newly provisioned machine to Jenkins. If we had a script for that, we could add the labels there.

I assume the Jenkins would skip the currently offline machines while looking for a machine with such a label?

Correct

@refack
Copy link
Contributor

refack commented Oct 22, 2017

We also don't currently automate the adding of a newly provisioned machine to Jenkins. If we had a script for that, we could add the labels there.

There's a chicken&egg problem, we need to register the machine in J to get the secret, and we need to secret to ansible a machine. Maybe we need:

  1. add machine to inventory
  2. bootstrap.playbook (also useful for updates)
  3. inventory -> jenkins -> secret list
  4. setupJenkinsWorker.playbook

@gibfahn
Copy link
Member Author

gibfahn commented Oct 23, 2017

we need to register the machine in J to get the secret

This is the bit that needs automating. Hopefully there's an api equivalent to:

  • Log into ci.nodejs.org
  • Click the Create machine button
  • Download secret.

@Trott
Copy link
Member

Trott commented Mar 22, 2019

Closing due to long period of inactivity. Feel free to re-open if this is a thing. I'm just trying to close stuff that has been ignored for sufficiently long that it seems likely it's not something we're going to get to.

@Trott Trott closed this as completed Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants