Learn how to install Jenkins CI to enhance your DevOps skills
Whether you're a software developer or a member of the operations team, if your organization embarks upon a DevOps journey, the first DevOps skill you need is how to use continuous integration tools. One of the most popular CI tools with widespread community support is Jenkins CI. Learn how to install Jenkins CI and run a simple build job.
The accompanying video shows you how to install Jenkins CI in a step-by-step manner, including the initial download of the jenkins.war file, how to run the embedded Jetty web container which hosts the CI application, where to access the Jenkins CI administrative console through the web browser and finally how to verify the integrity of the Jenkins installation.
To help clarify the installation process, here are a few guidelines to consider.
Install Jenkins CI on Java 8 or above
The minimum system requirement for the current version of Jenkins CI is Java 8. If you can use that version, rather than a more recent Java 9 or Java 10 release, your life will be made significantly easier.
When you install and run Jenkins using the embedded Jetty web container, which is the approach taken in this DevOps tutorial, there is a system check that parses the output of a version call to the running JDK. Because Java 9 and Java 10 changed the format of the message output from this version call, you may encounter a problem when you run Jenkins CI on those JDK versions. Until that bug gets addressed, run and install Jenkins CI on version 8 of the JDK to avoid such problems. It is recommended that the JAVA_HOME system variable be set to point to the folder in which the JDK was installed, and the bin directory of the JDK installation be added to the operating system's PATH variable.
Download the jenkins.war file
This tutorial works with the jenkins.war file which can be downloaded from jenkins.io. There are a number of Jenkins CI download options on that site, including ones for Windows, Mac OS X and even Docker. These download options perform peripheral, unnecessary steps such as registering Jenkins CI as a windows service or scheduling Jenkins CI to run as soon as the Docker engine is initialized. You don't need to complicate the task of installing Jenkins CI by downloading any of those other options. The generic jenkins.war file, with an embedded servlet engine, is the only file you need to download in order to install and run Jenkins CI.
How to start Jenkins CI
In this tutorial, we install Jenkins CI and start the instance from the command line interface. The windows command used to install, start and run Jenkins CI is as follows:
java -jar jenkins.war
This command needs to be run on the command line within the same folder in which the downloaded jenkins.war file resides. After you run this command, it will be possible to access the Jenkins CI administrative console from any modern web browser.
With those basic points in mind, you are now ready to watch the accompanying video tutorial on how to install Jenkins CI. It's a relatively straightforward process, but it's an important skill for any software developer or member of the operations team who is interested in enhancing their DevOps abilities.
Check out how to use Jenkins freestyle project to create CI builds.