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

Symlink plugins instead of copying them #49

Merged
merged 1 commit into from
Dec 10, 2018
Merged

Conversation

chmouel
Copy link

@chmouel chmouel commented Dec 3, 2018

hrishin added a commit to hrishin/openshift-jenkins-s2i-config that referenced this pull request Dec 4, 2018
@chmouel chmouel force-pushed the chmouel-symlink-plugin branch from 78ad6bc to a8e6c6e Compare December 4, 2018 16:52
We want to save some space on gluster mount and we want to use more on the image
instead which is volatile.

In a nutshell this is what we do :

- We uncompress the jpi/hpi in the image directly.
- We symlinks the hpi and jpi into /var/lib/jenkins/plugins at (*every*) boot time
- We symlinks the /var/lib/jenkins/plugins/${PLUGIN_NAME}/WEB-INF
- We let jenkins do its magic for the other files.

Now there is one caveat here, to let it does its magic, jenkins does a bunch of
things to uncompress and update stuff and that's not a behavior that it seems
possible to disable.

So we let jenkins do that at the first boot which will have a 215mb for the
jenkins plugins. On the next reboot we will overwrite all of the WEB-INF (which
is the dirs will the contents) with the one from the image.

Jenkins is fooled and we are down 29mb for /var/lib/jenkins/plugins

Since we are using plugins from the image we should be okay with updates (to be
checked).
@chmouel chmouel force-pushed the chmouel-symlink-plugin branch from a8e6c6e to ba4dd68 Compare December 4, 2018 17:14
@chmouel chmouel requested a review from hrishin December 5, 2018 09:42
Copy link

@hrishin hrishin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants