Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker #196

Open
wants to merge 88 commits into
base: docker
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
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
6d9bb74
tomcat files
Dec 14, 2021
f65b59e
Jacoco version upgrade
devopshydclub Jan 2, 2023
37a93bc
Update site.yml
devopshydclub May 19, 2023
0be751f
Comments
devopshydclub May 19, 2023
809897e
hashing
devopshydclub May 19, 2023
ad28a9b
jdk tool update
devopshydclub May 19, 2023
bbb3959
jdk11 in requirments
devopshydclub May 19, 2023
536cc55
Update README.md
devopshydclub Jun 2, 2023
57bfd36
Update db_backup.sql
devopshydclub Jun 21, 2023
64d56f4
Update welcome.jsp
devopshydclub Jun 21, 2023
bce9eea
Add files via upload
devopshydclub Jun 21, 2023
8cbe90f
Add files via upload
devopshydclub Jun 21, 2023
4662b65
Update welcome.jsp
devopshydclub Jun 21, 2023
2e30e5c
Add files via upload
devopshydclub Jul 10, 2023
eea707b
Delete VprofileProjectSetupMacM1M2.pdf
devopshydclub Jul 10, 2023
4f26ae9
Create build.yml
devopshydclub Sep 12, 2023
84ed6ee
Delete .github/workflows/build.yml
devopshydclub Nov 5, 2023
b42b6f5
Create vprobuild.yml
devopshydclub Nov 5, 2023
1335757
Update vprobuild.yml
devopshydclub Nov 5, 2023
af688e9
Update vprobuild.yml
devopshydclub Nov 5, 2023
02b514c
Update vprobuild.yml
devopshydclub Nov 5, 2023
faf5c6f
Update vprobuild.yml
devopshydclub Nov 5, 2023
0715a33
Update vprobuild.yml
devopshydclub Nov 5, 2023
ec612f1
Update README.md
imnowdevops Nov 5, 2023
c24d43c
test code
hkhcoder Nov 9, 2023
8cdb300
test ssh
Nov 9, 2023
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
17 changes: 17 additions & 0 deletions .github/workflows/vprobuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build Workflow
on: workflow_dispatch
jobs:
first-job:
runs-on: ubuntu-latest
steps:
- name: Fetch Source coce
uses: actions/checkout@v4
- name: Build artifacts
run: |
mvn install
mv target/vprofile-v2.war .
rm -rf target
mkdir target
mv vprofile-v2.war target/
ls -l target/

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

agent any
/*
tools {
maven "maven3"

}
*/
environment {
NEXUS_VERSION = "nexus3"
NEXUS_PROTOCOL = "http"
NEXUS_URL = "172.31.40.209:8081"
NEXUS_REPOSITORY = "vprofile-release"
NEXUS_REPO_ID = "vprofile-release"
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 'sonarscanner4'
}

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("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: pom.groupId,
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";
}
}
}
}


}


}
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
## Prerequisites
- JDK 1.8 or later
# Prerequisites
###
- JDK 11
- Maven 3 or later
- MySQL 5.6 or later

## Technologies
# Technologies
- Spring MVC
- Spring Security
- Spring Data JPA
- Maven
- JSP
- MySQL
## Database
# Database
Here,we used Mysql DB
MSQL DB Installation Steps for Linux ubuntu 14.04:
- $ sudo apt-get update
Expand Down
3 changes: 3 additions & 0 deletions ansible/ansible.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[defaults]
host_key_checking = False
timeout = 30
5 changes: 5 additions & 0 deletions ansible/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- import_playbook: tomcat_setup.yml
- import_playbook: vpro-app-setup.yml

###
25 changes: 25 additions & 0 deletions ansible/templates/application.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#JDBC Configutation for Database Connection
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://dbhost:3306/accounts?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull
jdbc.username=db_user
jdbc.password=db_password

#Memcached Configuration For Active and StandBy Host
#For Active Host
memcached.active.host=127.0.0.1
memcached.active.port=11211
#For StandBy Host
memcached.standBy.host=127.0.0.2
memcached.standBy.port=11211

#RabbitMq Configuration
rabbitmq.address=18.220.62.126
rabbitmq.port=5672
rabbitmq.username=test
rabbitmq.password=test

#Elasticesearch Configuration
elasticsearch.host =192.168.1.85
elasticsearch.port =9300
elasticsearch.cluster=vprofile
elasticsearch.node=vprofilenode
38 changes: 38 additions & 0 deletions ansible/templates/epel6-svcfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop Tomcat server
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

start() {
sh /usr/local/tomcat8/bin/startup.sh
}

stop() {
sh /usr/local/tomcat8/bin/shutdown.sh
}

status() {
pid=$(ps -fe | grep '/usr/local/tomcat8' | grep -v grep | tr -s " " | cut -d" " -f2)
if [ -n "$pid" ]; then
echo -e "\e[00;32mTomcat is running with pid: $pid\e[00m"
else
echo -e "\e[00;31mTomcat is not running\e[00m"
fi
}

case $1 in
start|stop|status) $1;;
restart) stop; start;;
*) echo "Run as $0 "; exit 1;;
esac
exit 0


18 changes: 18 additions & 0 deletions ansible/templates/epel7-svcfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=Tomcat
After=network.target

[Service]
User=tomcat
WorkingDirectory=/usr/local/tomcat8
Environment=JRE_HOME=/usr/lib/jvm/jre
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_HOME=/usr/local/tomcat8
Environment=CATALINE_BASE=/usr/local/tomcat8
ExecStart=/usr/local/tomcat8/bin/catalina.sh run
ExecStop=/usr/local/tomcat8/bin/shutdown.sh
SyslogIdentifier=tomcat-%i

[Install]
WantedBy=multi-user.target

38 changes: 38 additions & 0 deletions ansible/templates/ubuntu14_15-svcfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/Stop Tomcat server
### END INIT INFO

PATH=/sbin:/bin:/usr/sbin:/usr/bin

start() {
sh /usr/local/tomcat8/bin/startup.sh
}

stop() {
sh /usr/local/tomcat8/bin/shutdown.sh
}

status() {
pid=$(ps -fe | grep '/usr/local/tomcat8' | grep -v grep | tr -s " " | cut -d" " -f2)
if [ -n "$pid" ]; then
echo -e "\e[00;32mTomcat is running with pid: $pid\e[00m"
else
echo -e "\e[00;31mTomcat is not running\e[00m"
fi
}

case $1 in
start|stop|status) $1;;
restart) stop; start;;
*) echo "Run as $0 "; exit 1;;
esac
exit 0


18 changes: 18 additions & 0 deletions ansible/templates/ubuntu16-svcfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=Tomcat
After=network.target

[Service]
User=tomcat
WorkingDirectory=/usr/local/tomcat8
Environment=JRE_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre
Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre
Environment=CATALINA_HOME=/usr/local/tomcat8
Environment=CATALINE_BASE=/usr/local/tomcat8
ExecStart=/usr/local/tomcat8/bin/catalina.sh run
ExecStop=/usr/local/tomcat8/bin/shutdown.sh
SyslogIdentifier=tomcat-%i

[Install]
WantedBy=multi-user.target

Loading