Posts

Showing posts from November, 2022

How to Install Jenkins on EC2 Instance:

Image
  Install Jenkins on Ubuntu 18.0.4 | Setup Jenkins on AWS EC2 Ubuntu instance | How to setup Jenkins in Ubuntu EC2 instance? Jenkins is an open source continuous integration/continuous delivery and deployment (CI/CD) automation software DevOps tool written in the Java programming language. It is used  to implement CI/CD workflows, called pipelines . Please follow the steps to install Java, Jenkins, Maven on Ubuntu 18.0.4 instance. Jenkins, Maven are Java based applications, so we need to install Java first.  Change Host Name to Jenkins sudo hostnamectl set-hostname Jenkins Perform update first sudo apt update Install Java 11 sudo apt-get install default-jdk -y   Once install java, enter the below command Verify Java Version java -version Maven Installation Maven is a popular build tool used for building Java applications. Please  click  here to learn more about Maven. You can install Maven by executing below command: sudo apt install maven -y you can type  mvn --version you should see

Connecting to Jenkins EC2 instance

Image
How to connect to an EC2 instance from your local machine After successfully creating an EC2 instance, you would need to be able to connect to that instance somehow right?  follow the steps below: Pre-requistes: 1. Keys(for e.g., yourkey.pem) already downloaded in your local machine, preferably in Downloads folder. 2. EC2 instance is up and running 3. For windows laptop, you need to install Git by downloading from this URL -  https://git-scm.com/downloads . For Apple laptop you need to download iTerm from  here . Steps to connect to your EC2 instance: 1. Go to AWS console. 2. Click on EC2, click on running instances link 3. Select the checkbox of EC2 you would like to connect to. 4. Click on Connect or Action, Connect. Under SSH client.   Copy the url from SSH which looks like below: For e.g. ssh -i "mykey.pem" ubuntu@dns_name.compute.amazonaws.com Watch the steps in YouTube channel:  YOUTUBE VIDEO Windows Laptop instructions 5. Go to your local machine, Open Git Bash in Win

Setup AWS infrastructure

Image
Provision Ubuntu 18.0.4 EC2 Instance | How to create EC2 instance in AWS console | Launch Ubuntu 18.0.4 instance in AWS How to create EC2 instance in AWS console using new UI experience? What is EC2 instance?  It is virtual server provided by AWS. We will be using this EC2 to setup both Jenkins and Tomcat. Please follow the below steps to create an EC2 instance. https://www.youtube.com/watch?v=oqHfiRzxunY Steps: 1: Login to AWS console by clicking this link -->   https://aws.amazon.com/console/ click on All services, Click on Compute -->  Click on EC2 2. Click on Launch instance 3. Enter Name as EC2 and  enter 2 as number of instances (one for Jenkins and another for Tomcat) 4. Select Ubuntu and choose Ubuntu server 18.0.4 as AMI 5. Enter t2.small as instance type 6. Click on Create new Key Pair 7.  Choose the existing key pair if you have one,  otherwise create new one, give some name as  myJenkinsKey . Make sure you  download  the key in your local machine.   Please  do NOT giv