how to upgrade Jenkins if you don't have internet connectivity on VM?

·       Prerequisites:
  •      Take backup of all the jobs available in Virtual machine or take a snapshot of VM.
  •      For taking Backup manually go to the path: C:\Program Files (x86)\Jenkins
  •      Stop the running jenkins service on local.
  • ·        Copy all the Files and save it in another folder named Backup.

  Steps to Upgrade Jenkins:

1.     Identify Current Jenkins Version on https://jenkins.io/
2.     Make sure the version must be LTS (Long term Support). Recently we have Jenkins 2.32.1 (LTS).
3.     Download the Version and keep it in Download folder. For Windows we are using .msi installer for Jenkins upgrade.
4.     Here is the link for windows installer: http://mirrors.jenkins.io/windows/
5.     Download the Zip file and Extract it.
6.     Go to the .exe file and start the setup. Click on Run.
1.     Click on Next and Select the Destination Folder where Jenkins is already setup.
2.     Then Click on Next and Install.
1.     Setup will Finish and it will redirect to the same Jenkins URL: http://localhost:8080/
2.     Now we can see all the Jobs and plugins are restored.

Additional Post Upgrade Tasks

     When you go to “Manage Jenkins”, depending on your previous Jenkins version that you were running, you might also see this message: You have data stored in an older format and/or unreadable data.
1.     Just Click on Manage. You will be redirected to the below Page. Click on Upgrade.



Upgrade Jenkins Plugins (After Jenkins Upgrade)


So as shown in above we have so many dependancies on Jenkins Plugins. To update required jenkins plugins we will follow following approach:
Install Jenkins and add required plugins on a network-attached computer. Make an archive of the Jenkins Plugins directory structure and transfer it to the offline machine.
Steps to update Jenkins as given below:
1.     Install previous version of Jenkins on network-attached computer. And install all plugins which are available in your old Jenkins environment.
2.     Update the Jenkins version using above steps.
Once Jenkins is up check it will show the Plugins dependencies.

1.     Click on correct. It will take you to manage Jenkins plugins. In that it will list all the plugins with latest versions.

Download and install all the plugins and restart the Jenkins. Once again check is there any plugins Dependency.
1.     Finally on same network-attached computer go to Jenkins Directory C:\Program Files (x86)\Jenkins\plugins
Copy all the .jpi files.

1.     Replace all these files in file path C:\Program Files (x86)\Jenkins\plugins where Jenkins is updated.
2.     Restart the Jenkins Service.

Once Jenkins is Up we can see there is no dependancy as well as update is available.

Finally, You Upgraded the Jenkins with latest version and Plugins.















Comments

Popular posts from this blog

Consider a monolithic java application stack. Apache Web Server, Apache Tomcat application server with Active MQ and Oracle and MongoDB backend. Propose a solution to migrate this application stack to AWS. Mention all the AWS services you would use and how you would maintain HA and Load Balancing (consider app to be stateless). Mention rationale for each design decision.

Write a Dockerfile (CentOS 6) to install the following in a Docker continer: Python 2.7 MongoDB - any version Apache tomcat 7 - running on port 8080