Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 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
203d92d
added docker file and changes to application.properties
wahid-nur-dahlan Sep 19, 2017
c09ab9d
change username and password in application.properties
wkhanvisualpathit Sep 19, 2017
e9e5bec
chage directory name
wahid-nur-dahlan Sep 19, 2017
0783e5b
added Docker-db Docker file and accountsdb.sql
wahid-nur-dahlan Sep 19, 2017
a1ba3df
Adding changes to Docker-db Dockerfile
wahid-nur-dahlan Sep 20, 2017
5c121ca
Removing Artifact version
wahid-nur-dahlan Sep 25, 2017
a94dac9
update pom.xml for artefact version remove
wkhanvisualpathit Sep 25, 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
f2139fd
adding artefact version
wkhanvisualpathit Sep 26, 2017
5c49ed8
adding the version in artefact
wahid-nur-dahlan Sep 26, 2017
5bc215e
updating dockerfile for artifact name chage
wahid-nur-dahlan Nov 4, 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
3754d92
Merged from search branch and added dockerfiles for db,app and nginx.…
Jan 25, 2018
6bbe5eb
added compose file
Jan 25, 2018
65fac59
latest db file
Sep 9, 2018
4d876d3
imageversion changes fixed
May 2, 2019
0d09418
vprofile kubernetes definitions
devopshydclub May 2, 2019
f7c9f1e
memcache kubernetes definition
devopshydclub May 2, 2019
c86efa3
renamed dir to kubernetes
devopshydclub May 2, 2019
0d3a2a8
renamed to vprocache01 & 02
devopshydclub May 2, 2019
3c8b258
vpro-app kube files
Sep 1, 2019
7be5cad
updated with init containers
Sep 2, 2019
15d6d26
updated docker-compose with rmq & memcache
May 21, 2020
8dd2dd8
helm updated
May 22, 2020
e6c5208
updated charts tree
May 22, 2020
a725b28
Deploying v7 version
devopshydclub May 23, 2020
725368d
updated port with 5672
devopshydclub Sep 11, 2020
fb2ae84
Updated rmq pass
devopshydclub Sep 11, 2020
18b9cbc
updated rmq username
devopshydclub Sep 11, 2020
6806422
version 2 updated
Sep 24, 2020
c6f6176
Changed artifact version to v2
Sep 24, 2020
e469548
changed rabbitmq port to 5672
Sep 24, 2020
81f8246
updated app prop & compose file with 15672 port
Sep 24, 2020
0d9d408
kube-app
imran78688 Oct 11, 2020
ca5dc48
updated vol & ports
imran78688 Oct 11, 2020
4c1971f
pom & settings changes to fetch art from nexus
imran78688 Oct 13, 2020
c01a43f
paac for kubeapp
imran78688 Oct 13, 2020
d81bafb
DOckerfile
imran78688 Oct 13, 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
11 changes: 11 additions & 0 deletions Docker-files/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM tomcat:8-jre11
LABEL "Project"="Vprofile"
LABEL "Author"="Imran"

RUN rm -rf /usr/local/tomcat/webapps/*
COPY target/vprofile-v2.war /usr/local/tomcat/webapps/ROOT.war

EXPOSE 8080
CMD ["catalina.sh", "run"]
WORKDIR /usr/local/tomcat/
VOLUME /usr/local/tomcat/webapps
Empty file added Docker-files/d.txt
Empty file.
9 changes: 9 additions & 0 deletions Docker-files/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM mysql:5.7.25
LABEL "Project"="Vprofile"
LABEL "Author"="Imran"

ENV MYSQL_ROOT_PASSWORD="vprodbpass"
ENV MYSQL_DATABASE="accounts"


ADD db_backup.sql docker-entrypoint-initdb.d/db_backup.sql
121 changes: 121 additions & 0 deletions Docker-files/db/db_backup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
-- MySQL dump 10.13 Distrib 5.7.18, for Linux (x86_64)
--
-- Host: localhost Database: accounts
-- ------------------------------------------------------
-- Server version 5.7.18-0ubuntu0.16.10.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `role`
--

DROP TABLE IF EXISTS `role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `role`
--

LOCK TABLES `role` WRITE;
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
INSERT INTO `role` VALUES (1,'ROLE_USER');
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user`
--

DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) DEFAULT NULL,
`userEmail` varchar(255) DEFAULT NULL,
`profileImg` varchar(255) DEFAULT NULL,
`profileImgPath` varchar(255) DEFAULT NULL,
`dateOfBirth` varchar(255) DEFAULT NULL,
`fatherName` varchar(255) DEFAULT NULL,
`motherName` varchar(255) DEFAULT NULL,
`gender` varchar(255) DEFAULT NULL,
`maritalStatus` varchar(255) DEFAULT NULL,
`permanentAddress` varchar(255) DEFAULT NULL,
`tempAddress` varchar(255) DEFAULT NULL,
`primaryOccupation` varchar(255) DEFAULT NULL,
`secondaryOccupation` varchar(255) DEFAULT NULL,
`skills` varchar(255) DEFAULT NULL,
`phoneNumber` varchar(255) DEFAULT NULL,
`secondaryPhoneNumber` varchar(255) DEFAULT NULL,
`nationality` varchar(255) DEFAULT NULL,
`language` varchar(255) DEFAULT NULL,
`workingExperience` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user`
--

LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES (7,'admin_vp','admin@visualpathit.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$11$0a7VdTr4rfCQqtsvpng6GuJnzUmQ7gZiHXgzGPgm5hkRa3avXgBLK'),(8,'WahidKhan','wahid.khan74@gmail.com',NULL,NULL,'28/03/1994','M Khan','R Khan','male','unMarried','Ameerpet,Hyderabad','Ameerpet,Hyderabad','Software Engineer','Software Engineer','Java HTML CSS ','8888888888','8888888888','Indian','english','2 ','$2a$11$UgG9TkHcgl02LxlqxRHYhOf7Xv4CxFmFEgS0FpUdk42OeslI.6JAW'),(9,'Gayatri','gayatri@gmail.com',NULL,NULL,'20/06/1993','K','L','male','unMarried','Ameerpet,Hyderabad','Ameerpet,Hyderabad','Software Engineer','Software Engineer','Java HTML CSS ','9999999999','9999999999','India','english','5','$2a$11$gwvsvUrFU.YirMM1Yb7NweFudLUM91AzH5BDFnhkNzfzpjG.FplYO'),(10,'WahidKhan2','wahid.khan741@gmail.com',NULL,NULL,'28/03/1994','M Khan','R Khan','male','unMarried','Ameerpet,Hyderabad','Ameerpet,Hyderabad','Software Engineer','Software Engineer','Java HTML CSS ','7777777777','777777777','India','english','7','$2a$11$6oZEgfGGQAH23EaXLVZ2WOSKxcEJFnBSw2N2aghab0s2kcxSQwjhC'),(11,'KiranKumar','kiran@gmail.com',NULL,NULL,'8/12/1993','K K','RK','male','unMarried','California','James Street','Software Engineer','Software Engineer','Java HTML CSS ','1010101010','1010101010','India','english','10','$2a$11$EXwpna1MlFFlKW5ut1iVi.AoeIulkPPmcOHFO8pOoQt1IYU9COU0m'),(12,'Saikumar','sai@gmail.com',NULL,NULL,'20/06/1993','Sai RK','Sai AK','male','unMarried','California','US','Software Engineer','Software Engineer','Java HTML CSS AWS','8888888111','8888888111','India','english','8','$2a$11$pzWNzzR.HUkHzz2zhAgqOeCl0WaTgY33NxxJ7n0l.rnEqjB9JO7vy'),(13,'RamSai','ram@gmail.com',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$2a$11$6BSmYPrT8I8b9yHmx.uTRu/QxnQM2vhZYQa8mR33aReWA4WFihyGK');
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user_role`
--

DROP TABLE IF EXISTS `user_role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_role` (
`user_id` int(11) NOT NULL,
`role_id` int(11) NOT NULL,
PRIMARY KEY (`user_id`,`role_id`),
KEY `fk_user_role_roleid_idx` (`role_id`),
CONSTRAINT `fk_user_role_roleid` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fk_user_role_userid` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user_role`
--

LOCK TABLES `user_role` WRITE;
/*!40000 ALTER TABLE `user_role` DISABLE KEYS */;
INSERT INTO `user_role` VALUES (4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1);
/*!40000 ALTER TABLE `user_role` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2017-12-07 16:32:31
6 changes: 6 additions & 0 deletions Docker-files/web/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM nginx
LABEL "Project"="Vprofile"
LABEL "Author"="Imran"

RUN rm -rf /etc/nginx/conf.d/default.conf
COPY nginvproapp.conf /etc/nginx/conf.d/vproapp.conf
9 changes: 9 additions & 0 deletions Docker-files/web/nginvproapp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
upstream vproapp {
server vproapp:8080;
}
server {
listen 80;
location / {
proxy_pass http://vproapp;
}
}
121 changes: 121 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
pipeline {

agent any
/*
tools {
maven "maven3"
}
*/
environment {
NEXUS_VERSION = "nexus3"
NEXUS_PROTOCOL = "http"
NEXUS_URL = "172.31.7.37:8081"
NEXUS_REPOSITORY = "vprofile-release"
NEXUS_REPOGRP_ID = "vprofile-grp-repo"
NEXUS_CREDENTIAL_ID = "nexuslogin"
ARTVERSION = "${env.BUILD_ID}"
}

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('CODE ANALYSIS with SONARQUBE') {

environment {
scannerHome = tool 'sonar4.4.0.2170'
}

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: 5, unit: 'MINUTES') {
waitForQualityGate abortPipeline: true
}
}
}

stage("Publish to Nexus Repository Manager") {
steps {
script {
pom = readMavenPom file: "pom.xml";
filesByGlob = findFiles(glob: "target/*.${pom.packaging}");
echo "${filesByGlob[0].name} ${filesByGlob[0].path} ${filesByGlob[0].directory} ${filesByGlob[0].length} ${filesByGlob[0].lastModified}"
artifactPath = filesByGlob[0].path;
artifactExists = fileExists artifactPath;
if(artifactExists) {
echo "*** File: ${artifactPath}, group: ${pom.groupId}, packaging: ${pom.packaging}, version ${pom.version} ARTVERSION";
nexusArtifactUploader(
nexusVersion: NEXUS_VERSION,
protocol: NEXUS_PROTOCOL,
nexusUrl: NEXUS_URL,
groupId: NEXUS_REPOGRP_ID,
version: ARTVERSION,
repository: NEXUS_REPOSITORY,
credentialsId: NEXUS_CREDENTIAL_ID,
artifacts: [
[artifactId: pom.artifactId,
classifier: '',
file: artifactPath,
type: pom.packaging],
[artifactId: pom.artifactId,
classifier: '',
file: "pom.xml",
type: "pom"]
]
);
}
else {
error "*** File: ${artifactPath}, could not be found";
}
}
}
}


}


}
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


36 changes: 36 additions & 0 deletions compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: '3'
services:
vpronginx:
image: visualpath/vpronginx
ports:
- "80:80"

vproapp:
image: imranvisualpath/vproappfix
ports:
- "8080:8080"

vprocache01:
image: memcached
ports:
- "11211:11211"

vpromq01:
image: rabbitmq
ports:
- "15672:15672"
environment:
- RABBITMQ_DEFAULT_USER=guest
- RABBITMQ_DEFAULT_PASS=guest

vprodb:
image: imranvisualpath/vprdbfix
ports:
- "3306:3306"
volumes:
- vprodbdata:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=vprodbpass

volumes:
vprodbdata: {}
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==
Loading