Skip to content

ankitnewjobs/Basic-Azure-Jenkins-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 

Repository files navigation

Basic-Azure-Jenkins-Example

Jenkins-Zero-To-Hero

Open the Git Bash

image

Creating the SSH Connection

$ ssh -i /c/Users/ankit/Desktop/test-vm_key.pem [email protected]

image

Install Jenkins.

Pre-Requisites:

  • Java (JDK)

Run the below commands to install Java and Jenkins

Install Java

sudo apt update
sudo apt install OpenJDK-11-jre

Verify Java is Installed

java -version

image

Now, you can proceed with installing Jenkins

curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins

image

**Note: ** By default, Jenkins will not be accessible to the external world due to AWS's inbound traffic restriction. Open port 8080 in the inbound traffic rules as shown below.

  • VM > Network Setting > Click on
  • Add Port Number 8080
    • Add inbound traffic rules as shown in the image (you can just allow TCP 8080 as well, in my case, I allowed All traffic).

image

Login to Jenkins using the below URL:

http://:8080 [You can get the -public-ip-address from your VM Overview page]

Note: If you are not interested in allowing All Traffic to your EC2 instance 1. Delete the inbound traffic rule for your instance 2. Edit the inbound traffic rule only to allow custom TCP port 8080

After you log in to Jenkins, - Run the command to copy the Jenkins Admin Password - sudo cat /var/lib/jenkins/secrets/initialAdminPassword - Enter the Administrator password

Screenshot 2023-02-01 at 10 56 25 AM

Click on Install suggested plugins

Screenshot 2023-02-01 at 10 58 40 AM

Wait for the Jenkins to Install suggested plugins

Screenshot 2023-02-01 at 10 59 31 AM

Create First Admin User or Skip the step [If you want to use this Jenkins instance for future use-cases as well, it is better to create an admin user]

Screenshot 2023-02-01 at 11 02 09 AM

Jenkins Installation is Successful. You can now starting using the Jenkins

Screenshot 2023-02-01 at 11 14 13 AM

About

This will guide you through the Jenkins Pipelines.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published