From 24dc9b9a2d8eee8177b73da2c0a9e1b5a3a97769 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:09:08 +0530
Subject: [PATCH 01/45] basic steps added
basic steps added
---
Jenkinsfile | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 Jenkinsfile
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..6b13264
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,34 @@
+pipeline {
+ agent any
+ tools {
+ maven 'maven'
+ //jdk 'java1.8.0'
+ }
+ stages {
+ stage('build') {
+ steps {
+ sh "mvn -B -DskipTests clean package"
+ }
+ }
+ stage('UnitTest') {
+ steps {
+ sh "mvn test"
+ }
+ post {
+ always {
+ junit 'target/surefire-reports/*.xml'
+ }
+ }
+ }
+ stage('Deploy') {
+ steps {
+ sh "java -jar target/spring-boot-parent*.war"
+ }
+ }
+ /* stage('publish') {
+ steps {
+ sh 'curl -X PUT -u admin:APB4oSbMxjG67dX7gZdt2oPHD4m -T target/my-app-1.0-SNAPSHOT.jar "http://52.42.121.49:8081/artifactory/libs-snapshot/spring-boot-parent.jar"'
+ }
+ }*/
+ }
+}
From 1956b52150dc1e47189fbc803103356270318dec Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:13:36 +0530
Subject: [PATCH 02/45] created basic docker file
created basic docker file
---
Dockerfile | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 Dockerfile
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..a36f8f2
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,20 @@
+# Start with a base image containing Java runtime
+FROM openjdk:8-jdk-alpine
+
+# Add Maintainer Info
+MAINTAINER venkatadri
+
+# Add a volume pointing to /tmp
+VOLUME /tmp
+
+# Make port 8080 available to the world outside this container
+EXPOSE 8080
+
+# The application's jar file
+ARG JAR_FILE=target/websocket-demo-0.0.1-SNAPSHOT.jar
+
+# Add the application's jar to the container
+ADD ${JAR_FILE} websocket-demo.jar
+
+# Run the jar file
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/websocket-demo.jar"]
From 0fb3ceb00720af538e4ff793942604da39651e07 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:16:37 +0530
Subject: [PATCH 03/45] docker file is created
docker file is created
---
Dockerfile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index a36f8f2..1dd7db6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -11,10 +11,10 @@ VOLUME /tmp
EXPOSE 8080
# The application's jar file
-ARG JAR_FILE=target/websocket-demo-0.0.1-SNAPSHOT.jar
+ARG JAR_FILE=target/easy-notes-1.0.0.jar
# Add the application's jar to the container
-ADD ${JAR_FILE} websocket-demo.jar
+ADD ${JAR_FILE} easy-notes-1.0.0.jar
# Run the jar file
-ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/websocket-demo.jar"]
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/easy-notes-1.0.0.jar"]
From 19dbe7fa43423890a4b76eb4cc2e9bb1eaf1fece Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:23:00 +0530
Subject: [PATCH 04/45] added the repository information
---
Jenkinsfile | 68 ++++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 60 insertions(+), 8 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 6b13264..5e44894 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,13 +1,23 @@
pipeline {
+ environment {
+ // SONAR_HOST_URL='http://54.68.58.133:9000/'
+ registry = 'venkatadri/springboot-notesapp'
+
+ //it shoud map to jenkins credentiala
+ registryCredential = 'dokerhubvenkat'
+ dockerImage = ''
+ containerId = sh(script: 'docker ps -aqf "name=notes-app"', returnStdout: true)
+ }
agent any
tools {
maven 'maven'
- //jdk 'java1.8.0'
}
+
stages {
- stage('build') {
+
+ stage('Build') {
steps {
- sh "mvn -B -DskipTests clean package"
+ sh "mvn clean package"
}
}
stage('UnitTest') {
@@ -20,15 +30,57 @@ pipeline {
}
}
}
- stage('Deploy') {
+ //commanted for time being
+ /*stage('StaticCode Analysis') {
steps {
- sh "java -jar target/spring-boot-parent*.war"
+ sh "mvn sonar:sonar -Dsonar.host.url=$SONAR_HOST_URL"
}
- }
- /* stage('publish') {
+ }*/
+
+ /* stage('cleanup') {
steps {
- sh 'curl -X PUT -u admin:APB4oSbMxjG67dX7gZdt2oPHD4m -T target/my-app-1.0-SNAPSHOT.jar "http://52.42.121.49:8081/artifactory/libs-snapshot/spring-boot-parent.jar"'
+ sh 'docker stop chat-app'
+ sh 'docker rm chat-app'
+ //sh 'docker rmi -f $registry'
}
}*/
+ stage('Building image') {
+ steps {
+ script {
+ //Buildnumber will act as tag for the image , if you want to access the image use venkatadri/springboot-notesapp:1
+ dockerImage = docker.build registry + ":$BUILD_NUMBER"
+ }
+ }
+ }
+
+ /* no need to enable it when you are using kubernetes (Application.ymal file)
+ stage('Run Container') {
+ steps {
+ sh 'docker run --name=chat-app -d -p 5000:8080 $registry:$BUILD_NUMBER &'
+ }
+ }*/
+ stage('push image') {
+ steps {
+ script {
+ docker.withRegistry('', registryCredential) {
+ dockerImage.push()
+ }
+ }
+ }
+ }
+ stage('Deploy the application') {
+ steps{
+ //Deploying the docker image as the service using kubernets cd plug in
+ //mehtod to deploy the ymal file
+ kubernetesDeploy(
+ kubeconfigId: 'kubeconfig',
+ configs: 'Application.yml',
+ enableConfigSubstitution: false
+ )
+ }
+
+
+
+ }
}
}
From da9a01c0098bb16c159e886fc9897f2bc83ed3d2 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:26:44 +0530
Subject: [PATCH 05/45] basic application.ymal created
---
Application.yml | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 Application.yml
diff --git a/Application.yml b/Application.yml
new file mode 100644
index 0000000..fdabed4
--- /dev/null
+++ b/Application.yml
@@ -0,0 +1,34 @@
+kind: Service
+apiVersion: extensions/v1beta1
+metadata:
+ name: notesApp
+ namespace: euc-ns
+spec:
+ selector:
+ app: notesApp
+ ports:
+ - protocol: TCP
+ port: 8080
+ type: NodePort
+---
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: notesApp
+ namespace: euc-ns
+spec:
+ selector:
+ matchLabels:
+ app: notesApp
+ replicas: 2
+ template:
+ metadata:
+ labels:
+ app: notesApp
+ spec:
+ containers:
+ - name: notesApp
+ image: venkatadri/springboot-notesapp
+ imagePullPolicy: Always
+ ports:
+ - containerPort: 8080
From 3f26d5c0bdba612386e76bec8b5435e079beec1a Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:32:22 +0530
Subject: [PATCH 06/45] commanted some lines
---
Jenkinsfile | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 5e44894..2f5809f 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,10 +17,11 @@ pipeline {
stage('Build') {
steps {
- sh "mvn clean package"
+ // sh "mvn clean package"
+ sh "mvn -B -DskipTests clean package"
}
}
- stage('UnitTest') {
+ /*stage('UnitTest') {
steps {
sh "mvn test"
}
@@ -29,7 +30,7 @@ pipeline {
junit 'target/surefire-reports/*.xml'
}
}
- }
+ }*/
//commanted for time being
/*stage('StaticCode Analysis') {
steps {
From 5819780f022820012853736cec7663f340a8414d Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:38:37 +0530
Subject: [PATCH 07/45] added junit dependency and surefile plugin
added junit dependency and surefile plugin
---
pom.xml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/pom.xml b/pom.xml
index 9c59df4..c07ac53 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,10 +49,24 @@
spring-boot-starter-test
test
+
+ junit
+ junit
+ 4.12
+ test
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.22.1
+
+ false
+
+
org.springframework.boot
spring-boot-maven-plugin
From b35a4a7d3ee743be6ba46aa63ac111b6cdb10195 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:40:48 +0530
Subject: [PATCH 08/45] changed the api version for service
---
Application.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application.yml b/Application.yml
index fdabed4..a8abeb2 100644
--- a/Application.yml
+++ b/Application.yml
@@ -1,5 +1,5 @@
kind: Service
-apiVersion: extensions/v1beta1
+apiVersion: apiVersion=v1
metadata:
name: notesApp
namespace: euc-ns
From 68fd8ea1257ce135ea4c063cac9d24ac02f7eb65 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:41:47 +0530
Subject: [PATCH 09/45] un commented the test cases
---
Jenkinsfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 2f5809f..989a946 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -21,7 +21,7 @@ pipeline {
sh "mvn -B -DskipTests clean package"
}
}
- /*stage('UnitTest') {
+ stage('UnitTest') {
steps {
sh "mvn test"
}
@@ -30,7 +30,7 @@ pipeline {
junit 'target/surefire-reports/*.xml'
}
}
- }*/
+ }
//commanted for time being
/*stage('StaticCode Analysis') {
steps {
From cbd6bc291bf08a13ee251bf857edaf68b480edd3 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:43:40 +0530
Subject: [PATCH 10/45] Update Application.yml
---
Application.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Application.yml b/Application.yml
index a8abeb2..cd30849 100644
--- a/Application.yml
+++ b/Application.yml
@@ -1,5 +1,5 @@
kind: Service
-apiVersion: apiVersion=v1
+apiVersion: v1
metadata:
name: notesApp
namespace: euc-ns
@@ -11,7 +11,7 @@ spec:
port: 8080
type: NodePort
---
-apiVersion: extensions/v1beta1
+apiVersion: v1
kind: Deployment
metadata:
name: notesApp
From a45eef4e9006d929c32c96624227d644e1efca37 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:45:12 +0530
Subject: [PATCH 11/45] Update Jenkinsfile
---
Jenkinsfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 989a946..e30d9a8 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -21,7 +21,7 @@ pipeline {
sh "mvn -B -DskipTests clean package"
}
}
- stage('UnitTest') {
+ /*stage('UnitTest') {
steps {
sh "mvn test"
}
@@ -30,7 +30,7 @@ pipeline {
junit 'target/surefire-reports/*.xml'
}
}
- }
+ }*/
//commanted for time being
/*stage('StaticCode Analysis') {
steps {
From 348ead974a72e025468387d2578cd76f44031e02 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:46:55 +0530
Subject: [PATCH 12/45] Update Application.yml
---
Application.yml | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Application.yml b/Application.yml
index cd30849..9a29109 100644
--- a/Application.yml
+++ b/Application.yml
@@ -1,11 +1,11 @@
kind: Service
apiVersion: v1
metadata:
- name: notesApp
+ name: notesapp
namespace: euc-ns
spec:
selector:
- app: notesApp
+ app: notesapp
ports:
- protocol: TCP
port: 8080
@@ -14,20 +14,20 @@ spec:
apiVersion: v1
kind: Deployment
metadata:
- name: notesApp
+ name: notesapp
namespace: euc-ns
spec:
selector:
matchLabels:
- app: notesApp
+ app: notesapp
replicas: 2
template:
metadata:
labels:
- app: notesApp
+ app: notesapp
spec:
containers:
- - name: notesApp
+ - name: notesapp
image: venkatadri/springboot-notesapp
imagePullPolicy: Always
ports:
From eb98aab6c64f412d60549d537c2f631e921801cd Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 13:53:55 +0530
Subject: [PATCH 13/45] Update Application.yml
---
Application.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application.yml b/Application.yml
index 9a29109..e17aac5 100644
--- a/Application.yml
+++ b/Application.yml
@@ -11,7 +11,7 @@ spec:
port: 8080
type: NodePort
---
-apiVersion: v1
+apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: notesapp
From 6348790f4fb6ea9a365e765e6b5e88c00c80cfaf Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 15:48:21 +0530
Subject: [PATCH 14/45] changed the localhost to dockerip, credentials
changed the localhost to dockerip, credentials
---
src/main/resources/application.properties | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index b0f06a8..05d0963 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,7 +1,7 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
-spring.datasource.url = jdbc:mysql://localhost:3306/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
+spring.datasource.url = jdbc:mysql://54.71.54.23:3306/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
spring.datasource.username = root
-spring.datasource.password = callicoder
+spring.datasource.password = root
## Hibernate Properties
@@ -10,4 +10,4 @@ spring.datasource.password = callicoder
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
# Hibernate ddl auto (create, create-drop, validate, update)
-spring.jpa.hibernate.ddl-auto = update
\ No newline at end of file
+spring.jpa.hibernate.ddl-auto = update
From f64831d13326ead79492858dc8fe433aa6c3e7c2 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 15:53:01 +0530
Subject: [PATCH 15/45] added tag to image
---
Application.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application.yml b/Application.yml
index e17aac5..5c66795 100644
--- a/Application.yml
+++ b/Application.yml
@@ -28,7 +28,7 @@ spec:
spec:
containers:
- name: notesapp
- image: venkatadri/springboot-notesapp
+ image: venkatadri/springboot-notesapp:10
imagePullPolicy: Always
ports:
- containerPort: 8080
From 32c27b89ac8311a7e1fe0ee918ccb5b6dfa49926 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 15:59:10 +0530
Subject: [PATCH 16/45] Update Jenkinsfile
---
Jenkinsfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index e30d9a8..989a946 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -21,7 +21,7 @@ pipeline {
sh "mvn -B -DskipTests clean package"
}
}
- /*stage('UnitTest') {
+ stage('UnitTest') {
steps {
sh "mvn test"
}
@@ -30,7 +30,7 @@ pipeline {
junit 'target/surefire-reports/*.xml'
}
}
- }*/
+ }
//commanted for time being
/*stage('StaticCode Analysis') {
steps {
From 3ba8fed5482896cd1b0229b6fa8d65c7581f96dc Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 16:40:58 +0530
Subject: [PATCH 17/45] Update application.properties
---
src/main/resources/application.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 05d0963..1e3549a 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,5 +1,5 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
-spring.datasource.url = jdbc:mysql://54.71.54.23:3306/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
+spring.datasource.url = jdbc:mysql://54.71.54.23:9000/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
spring.datasource.username = root
spring.datasource.password = root
From 26096d2950b57b1e75123e7068a0c714540aea58 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 16:41:39 +0530
Subject: [PATCH 18/45] Update Jenkinsfile
---
Jenkinsfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 989a946..e30d9a8 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -21,7 +21,7 @@ pipeline {
sh "mvn -B -DskipTests clean package"
}
}
- stage('UnitTest') {
+ /*stage('UnitTest') {
steps {
sh "mvn test"
}
@@ -30,7 +30,7 @@ pipeline {
junit 'target/surefire-reports/*.xml'
}
}
- }
+ }*/
//commanted for time being
/*stage('StaticCode Analysis') {
steps {
From e8ca6ea49420a02054f652c1d71f16a7832e94e1 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 17:29:09 +0530
Subject: [PATCH 19/45] added the application.yml for mysql
---
Application_mysql.yml | 61 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
create mode 100644 Application_mysql.yml
diff --git a/Application_mysql.yml b/Application_mysql.yml
new file mode 100644
index 0000000..852f01e
--- /dev/null
+++ b/Application_mysql.yml
@@ -0,0 +1,61 @@
+--
+apiVersion: v1
+kind: Namespace
+metadata:
+ name: euc-ns
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: mysql
+ namespace: euc-ns
+ labels:
+ app: mysql
+spec:
+ ports:
+ - port: 3306
+ # Which port on the node is the service available through?
+ - nodePort: 31234
+ name: mysql
+ clusterIP: None
+ selector:
+ app: mysql
+
+---
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+ name: mysql
+ namespace: euc-ns
+spec:
+ serviceName: "mysql"
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: mysql
+ spec:
+ terminationGracePeriodSeconds: 10
+ containers:
+ - name: mysql
+ image: mysql:5.6
+ env:
+ # Use secret in real usage
+ - name: root
+ value: root
+ ports:
+ - containerPort: 3306
+ name: mysql
+ volumeMounts:
+ - name: mysql-vol
+ mountPath: /var/lib/mysql
+ volumeClaimTemplates:
+ - metadata:
+ name: mysql-vol
+ annotations:
+ volume.beta.kubernetes.io/storage-class: portworx-repl-2
+ spec:
+ accessModes: [ "ReadWriteOnce" ]
+ resources:
+ requests:
+ storage: 20Gi
From 4be69ddc139fdf479707ceef0c3b62c19de5399e Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 17:33:00 +0530
Subject: [PATCH 20/45] added the application_mysql.yml
added the application_mysql.yml
---
Jenkinsfile | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/Jenkinsfile b/Jenkinsfile
index e30d9a8..99682ea 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -68,6 +68,21 @@ pipeline {
}
}
}
+ }
+
+ stage('Deploy the application') {
+ steps{
+ //Deploying the docker image as the service using kubernets cd plug in
+ //mehtod to deploy the ymal file
+ kubernetesDeploy(
+ kubeconfigId: 'kubeconfig',
+ configs: 'Application_mysql.yml',
+ enableConfigSubstitution: false
+ )
+ }
+
+
+
}
stage('Deploy the application') {
steps{
From 6ef87729621f3bfbc20aa96e6d61c64a9e0e43a3 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 17:35:43 +0530
Subject: [PATCH 21/45] Update application.properties
---
src/main/resources/application.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 1e3549a..5479903 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,5 +1,5 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
-spring.datasource.url = jdbc:mysql://54.71.54.23:9000/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
+spring.datasource.url = jdbc:mysql://35.162.116.121:31234/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
spring.datasource.username = root
spring.datasource.password = root
From c3641d574e694cf035c253909f8f53b4d76fc03d Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 17:37:50 +0530
Subject: [PATCH 22/45] Update Jenkinsfile
---
Jenkinsfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 99682ea..c2d5b4e 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -70,7 +70,7 @@ pipeline {
}
}
- stage('Deploy the application') {
+ stage('Deploy the database') {
steps{
//Deploying the docker image as the service using kubernets cd plug in
//mehtod to deploy the ymal file
From e04d67c1c590f0a4d0faae8e0c059e51e0795cb7 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 17:41:26 +0530
Subject: [PATCH 23/45] Update Application_mysql.yml
---
Application_mysql.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index 852f01e..fa004c5 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -1,4 +1,4 @@
---
+
apiVersion: v1
kind: Namespace
metadata:
From b34d1147b8051f2d6750c6e89c970b08074adb5c Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 17:44:28 +0530
Subject: [PATCH 24/45] Update Application_mysql.yml
---
Application_mysql.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index fa004c5..6da2d21 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -15,7 +15,7 @@ spec:
ports:
- port: 3306
# Which port on the node is the service available through?
- - nodePort: 31234
+ nodePort: 31234
name: mysql
clusterIP: None
selector:
From 893bead4ffbdb3af4f3232fbf5c8145a8e7001ca Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 17:49:55 +0530
Subject: [PATCH 25/45] Update Application_mysql.yml
---
Application_mysql.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index 6da2d21..bc2cec4 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -15,6 +15,7 @@ spec:
ports:
- port: 3306
# Which port on the node is the service available through?
+ type: NodePort
nodePort: 31234
name: mysql
clusterIP: None
From 0b3a5b3fd818c8cec2119319753cbac52e4b6019 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 17:56:21 +0530
Subject: [PATCH 26/45] Update Application_mysql.yml
---
Application_mysql.yml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index bc2cec4..4b04c22 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -18,7 +18,6 @@ spec:
type: NodePort
nodePort: 31234
name: mysql
- clusterIP: None
selector:
app: mysql
From 132fde0753ec651548c50672f9a8813c1c37876d Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 18:17:15 +0530
Subject: [PATCH 27/45] mysql
mysql
---
Application_mysql.yml | 67 +++++++++++++++++++++----------------------
1 file changed, 32 insertions(+), 35 deletions(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index 4b04c22..2707076 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -1,61 +1,58 @@
-
-apiVersion: v1
-kind: Namespace
-metadata:
- name: euc-ns
----
apiVersion: v1
kind: Service
metadata:
name: mysql
- namespace: euc-ns
- labels:
- app: mysql
spec:
+ #type: NodePort
ports:
- port: 3306
- # Which port on the node is the service available through?
- type: NodePort
- nodePort: 31234
- name: mysql
+ #targetPort: 3306
+ #nodePort: 31000
selector:
app: mysql
-
+ clusterIP: None
+---
+
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: mysql-pv-claim
+spec:
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 5Gi
---
-apiVersion: apps/v1beta1
-kind: StatefulSet
+apiVersion: apps/v1
+kind: Deployment
metadata:
name: mysql
- namespace: euc-ns
spec:
- serviceName: "mysql"
- replicas: 1
+ selector:
+ matchLabels:
+ app: mysql
+ strategy:
+ type: Recreate
template:
metadata:
labels:
app: mysql
spec:
- terminationGracePeriodSeconds: 10
containers:
- - name: mysql
- image: mysql:5.6
- env:
+ - image: mysql:5.7
+ name: mysql
+ env:
# Use secret in real usage
- name: root
- value: root
+ value: root
ports:
- containerPort: 3306
name: mysql
volumeMounts:
- - name: mysql-vol
+ - name: mysql-persistent-storage
mountPath: /var/lib/mysql
- volumeClaimTemplates:
- - metadata:
- name: mysql-vol
- annotations:
- volume.beta.kubernetes.io/storage-class: portworx-repl-2
- spec:
- accessModes: [ "ReadWriteOnce" ]
- resources:
- requests:
- storage: 20Gi
+ volumes:
+ - name: mysql-persistent-storage
+ persistentVolumeClaim:
+ claimName: mysql-pv-claim
From 6e25f1888a909a311e26b0363b0b089a98be0a8c Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 18:20:31 +0530
Subject: [PATCH 28/45] Update application.properties
---
src/main/resources/application.properties | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 5479903..f06b5af 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,5 +1,6 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
-spring.datasource.url = jdbc:mysql://35.162.116.121:31234/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
+#spring.datasource.url = jdbc:mysql://35.162.116.121:31234/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
+spring.datasource.url = jdbc:mysql://mysql/notes_app?useSSL=false
spring.datasource.username = root
spring.datasource.password = root
From 8a038063b1517a6e5dfb38a477ff3b670aee770e Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 18:31:12 +0530
Subject: [PATCH 29/45] Update Application_mysql.yml
---
Application_mysql.yml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index 2707076..e3115a1 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -38,14 +38,15 @@ spec:
metadata:
labels:
app: mysql
- spec:
+spec:
containers:
- image: mysql:5.7
name: mysql
- env:
+ env:
+ # Use secret in real usage
# Use secret in real usage
- name: root
- value: root
+ value: root
ports:
- containerPort: 3306
name: mysql
From ed8a32dbbc9950ff2bce1b2ad107cc508462ba6c Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 18:33:05 +0530
Subject: [PATCH 30/45] Update Application_mysql.yml
---
Application_mysql.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index e3115a1..aa9ed70 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -24,7 +24,7 @@ spec:
requests:
storage: 5Gi
---
-apiVersion: apps/v1
+apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: mysql
From 59d40933865374623786ff1dc5bdd5f91920e64a Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 18:46:19 +0530
Subject: [PATCH 31/45] Update Application_mysql.yml
---
Application_mysql.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index aa9ed70..108f010 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -38,7 +38,7 @@ spec:
metadata:
labels:
app: mysql
-spec:
+ spec:
containers:
- image: mysql:5.7
name: mysql
From 60e6655543a992c6d9bd73b9ba62ea5b8f44a67a Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 19:22:48 +0530
Subject: [PATCH 32/45] commit
---
Application_mysql.yml | 37 ++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index 108f010..d3d59a9 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -12,7 +12,17 @@ spec:
app: mysql
clusterIP: None
---
-
+apiVersion: v1
+kind: Secret
+metadata:
+ name: mysql-secret
+type: Opaque
+data:
+ MYSQL_ROOT_PASSWORD: cGFzc3dvcmQ= #password
+ MYSQL_DATABASE: dGVzdA== #test
+ MYSQL_USER: dGVzdHVzZXI= #testuser
+ MYSQL_PASSWORD: dGVzdDEyMw== #test123
+---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
@@ -24,7 +34,7 @@ spec:
requests:
storage: 5Gi
---
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
@@ -44,9 +54,26 @@ spec:
name: mysql
env:
# Use secret in real usage
- # Use secret in real usage
- - name: root
- value: root
+ - name: MYSQL_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: mysql-secret
+ key: MYSQL_ROOT_PASSWORD
+ - name: MYSQL_DATABASE
+ valueFrom:
+ secretKeyRef:
+ name: mysql-secret
+ key: MYSQL_DATABASE
+ - name: MYSQL_USER
+ valueFrom:
+ secretKeyRef:
+ name: mysql-secret
+ key: MYSQL_USER
+ - name: MYSQL_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: mysql-secret
+ key: MYSQL_PASSWORD
ports:
- containerPort: 3306
name: mysql
From 5ddbee0efa0504ec3e968a9e737fd2879cf96c14 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 19:24:53 +0530
Subject: [PATCH 33/45] namespace is added
---
Application_mysql.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index d3d59a9..0df8a77 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: mysql
+ namespace: euc-ns
spec:
#type: NodePort
ports:
@@ -16,6 +17,7 @@ apiVersion: v1
kind: Secret
metadata:
name: mysql-secret
+ namespace: euc-ns
type: Opaque
data:
MYSQL_ROOT_PASSWORD: cGFzc3dvcmQ= #password
@@ -27,6 +29,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-pv-claim
+ namespace: euc-ns
spec:
accessModes:
- ReadWriteOnce
@@ -38,6 +41,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
+ namespace: euc-ns
spec:
selector:
matchLabels:
From 516c7f78ecb93107cf5955d35411cc9a5df21c9f Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 19:25:58 +0530
Subject: [PATCH 34/45] Update application.properties
---
src/main/resources/application.properties | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index f06b5af..b231eda 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,8 +1,8 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
#spring.datasource.url = jdbc:mysql://35.162.116.121:31234/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
-spring.datasource.url = jdbc:mysql://mysql/notes_app?useSSL=false
-spring.datasource.username = root
-spring.datasource.password = root
+spring.datasource.url = jdbc:mysql://mysql/test?useSSL=false
+spring.datasource.username = testuser
+spring.datasource.password = test123
## Hibernate Properties
From 46e768335da37fa44f8276f1b39a5eb4d36d16d1 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 19:32:18 +0530
Subject: [PATCH 35/45] Update Application_mysql.yml
---
Application_mysql.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index 0df8a77..59476f7 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -37,7 +37,7 @@ spec:
requests:
storage: 5Gi
---
-apiVersion: apps/v1
+apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: mysql
From cda41d72f33139d7e9340a7bb08e124f239073d4 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 20:03:58 +0530
Subject: [PATCH 36/45] Update application.properties
---
src/main/resources/application.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index b231eda..e662748 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,6 +1,6 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
#spring.datasource.url = jdbc:mysql://35.162.116.121:31234/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
-spring.datasource.url = jdbc:mysql://mysql/test?useSSL=false
+spring.datasource.url = jdbc:mysql://35.162.116.121:31000/test?useSSL=false
spring.datasource.username = testuser
spring.datasource.password = test123
From 93a88899561443ec14e1b1a04ef73004ffa9d606 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Mon, 11 Mar 2019 20:05:04 +0530
Subject: [PATCH 37/45] enable the port
---
Application_mysql.yml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index 59476f7..9a75094 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -4,14 +4,14 @@ metadata:
name: mysql
namespace: euc-ns
spec:
- #type: NodePort
+ type: NodePort
ports:
- port: 3306
- #targetPort: 3306
- #nodePort: 31000
+ targetPort: 3306
+ nodePort: 31000
selector:
app: mysql
- clusterIP: None
+ #clusterIP: None
---
apiVersion: v1
kind: Secret
From fad7e5ba179f49cf3f17ca1416841f5adad18e83 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Tue, 12 Mar 2019 11:21:18 +0530
Subject: [PATCH 38/45] Update application.properties
---
src/main/resources/application.properties | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index e662748..251fd30 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,8 +1,8 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
#spring.datasource.url = jdbc:mysql://35.162.116.121:31234/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
-spring.datasource.url = jdbc:mysql://35.162.116.121:31000/test?useSSL=false
-spring.datasource.username = testuser
-spring.datasource.password = test123
+spring.datasource.url = jdbc:mysql://34.214.95.59:31000/test?useSSL=false
+spring.datasource.username = root
+spring.datasource.password = password
## Hibernate Properties
From 1a549776000cae17575547ca9845b684e87fcddd Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Tue, 12 Mar 2019 16:51:56 +0530
Subject: [PATCH 39/45] Update application.properties
---
src/main/resources/application.properties | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 251fd30..b4adc4b 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,6 +1,7 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
#spring.datasource.url = jdbc:mysql://35.162.116.121:31234/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
-spring.datasource.url = jdbc:mysql://34.214.95.59:31000/test?useSSL=false
+spring.datasource.url = jdbc:mysql://35.164.109.96:31291/test?useSSL=false
+# ip is my sql exposed ip with the port number
spring.datasource.username = root
spring.datasource.password = password
From 89f547579520db4d6ae312fd1663734bc1882590 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Tue, 12 Mar 2019 16:52:25 +0530
Subject: [PATCH 40/45] Update Application_mysql.yml
31291
---
Application_mysql.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application_mysql.yml b/Application_mysql.yml
index 9a75094..010ad2c 100644
--- a/Application_mysql.yml
+++ b/Application_mysql.yml
@@ -8,7 +8,7 @@ spec:
ports:
- port: 3306
targetPort: 3306
- nodePort: 31000
+ nodePort: 31291
selector:
app: mysql
#clusterIP: None
From e756447cd9ef2fea26595134327ddc58f11b4862 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Tue, 12 Mar 2019 11:27:13 +0000
Subject: [PATCH 41/45] Update Application.yml
---
Application.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Application.yml b/Application.yml
index 5c66795..0d4907d 100644
--- a/Application.yml
+++ b/Application.yml
@@ -28,7 +28,7 @@ spec:
spec:
containers:
- name: notesapp
- image: venkatadri/springboot-notesapp:10
+ image: venkatadri/springboot-notesapp:31
imagePullPolicy: Always
ports:
- containerPort: 8080
From 7d79841bbca7066e590425d0ed426c88d191b8ac Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Tue, 12 Mar 2019 17:01:01 +0530
Subject: [PATCH 42/45] changed to master ip of cluster
---
src/main/resources/application.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index b4adc4b..56539ba 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,6 +1,6 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
#spring.datasource.url = jdbc:mysql://35.162.116.121:31234/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
-spring.datasource.url = jdbc:mysql://35.164.109.96:31291/test?useSSL=false
+spring.datasource.url = jdbc:mysql://54.202.241.46:31291/test?useSSL=false
# ip is my sql exposed ip with the port number
spring.datasource.username = root
spring.datasource.password = password
From dc64b228b0ec3dbbc0933c8166716ec74fdc26a5 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Tue, 12 Mar 2019 17:04:43 +0530
Subject: [PATCH 43/45] Update application.properties
---
src/main/resources/application.properties | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 56539ba..a06f4c7 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,6 +1,6 @@
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
#spring.datasource.url = jdbc:mysql://35.162.116.121:31234/notes_app?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
-spring.datasource.url = jdbc:mysql://54.202.241.46:31291/test?useSSL=false
+spring.datasource.url = jdbc:mysql://54.202.24.146:31291/test?useSSL=false
# ip is my sql exposed ip with the port number
spring.datasource.username = root
spring.datasource.password = password
From 08018b5cbe5e1198603946571d1db37c201c04c5 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Tue, 12 Mar 2019 17:05:13 +0530
Subject: [PATCH 44/45] Update Jenkinsfile
---
Jenkinsfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index c2d5b4e..63c3e2c 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -21,7 +21,7 @@ pipeline {
sh "mvn -B -DskipTests clean package"
}
}
- /*stage('UnitTest') {
+ stage('UnitTest') {
steps {
sh "mvn test"
}
@@ -30,7 +30,7 @@ pipeline {
junit 'target/surefire-reports/*.xml'
}
}
- }*/
+ }
//commanted for time being
/*stage('StaticCode Analysis') {
steps {
From bb5230edbf2e31f8fc832d21e9e11236d3cb1f49 Mon Sep 17 00:00:00 2001
From: AbhiramSandu <38881473+AbhiramSandu@users.noreply.github.com>
Date: Tue, 12 Mar 2019 19:04:29 +0530
Subject: [PATCH 45/45] commented the database part
---
Jenkinsfile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 63c3e2c..7bdc5b2 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -70,7 +70,7 @@ pipeline {
}
}
- stage('Deploy the database') {
+ /* stage('Deploy the database') {
steps{
//Deploying the docker image as the service using kubernets cd plug in
//mehtod to deploy the ymal file
@@ -83,7 +83,7 @@ pipeline {
- }
+ }*/
stage('Deploy the application') {
steps{
//Deploying the docker image as the service using kubernets cd plug in