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

Problem with installing plugins in an airgapped install #867

Open
TueDissingWork opened this issue Jun 29, 2023 · 9 comments
Open

Problem with installing plugins in an airgapped install #867

TueDissingWork opened this issue Jun 29, 2023 · 9 comments
Labels
enhancement New feature or request not-stale
Milestone

Comments

@TueDissingWork
Copy link

Describe the bug
When running in an air gapped environment, it isn't possible to install any plugins on demand. This is causing the startup of the Jenkins master to fail.

To Reproduce
Run the jenkins master in an air gapped environment without access to the Internet.

Additional information

Kubernetes version:
Tested on
minikube version: v1.30.1
commit: 08896fd1dc362c097c925146c4a0d0dac715ace0

Jenkins Operator version:
Image: virtuslab/jenkins-operator:v0.7.1

Is that any way to tell the operator not to touch the plugins? We will be adding all needed plugins (base and userspecific) within the used container image.

@TueDissingWork TueDissingWork added the bug Something isn't working label Jun 29, 2023
@brokenpip3
Copy link
Collaborator

No we do not have atm a way to avoid the plugin installation.

But it's something that should be implement to have jenkins images with pre-installed plugins to avoid network issues and airgapped contexts.

So yes I have in mind to add that support but not soon, around version 0.10

@brokenpip3 brokenpip3 added this to the 0.10 milestone Jul 1, 2023
@brokenpip3 brokenpip3 added enhancement New feature or request not-stale and removed bug Something isn't working labels Jul 1, 2023
@TueDissingWork
Copy link
Author

No we do not have atm a way to avoid the plugin installation.

But it's something that should be implement to have jenkins images with pre-installed plugins to avoid network issues and airgapped contexts.

So yes I have in mind to add that support but not soon, around version 0.10

Great to hear that this is on the roadmap.
Is there a task for this feature already and a preferred way/place to implement this? It could be a nice task to look further into during the summer.

@brokenpip3
Copy link
Collaborator

Is there a task for this feature already and a preferred way/place to implement this? It could be a nice task to look further into during the summer.

sorry I'm reading this only now, the way I'm thinking is:

  • if not base/user plugins defined do not create the startup script that will try to install plugins
  • double check during the reconciliation loop if at least we have the 5 basic plugins we need otherwise the operator flow will fail
  • add some bats tests around this feature

@yoshi314
Copy link

yoshi314 commented Dec 6, 2023

Personally, this is a major issue.

Whenever there is maintenance in my k8s cluster and jenkins redeploys - apparently jenkins plugins change dependencies and things break. Constantly.

I have to frequently bump dependencies of my user plugins since they decide to become incompatible with the versions i specified. It's highly annoying for developers when jenkins goes down every few days due to plugin incompatibilities.

Maybe i am doing something wrong here, but it's a very painful issue. Being able to simply package a collection of plugins with my deployment and upgrade at my leisure and not when plugin dependencies fall apart would be ideal.

Being able to use a local plugin repository would also be a good idea.

@brokenpip3 brokenpip3 changed the title Problem with installing plugins in an airgab'ed install Problem with installing plugins in an airgapped install Feb 7, 2024
@brokenpip3
Copy link
Collaborator

jenkins-infra/helpdesk#3930
we need to proper address this also because of this ^

@brokenpip3
Copy link
Collaborator

Maybe i am doing something wrong here, but it's a very painful issue. Being able to simply package a collection of plugins with my deployment and upgrade at my leisure and not when plugin dependencies fall apart would be ideal.

you can try with latestPlugin set to false:

latestPlugins: {{ .Values.jenkins.latestPlugins }}
and #797

@lemeurherve
Copy link
Member

lemeurherve commented Feb 7, 2024

@brokenpip3 could it help somehow? What is the image used by the operator? (Sorry I don't really know how this plugin works, that might be completely off topic)

As noted by @MarkEWaite, building your image with plugins integrated in it is far better than downloading them for each new instance.

You can take a look at how we're doing it for our own controller image there for example: https://github.com/jenkins-infra/docker-jenkins-weekly/blob/main/Dockerfile

Originally posted by @lemeurherve in jenkins-infra/helpdesk#3935 (comment)

@carvido1
Copy link

Hello.

I'm working on a project with similar needs. We require to run the jenkins kubernetes operator in an air gapped system where connection to internet is not available. We are considering doing a contribution where the plugins have to be downloaded and bundled with the jenkins controller container image. This is so far the possibility we have on the table.
Other options considered are the possibility to create a web proxy with local copies of the plugins, but this require extra effort and resources to run it.

@brokenpip3
Copy link
Collaborator

ehi @carvido1 if you want to take a stab be aware that there is already a PR open: #1065 that will require more changes, maybe you can work together with @LEDfan :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request not-stale
Projects
None yet
Development

No branches or pull requests

5 participants