Skip to content

cloudtechmasters/hellospringboot-cicdWithHelm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello Springboot deployment using CICD Pipeline with helm

Pre-requisites:

- Install Java
- Install Git
- Install Maven
- Install Docker
- Install Jenkins
- Install Helm
- EKS Cluster

Install Java:

yum install java-1.8.0-openjdk-devel -y

Install Git:

yum install git -y

Install Apache-Maven:

wget https://mirrors.estointernet.in/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar xvzf apache-maven-3.6.3-bin.tar.gz

vi /etc/profile.d/maven.sh
--------------------------------------------
export MAVEN_HOME=/opt/apache-maven-3.6.3
export PATH=$PATH:$MAVEN_HOME/bin
--------------------------------------------

source /etc/profile.d/maven.sh
mvn -version

Install Jenkins

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum install jenkins
service jenkins start

Install Docker:

yum install docker -y
service docker start
usermod -aG docker jenkins

Jnekins Restart

service jenkins restart

Provide sudo permissions for jenkins user

vi /etc/sudoers

image

Install helm

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh

Goto Jenkins and add plugins

jenkins --> Manage Jenkins --> Available
- CloudBees AWS Credentials
- Kubernetes Credentials
- Kubernetes Continuous Deploy

Create Credentials

- docker credentials
         (credentialsId: 'docker_credentials',  username: 'username', password: 'password')
- kubernetes config credentials
         (credentialsId: 'kube_config', variable: 'KUBECONFIG')
- aws configure credentials
         (accessKeyVariable: 'AWS_ACCESS_KEY_ID', credentialsId: 'aws_configure', secretKeyVariable: 'AWS_SECRET_ACCESS_KEY')

Create Github webhook

image image

And one more step we need to do in Github

image

Add JenkinsFile Content inside pipeline section

image

Now we can try by change anything inside Github

Check output of application --> :8080/hello

    http://a66329da6d1804b61bdf5318a40ce772-1936783521.us-east-1.elb.amazonaws.com:8080/hello

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published