You are currently viewing How To Install Jenkins In AWS EC2 Instance

How To Install Jenkins In AWS EC2 Instance

How to install Jenkins in AWS EC2 instance

Hello Everyone

Welcome to CloudAffaire and this is Debjeet.

In this series, we will explore one of the most popular CI/CD tool Jenkins. We will try to cover each aspect of Jenkins with a demo.

What is Jenkins?

Jenkins is a self-contained, open-source automation server which can be used to automate all sorts of tasks related to building, testing, and delivering or deploying software.

Components of Jenkins:

  • Master Node: The system where you install and run Jenkins.
  • Managed Node: Target systems managed by Jenkins.
  • Repository: Version controlled system where you keep your code.
  • UI: User interface to manage and configure Jenkins.
  • Pipeline: Means of continuous deployment of your code to target systems from the version control system.
  • Plugins: Means of enhancing the functionality of a Jenkins.

Next, we are going to learn how to install Jenkins.

Jenkins Installation:

Prerequisite:

  • One EC2 Amazon Linux 2 instance with internet access
  • Java 8 runtime environments

There are several ways you can install Jenkins in your master node (EC2 instance in our case).

  • Using Docker
  • Using Yum
  • Using a War file

I would prefer the 1st method, using docker which comes with blue ocean plugin preinstalled and this will be used in rest of the Jenkins blog series.

Using docker:

Using Yum:

Using a WAR file:

Jenkins Configuration:

Step 1: Open your EC2 instance public DNS or public IP (http://<PUBLIC_DNS/PUBLIC_IP>:8080/) along with port 8080 in your favorite browser. And provide the administrative password obtained during the installation.

How To Install Jenkins In AWS EC2 Instance

Step 2: Click ‘Install suggested plugins’.

How To Install Jenkins In AWS EC2 Instance

Step 3: Create an administrative user.

How To Install Jenkins In AWS EC2 Instance

Step 4: Our Jenkins configuration completed, click ‘Start using Jenkins’ to open the Jenkins UI.

How To Install Jenkins In AWS EC2 Instance

Hope you have enjoyed this article. To install Jenkins on another platform, you can refer below Jenkins documentation

https://jenkins.io/doc/book/installing/

To get more details on Jenkins, please refer to Jenkins documentation.

https://www.jenkins.io/doc/

This Post Has 2 Comments

  1. Avatar
    josh

    How can I update the jenkins.war file on the Jenkins remote server? By clicking on “download” the new version of Jenkins, I get a .war file on my local computer but I need to update the remote server that is hosted on ec2 aws

    1. Avatar
      Jayas

      ssh into your ec2 instance and update from there

Leave a Reply