CI/CD

Rahul
2 min readAug 4, 2020

Jenkins should be able to pull the code and build and then jenkins would be able to deploy it on the target server.

In this EC2 instance which is running with Tomcat as our target server.

1. Install Jenkins on cloud

Prerequisites

  1. EC2 Instance
  • With Internet Access
  • Security Group with Port 8080 open for internet

Java v1.8.x

2. Configure Git plugin on Jenkins

(i) Login as admin on jenkins server and install git on it.

(ii) Setup Git on jenkins console

3.Install & configure Maven build tool on Jenkins

— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —

Deploy to a docker container using jenkins

Jenkins has some limitations while deploying that is why we will use ansible(as shown below)

So basically jenkins builds and deploys a war file on Docker container using ansible

So basically jenkins build only and ansible deploys it to the docker container

Deploy to a docker container using ansible
Deploy to kubernetes using ansible

https://www.udemy.com/course/valaxy-devops/learn/lecture/15776480#questions

--

--