thank you for sharing your experiences, that was helpful On Saturday, December 12, 2020 at 7:47:50 PM UTC+1 [email protected] wrote:
> El lunes, 7 de diciembre de 2020 a las 16:12:10 UTC+1, [email protected] > escribió: > >> >> Hi! >> >> I am using Jenkins in Docker and I map a folder from local machine to the >> container's /var/jenkins_home to preserve JENKINS_HOME. >> >> There are two things I am wondering about, and maybe you can comment: >> >> 1. Can new Jenkins corrupt existing JENKINS_HOME? >> Let's assume I have Jenkins in version X running, I want to upgrade so I >> have built new image, with Jenkins version Y, same plugins - maybe updated >> during the image build >> >> Is it possible that when I restart Jenkins with new image with version Y, >> the existing JENKINS_HOME won't be compatible with new version? >> Is it possible that after restart JENKINS_HOME will be changed in a way >> that it won't be possible to use it again with version X - if I want to >> rollback for whatever reason? >> >> > It depends of your plugins installed, so it is possible you screw up your > Jenkins Home if you do not test your upgrade in a test instance, it is not > common but it could happens, thus is recommended to clone your Jenkins home > folder and test the upgrade before to make it on production. Also, take a > backup before to make the upgrade is mandatory. Rollback is not > supported, even though it could work, it is better to restore the backup > form the previous version. > > >> 2. What happens when two instances share JENKINS_HOME? >> I want to have a simple test environment - let's not discuss now if it's >> a good or bad approach :) - so next to a working Jenkins container I start >> another one in a quiet mode (no job will start), with a new image I want to >> try out >> The first idea is to copy original JENKINS_HOME and use this copy, but >> what if the home is very big and I do not have much space - how bad would >> running second Jenkins with JENKINS_HOME mapped to the same folder on a >> local host would be? (I haven't considered that option, but I was asked >> 'why') >> >> I know I can just run it and check, but I think there might be plenty of >> different cases that I will not see in my simple test, but maybe some of >> you have more experience or ran into issues before >> >> > Really bad idea, Jenkins keep changes in memory and write them to disk, so > if you have two instances running in the same Jenkins home and you change a > job in one of them the other does not know anything about his change, the > configuration is not read from disk on runtime, most of the configuration > is only read at start time and keep updated in memory. So two instances > running on the same Jenkins home is a random behaviour environment. > > > >> BR >> Ewelina >> > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/25e5a725-8dde-4d4c-8cc0-05b7b284cb1bn%40googlegroups.com.
