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

[ci.jenkins.io][Infra-as-code] Define Job Configuration as code with JobDSL #3071

Open
dduportal opened this issue Jul 26, 2022 · 3 comments

Comments

@dduportal
Copy link
Contributor

Summary

Switch job configuration and management as code for ci.jenkins.io instead of manual management.

Why

There is no audit of which configuration changed was applied on the jobs on ci.jenkins.io. It's a concern for:

  • Security: no audit log, and a painful update process: an admin must manually change configuration (and eventually takes screenshots, trigger a re-scan, and validate
  • Maintenability: manually managing a Jenkins instance is not sustainable for ci.jenkins.io: we are 10 to 20 (maybe more 😱 ) admins, no planning, not centralized notification so anyone can break the instance at any moment without the other being even aware (or worse: concurent plugins upgrade \o/) (same problem as [ci.jenkins.io][Infra-as-code] Define Core and plugins as code in a custom built Docker Image #3070 )

Also, managing jobs configuration as code would allow us to remove the "job config" plugin which is known to slow down instances.

What

⚠️ Using job-dsl introduces the following challenges to be aware of:

@timja
Copy link
Member

timja commented Jul 26, 2022

Is there a reason to not move ci.jenkins.io to k8s?

@dduportal
Copy link
Contributor Author

Is there a reason to not move ci.jenkins.io to k8s?

When the AKS cluster was created (long time ago):

  • ci.jenkins.io was running Jenkins with the official Ubuntu package (no Docker, no casc). There were not enough Jenkins administration expertise to run it with container in production.
  • there was no instances providing the required 64 Gb of memory that the VM hosting ci.jenkins.io currently have + the I/O bandwidth.

Both these historical reasons are gone since months if not years:

  • Kubernetes is clearly better to manage Jenkins controllers in our context
  • AKS support instance of all shapes and size to support ci.jenkins.io
  • ci.jenkins now runs in a Docker container and already as part in JCasc (not all yet)

I don't see any reason not to move ci.jenkins.io to k8s honestly, only benefits:

  • Centralized management (not split between puppet and kube)
  • Reproductibility (easier to spawn a testing instance)
  • Ability to benefit from the jenkins-jobs system
  • Safer: centralized credentials in sops (e.g. with cloud vault and/or GPG, with private repository)
  • Migrating to k8s with a scratch new JENKINS_HOME would clearly removes a lot of transient issues due to years of using the same data volumes with tons of XML depercated or missing config files (a look at ci.jenkins.io logs clearly shows this).

There are 2 blocking points though:

@dduportal dduportal changed the title [ci.jenkins.io][Infra-as-code] Define Job Configuration as code [ci.jenkins.io][Infra-as-code] Define Job Configuration as code with JobDSL Jul 5, 2023
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

2 participants