Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
ba0cdf1
Junit and Mock Test Cases
wahid-nur-dahlan Aug 17, 2017
ff63a82
Junit Test Cases for Models
wahid-nur-dahlan Aug 17, 2017
8847690
Junit Test Cases for Models
wahid-nur-dahlan Aug 17, 2017
6c4904d
adding ansible playbook in vprofile-project
wahid-nur-dahlan Aug 24, 2017
2eae1a7
updated vprofile.yml file for version change
wkhanvisualpathit Aug 24, 2017
5f45b41
adding DB dump
wahid-nur-dahlan Aug 28, 2017
62e2988
Merge branch 'vp-ansible' of https://github.com/wkhanvisualpathit/VPr…
wahid-nur-dahlan Aug 28, 2017
17f57b7
removing db.sql dump file
wahid-nur-dahlan Sep 14, 2017
17572c0
adding ansible playbook in vprofile-project
wahid-nur-dahlan Aug 24, 2017
8aa189c
updated vprofile.yml file for version change
wkhanvisualpathit Aug 24, 2017
fd1099e
adding DB dump
wahid-nur-dahlan Aug 28, 2017
a5ef338
removing db.sql dump file
wahid-nur-dahlan Sep 14, 2017
1a116c7
Merge branch 'master' of https://github.com/wkhanvisualpathit/VProfile
wahid-nur-dahlan Sep 14, 2017
781b7c2
Updated README.md file for dump mention
wkhanvisualpathit Sep 14, 2017
02ff6c2
updated pom.xml for change of version
wkhanvisualpathit Sep 25, 2017
ad26e65
change for artefact version
wahid-nur-dahlan Sep 26, 2017
8aa5db5
change for artefact version
wahid-nur-dahlan Sep 26, 2017
0132cb8
rabbitmq integration with vprofile
Dec 3, 2017
139832b
pom modification for jacoco-cover plugin
Dec 3, 2017
90d850f
modification to conf
Dec 4, 2017
350655f
modifiying controller for test failure
Dec 4, 2017
51fd1dd
remove the target directory
Dec 4, 2017
df7b65e
Some UI changes is added
Dec 7, 2017
0950619
Merge branch 'vp-memcached-rabbitmq' of https://github.com/wkhanvisua…
Dec 7, 2017
4f44238
changing mysqldump file
Dec 7, 2017
142b00e
elasticsearch basic Integration
wkhanvisualpathit Dec 20, 2017
1e2033b
updating pom for plugin
wkhanvisualpathit Dec 20, 2017
d63a869
removing error from plugin sectiion
wkhanvisualpathit Dec 25, 2017
b423dcd
removing rabbit mq validations
wkhanvisualpathit Dec 25, 2017
219523c
Changes for spelling connections
wkhanvisualpathit Jan 11, 2018
9fb7f29
removing old dump file
wkhanvisualpathit Jan 25, 2018
90c10d3
updating dump file
wkhanvisualpathit Jan 30, 2018
8a5151a
Jenkinsfile
Jul 3, 2018
40c530b
Added tomcat deploy playbook for Ubuntu
Jul 17, 2018
9133e00
Update repo name as variable
imranteli Jul 17, 2018
b73fd6a
Corrected Syntax Error
imranteli Jul 17, 2018
944e545
syn error
imranteli Jul 17, 2018
8d08b00
update
imranteli Jul 17, 2018
d99479c
co
imranteli Jul 17, 2018
09f6b20
Checked syntax
imranteli Jul 17, 2018
e037019
cp -r updated
imranteli Jul 17, 2018
4d6d044
Changed task name
imranteli Jul 17, 2018
d326e3c
Check condition before copy
imranteli Jul 19, 2018
895a435
changed title
imranteli Aug 31, 2018
31a8f3a
Included backup
imranteli Sep 1, 2018
5b5aea9
disabled firewall
devopshydclub Jan 27, 2019
923d0b5
Changed to V2
devopshydclub Jan 27, 2019
d25db79
Updated Jenkinsfile
Jan 27, 2019
b895762
Jenkinsfile
Jan 27, 2019
f97662b
Jenkinsfile copy artifact included
Jan 27, 2019
0f67180
Jenkinsfile copy artifact included for staging job
Jan 27, 2019
9ce7514
changed version 3
Feb 6, 2019
07609fb
changed artifact name
devopshydclub May 3, 2019
fa60703
artifact path changed
devopshydclub May 3, 2019
bfbebc1
Updated Ansible Playbook
May 3, 2019
3da244c
Updated playbook
May 3, 2019
65ed5df
Updated ansible templates
May 3, 2019
b81463b
updated tomcat url
May 3, 2019
91dcc6b
updated tomcat url
May 3, 2019
9715b0c
fixed playbook syntax error
May 3, 2019
9c0e349
become=yes
May 3, 2019
3109567
changeg tomcat8 to tomcat svc name
May 3, 2019
5c3af72
removed variables from application.j2 template
May 3, 2019
935fb6e
remote_src:yes
May 3, 2019
02075eb
artifact destination download dir changed
May 3, 2019
dec07a2
artifact destination download dir changed
May 3, 2019
753036a
update ubuntu 18
May 3, 2019
c005105
systax error fixed in systemd file
May 3, 2019
2807adb
update tomcat start scripts
May 3, 2019
8f666e3
Update tags deploy
devopshydclub May 4, 2019
81d5df5
test commit
May 17, 2019
bbee545
Versioned with v4
devopshydclub Jul 2, 2019
491ce0d
Updated with nexus creds vars
devopshydclub Aug 4, 2019
4c8db86
<csrf disabled="true"/>
devopshydclub Aug 22, 2019
9d24b44
Version 4.0 updated
devopshydclub Nov 13, 2019
badb1f6
Updated Version
devopshydclub Dec 6, 2019
c103922
testing git polling log
devopshydclub Feb 20, 2020
18bd909
fixed jenkinsfile
devopshydclub May 21, 2020
a6743bf
fixed jenkinsfile job names
devopshydclub May 21, 2020
c931fcd
Testing git polling
devopshydclub May 22, 2020
6322f2f
Revert "fixed jenkinsfile job names"
devopshydclub Jun 29, 2020
cf1a527
test git polling
devopshydclub Jul 8, 2020
8eee031
Updated jenkisnfile with nexus and sonar jobs
Jul 23, 2020
24214f6
Testing new Jenkinsfile
Jul 23, 2020
9e071fc
updated artifact version
devopshydclub Jul 27, 2020
9eb847d
updated ansible template names
Jul 29, 2020
62ae78a
Merge branch 'vp-rem' of https://github.com/devopshydclub/vprofile-re…
Jul 29, 2020
b5610ce
updated tomcat svc filename
Jul 29, 2020
37831f3
Updated app file
devopshydclub Jul 30, 2020
c87ab54
changed rmq details in application.properties file
devopshydclub Jul 30, 2020
cf5c473
testing git poll from jenkins
devopshydclub Aug 19, 2020
d226355
removed vproapp
devopshydclub Sep 23, 2020
50e1614
Commented application.properties file deployment section
devopshydclub Sep 23, 2020
eb876ca
VPC setup playbook
imran78688 Oct 6, 2020
6f934b1
removed output file
imran78688 Oct 6, 2020
e89bfb7
terraform exercises
imran78688 Oct 8, 2020
034f880
terraform project code
imranvisualpath Oct 24, 2020
b127cb6
kube pipeline
imranvisualpath Nov 7, 2020
d4108fb
Templating for app image
imranvisualpath Nov 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM tomcat:8-jre11

RUN rm -rf /usr/local/tomcat/webapps/*

COPY target/vprofile-v2.war /usr/local/tomcat/webapps/ROOT.war

EXPOSE 8080
CMD ["catalina.sh", "run"]

110 changes: 110 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
pipeline {

agent any
/*
tools {
maven "maven3"
}
*/
environment {
registry = "imranvisualpath/vproappdock"
registryCredential = 'dockerhub'
}

stages{

stage('BUILD'){
steps {
sh 'mvn clean install -DskipTests'
}
post {
success {
echo 'Now Archiving...'
archiveArtifacts artifacts: '**/target/*.war'
}
}
}

stage('UNIT TEST'){
steps {
sh 'mvn test'
}
}

stage('INTEGRATION TEST'){
steps {
sh 'mvn verify -DskipUnitTests'
}
}

stage ('CODE ANALYSIS WITH CHECKSTYLE'){
steps {
sh 'mvn checkstyle:checkstyle'
}
post {
success {
echo 'Generated Analysis Result'
}
}
}


stage('Building image') {
steps{
script {
dockerImage = docker.build registry + ":$BUILD_NUMBER"
}
}
}

stage('Deploy Image') {
steps{
script {
docker.withRegistry( '', registryCredential ) {
dockerImage.push("$BUILD_NUMBER")
dockerImage.push('latest')
}
}
}
}

stage('Remove Unused docker image') {
steps{
sh "docker rmi $registry:$BUILD_NUMBER"
}
}

stage('CODE ANALYSIS with SONARQUBE') {

environment {
scannerHome = tool 'mysonarscanner4'
}

steps {
withSonarQubeEnv('sonar-pro') {
sh '''${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=vprofile \
-Dsonar.projectName=vprofile-repo \
-Dsonar.projectVersion=1.0 \
-Dsonar.sources=src/ \
-Dsonar.java.binaries=target/test-classes/com/visualpathit/account/controllerTest/ \
-Dsonar.junit.reportsPath=target/surefire-reports/ \
-Dsonar.jacoco.reportsPath=target/jacoco.exec \
-Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml'''
}

timeout(time: 10, unit: 'MINUTES') {
waitForQualityGate abortPipeline: true
}
}
}
stage('Kubernetes Deploy') {
agent { label 'KOPS' }
steps {
sh "helm upgrade --install --force vproifle-stack helm/vprofilecharts --set appimage=${registry}:${BUILD_NUMBER} --namespace prod"
}
}

}


}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ MSQL DB Installation Steps for Linux ubuntu 14.04:
- $ sudo apt-get install mysql-server

Then look for the file :
- /src/main/resources/db.sql

- db.sql file contents all step for DB table creation commands.
- /src/main/resources/accountsdb
- accountsdb.sql file is a mysql dump file.we have to import this dump to mysql db server
- > mysql -u <user_name> -p accounts < accountsdb.sql


Binary file added helm/charts/vprofilecharts-0.1.0.tgz
Binary file not shown.
23 changes: 23 additions & 0 deletions helm/charts/vprofilecharts/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
23 changes: 23 additions & 0 deletions helm/charts/vprofilecharts/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v2
name: vprofilecharts
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.16.0
8 changes: 8 additions & 0 deletions helm/charts/vprofilecharts/templates/app-secret.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: app-secret
type: Opaque
data:
db-pass: dnByb2RicGFzcw==
rmq-pass: dGVzdA==
12 changes: 12 additions & 0 deletions helm/charts/vprofilecharts/templates/db-CIP.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: vprodb
spec:
ports:
- port: 3306
targetPort: vprodb-port
protocol: TCP
selector:
app: vprodb
type: ClusterIP
12 changes: 12 additions & 0 deletions helm/charts/vprofilecharts/templates/mc-CIP.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: vprocache01
spec:
ports:
- port: 11211
targetPort: vpromc-port
protocol: TCP
selector:
app: vpromc
type: ClusterIP
22 changes: 22 additions & 0 deletions helm/charts/vprofilecharts/templates/mcdep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vpromc
labels:
app: vpromc
spec:
selector:
matchLabels:
app: vpromc
replicas: 1
template:
metadata:
labels:
app: vpromc
spec:
containers:
- name: vpromc
image: memcached
ports:
- name: vpromc-port
containerPort: 11211
12 changes: 12 additions & 0 deletions helm/charts/vprofilecharts/templates/rmq-CIP-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: vpromq01
spec:
ports:
- port: 15672
targetPort: vpromq01-port
protocol: TCP
selector:
app: vpromq01
type: ClusterIP
31 changes: 31 additions & 0 deletions helm/charts/vprofilecharts/templates/rmq-dep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vpromq01
labels:
app: vpromq01
spec:
selector:
matchLabels:
app: vpromq01
replicas: 1
template:
metadata:
labels:
app: vpromq01
spec:
containers:
- name: vpromq01
image: rabbitmq
ports:
- name: vpromq01-port
containerPort: 15672
env:
- name: RABBITMQ_DEFAULT_PASS
valueFrom:
secretKeyRef:
name: app-secret
key: rmq-pass
- name: RABBITMQ_DEFAULT_USER
value: "test"

12 changes: 12 additions & 0 deletions helm/charts/vprofilecharts/templates/vproapp-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: vproapp-service
spec:
ports:
- port: 80
targetPort: vproapp-port
protocol: TCP
selector:
app: vproapp
type: LoadBalancer
29 changes: 29 additions & 0 deletions helm/charts/vprofilecharts/templates/vproappdep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vproapp
labels:
app: vproapp
spec:
replicas: 1
selector:
matchLabels:
app: vproapp
template:
metadata:
labels:
app: vproapp
spec:
containers:
- name: vproapp
image: imranvisualpath/8pmtomappimg:v1
ports:
- name: vproapp-port
containerPort: 8080
initContainers:
- name: init-mydb
image: busybox
command: ['sh', '-c', 'until nslookup vprodb; do echo waiting for mydb; sleep 2; done;']
- name: init-memcache
image: busybox
command: ['sh', '-c', 'until nslookup vprocache01; do echo waiting for mydb; sleep 2; done;']
32 changes: 32 additions & 0 deletions helm/charts/vprofilecharts/templates/vprodbdep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vprodb
labels:
app: vprodb
spec:
selector:
matchLabels:
app: vprodb
replicas: 1
template:
metadata:
labels:
app: vprodb
spec:
containers:
- name: vprodb
image: imranvisualpath/8pmdbimg:v1
ports:
- name: vprodb-port
containerPort: 3306
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: app-secret
key: db-pass
# env:
# - name: MYSQL_ROOT_PASSWORD
# value: "vprodbpass"

Loading