Looking for a tool to enable continuous integration and delivery of your application? Give Jenkins a try.
Jenkins is an open source automation server that has become a crucial component in the likes of Kubernetes and GitOps. Jenkins enables the continuous integration and delivery of software. Jenkins includes a number of plugins to help the automation of building and deploying your applications.
I want to walk you through the process of installing Jenkins on Ubuntu Server 18.04.
SEE: Hybrid cloud: A guide for IT pros (TechRepublic download)
What you'll need
The only things you'll need are a working instance of Ubuntu 18.04 and a user account with sudo privileges. With those in hand, let's make some automation magic.
Jenkins requires Java to function, but Jenkins won't work with just any release of Java. Here's how to install a version of Jenkins that will make the installation and usage of Jenkins possible:
- Open a terminal window on your Ubuntu server.
- Issue the command sudo apt install default-jdk-headless.
- Allow the installation to complete.
Note: The above installation can take some time, so be patient.
To verify Java has been installed, issue the command:
You should see that Java has, indeed, been installed (Figure A).
How to install Jenkins
Next we install Jenkins. Go back to your terminal window and follow these steps:
- Download and install the necessary GPG key with the command wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -.
- Add the necessary repository with the command sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'.
- Add the universe repository with the command sudo add-apt-repository universe.
- Update apt with the command sudo apt-get update.
- Install Jenkins with the command sudo apt-get install jenkins -y.
- Allow the installation to complete.
How to access Jenkins
Open a web browser and point it to http://SERVER_IP:8080 (where SERVER_IP is the IP address of the hosting server). You will then be prompted to copy and paste a password that was created during the Jenkins installation. To retrieve that password, go back to the terminal window and issue the command:
sudo less /var/lib/jenkins/secrets/initialAdminPassword
Paste that password into the required field (Figure B) and click Continue.
Once you've unlocked Jenkins, you can then finish the installation by either installing the suggested plugins or installing only the plugins you want (Figure C).
I suggest clicking the Install Suggested Plugins button and allow Jenkins to do its thing. You can then install other plugins at a later time. When the plugin installation completes, you will then be prompted to create an admin user (Figure D).
Fill out the necessary information for the admin user and click Save And Continue. You will then be shown the Jenkins URL. Click Finish and you're ready to start using Jenkins.
Congratulations, you now have an incredibly powerful automation platform at the ready.
- Multicloud: A cheat sheet (TechRepublic)
- Serverless computing: A guide for IT leaders (TechRepublic Premium)
- How to scan your Docker installment with docker-bench-test (TechRepublic)
- How to install Nextcloud 16 on Ubuntu 18.04 (TechRepublic)
- How to get a single-node Kubernetes deployment up in seconds (TechRepublic)
- How to install a Kubernetes cluster on CentOS 7 (TechRepublic)
- Security flaws in 100+ Jenkins plugins put enterprise networks at risk (ZDNet)
- Top cloud providers 2019: AWS, Microsoft, Azure, Google Cloud; IBM makes hybrid move; Salesforce dominates SaaS (ZDNet)
- Best cloud services for small businesses (CNET)
- Microsoft Office vs Google Docs Suite vs LibreOffice (Download.com)
- Cloud computing: More must-read coverage (TechRepublic on Flipboard)